
ANSI Common Lisp 12 Numbers 12.2 Dictionary of Numbers
 Syntax:

logbitp
index integer
generalizedboolean
 Arguments and Values:

index  a nonnegative integer.
integer  an integer.
generalizedboolean  a generalized boolean.
 Description:

logbitp is used to test the value of a particular bit
in integer, that is treated as if it were binary.
The value of logbitp is true if the bit in integer
whose index is index (that is, its weight is 2^{index})
is a onebit; otherwise it is false.
Negative integers are treated as if they were in
two'scomplement notation.
 Examples:

(logbitp 1 1) false
(logbitp 0 1) true
(logbitp 3 10) true
(logbitp 1000000 1) true
(logbitp 2 6) true
(logbitp 0 6) false
 Exceptional Situations:

Should signal an error of type typeerror if index is not a nonnegative integer.
Should signal an error of type typeerror if integer is not an integer.
 Notes:

(logbitp k n) ==(ldbtest (byte 1 k) n)
 Allegro CL Implementation Details:

None.
