These routines treat numbers as collections of binary bits,
and logical operations are performed on corresponding
bits in the binary representation of the numbers. There are
no routines for shifting bits left or right, but you can
achieve the same effect by multiplying or dividing by
powers of 2.
and_bits
|
- |
perform logical AND on corresponding bits |
or_bits
|
- |
perform logical OR on corresponding bits |
xor_bits
|
- |
perform logical XOR on corresponding bits |
not_bits
|
- |
perform logical NOT on all bits |
or_all
|
- |
perform or_bits on all elements of a sequence |
decode_flags
|
- |
create a human readable string for a bit field. |