Module malachite_base::num::logic
source · [−]Expand description
Traits for logic and bit manipulation.
Modules
BitAccess
, a trait for getting and setting individual bits of a number.
BitBlockAccess
, a trait for getting and setting adjacent blocks of
bits in a number.
BitConvertible
, a trait for extracting all bits from a number or
constructing a number from bits.
BitIterable
, a trait for producing a double-ended iterator over a
number’s bits.
CountOnes
, a trait for counting the number of ones in the binary
representation of a number.
CountZeros
, a trait for counting the number of ones in the binary
representation of a number.
HammingDistance
and
CheckedHammingDistance
, traits for computing the Hamming
distance between two numbers.
LeadingZeros
, a trait for determining the number of zeros that a
number starts with, when written in binary using $W$ bits, $W$ being the type width.
LowMask
, a trait for generating a low bit mask (a number in which only the
$k$ least-significant bits are 1).
SignificantBits
, a trait for determining how many significant bits
a number has.
TrailingZeros
, a trait for determining the number of zeros that a
number ends with when written in binary.
Various traits for performing logic or bitwise operations on numbers.