These functions operate on the 2's complement binary representation of an exact integer.
Returns the bit-wise logical "and" of the arguments. If no argument is given, the result is -1.
Returns the bit-wise logical "(inclusive) or" of the arguments. If no argument is given, the result is 0.
Returns the bit-wise logical "exclusive or" of the arguments. If no argument is given, the result is 0.
Returns true if the arguments have any bits in common. Same as
(not (zero? (logand, but is more efficient.ij)))
Function: arithmetic-shift i j
Shifts
ibyj. It is a "left" shift if, and a "right" shift ifj>0.j<0The result is equal to
(floor (*.i(expt 2j)))
Count the number of 1-bits in
i, if it is non-negative. Ifiis negative, count number of 0-bits.
Return number of bits needed to represent
iin an unsigned field. Regardless of the sign ofi, return one less than the number of bits needed for a field that can representias a two's complement integer.