Expand description

Traits for logic and bit manipulation.

Modules

Bitwise and of Naturals.

An implementation of BitAccess, a trait for getting and setting individual bits of a number.

An implementation of BitBlockAccess, a trait for getting and setting adjacent blocks of bits in a number.

An implementation of BitConvertible, a trait for extracting all bits from a number or constructing a number from bits.

An implementation of BitIterable, a trait for producing a double-ended iterator over a number’s bits.

An implementation of BitScan, a trait for finding the next true or false bit in a number after a provided index.

An implementation of CountOnes, a trait for counting the number of ones in the binary representation of a number.

An implementation of HammingDistance, a trait for computing the Hamming distance between two numbers.

An implementation of LowMask, a trait for generating a low bit mask (a number in which only the $k$ least-significant bits are 1).

Bitwise negation of Naturals.

Bitwise or of Naturals.

An implementation of SignificantBits, a trait for determining how many significant bits a number has.

An implementation of TrailingZeros, a trait for determining the number of zeros that a number ends with when written in binary.

Bitwise xor of Naturals.