Lognot
Bitwise not of a two's complement number
(lognot i) is the two's complement bitwise `not' of the
integer i.
Lognot is actually defined by coercing its argument to an integer (see
ifix), negating the result, and then subtracting 1.
The guard for lognot requires its argument to be an
integer.
Lognot is a Common Lisp function. See any Common Lisp documentation
for more information.
Function: lognot
(defun lognot (i)
(declare (xargs :guard (integerp i)))
(+ (- (ifix i)) -1))
Subtopics
- Ihs/lognot-lemmas
- Lemmas about lognot from the logops-lemmas book.
- Lognot*
- Recursive definition of lognot.
- Lognot-default
- Behavior of lognot on bad inputs.