(logand integer1 integer2 ...)


Determine what is the logical AND.


This is a logic function using the Boolean AND. The result is generated via manipulating bits. If a bit is "on," it is denoted by a 1; if it is "off," it shows a 0. When the first bit AND the second bit (in the column) are on, then that bit is on. If the first bit is off AND the second is off, then that bit is off. The AND function requires that all bits in a column be on.

Examples

Code Returns
(logand 5 7 37) 5
(logand 13 2) 0
(logand 27 31 43) 11

Tell me about...

(~ number)

(and expression ...)

(boole function integer1 integer2 ...)

(logior integer1 integer2 )

(lsh integer1 integer2)

(or statement ...)

LISP Compatibility

Programming Overview of LISP (LISt Processing) Language