Bit OperationsΒΆ

The header <kitty/bit_operations.hpp> implements bit manipulation on truth tables.

Function
Description

set_bit(tt, index)

Sets bit at index to true.

get_bit(tt, index)

Gets bit at index.

clear_bit(tt, index)

Clears bit at index.

flip_bit(tt, index)

Flip bit at index.

count_ones(tt)

Count ones in truth table.

count_zeros(tt)

Count zeros in truth table.

find_first_one_bit(tt, start)

Finds least-significant one-bit.

find_last_one_bit(tt)

Finds most-significant one-bit.

find_first_bit_difference(first, second)

Finds least-significant bit difference.

find_last_bit_difference(first, second)

Finds most-significant bit difference.