keen/bits
Source& nat8(a nat8, b nat8)Intersection of bits; 'and's each corresponding bit in parallel. An output bit will be 1 iff both corresponding input bits are 1.
| nat8(a nat8, b nat8)Union of bits; 'or's each corresponding bit in parallel. An output bit will be 1 iff either corresponding input bit is 1.
^ nat8(a nat8, b nat8)Performs exclusive or of each bit in parallel. Output bits will be 1 iff the corresponding input bits are not equal.
has-all-bits bool(a nat8, b nat8)True if for every 1 bit in
b, the corresponding bit in a is also a 1.
Functions for operating on the individual bits in nats / ints.
Bit indexes are counted from the right, so the least-siginificant digit is 0. So, the number 5 has bits 0 and 2 set, since 5 is
2**0 + 2**2.