All the logical functions work on either integers or booleans. In the case of integers, they work bitwise over the bit representation of the integer.
not(a) {a a :: (a in logical)}
Returns the logical inverse of the argument. For integers, this
is the ones complement.
a or b {(a, a) a :: (a in logical)}
Returns the inclusive or of the two arguments.
a and b {(a, a) a :: (a in logical)}
Returns the logical and of the two arguments.
a xor b {(a, a) a :: (a in logical)}
Returns the exclusive or of the two arguments.
a nor b {(a, a) a :: (a in logical)}
Returns the inverse of the inclusive or of the two arguments.
a nand b {(a, a) a :: (a in logical)}
Returns the inverse of the and of the two arguments.