Module bitslice::arithmetic

source ·

Functions

  • Add two L bit numbers together to produce an L+1 bit number. Thus it will not overflow. Note that this uses big endian byte order! If your host CPU is little endian and your numbers are >8 bits, you will need top call fix_endianness() on the bits.
  • (a > b, a == b, a < b)
  • Since bitslice logic is big endian, if you are running on a little endian CPU (such as x86 and most ARMs) you must swap the byte order before and after doing math. This function will swap byte order only on little endian machines, on big endian machines it should compile to a null op.
  • Pads the integer with zeros on the most significant side, thus preserving the value while permitting it to be transposed and such like.
  • Counts the number of bits on an array of bits.
  • Counts the number of bits on an array of bits.
  • Counts the number of bits on an array of bits.
  • Counts the number of bits on an array of bits.
  • Counts the number of bits on an array of bits.
  • Counts the number of bits on an array of bits.
  • Counts the number of bits on an array of bits.
  • Counts the number of bits on an array of bits.
  • Counts the number of bits on an array of bits.