Bitwise algebra