band, bnot, bor, bxor -- perform bitwise operations.
band (number, number) bnot (number) bor (number, number) bxor (number, number)
Any number. Non-numbers are treated as zero.
An integer which is the result of the particular operation.
The binary operations cast their arguments to integers, and then perform bitwise operations to produce an integer result.
band bitwise AND
bnot bitwise NOT (inversion of all bits in a 32-bit word)
bor bitwise OR
bxor bitwise exclusive OR (XOR)
Gamma> band(7,5); 5 Gamma> bnot(7); -8 Gamma> bor(7,5); 7 Gamma> bxor(7,5); 2 Gamma>
Bitwise Operators