Module malachite_nz::integer::logic
source · Expand description
Traits for logic and bit manipulation.
Modules§
- Bitwise and of
Integer
s. - 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 nexttrue
orfalse
bit in a number after a provided index. - A function counting the number of ones in the binary representation of a number.
- A function counting the number of zeros in the binary representation of a number.
- An implementation of
CheckedHammingDistance
, 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
Integer
s. - Bitwise or of
Integer
s. - 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
Integer
s.