Logtest
Test if two integers share a `1' bit
When integers x and y are viewed in their two's
complement representation, (logtest x y) is true if and only if there is
some position for which both x and y have a `1' bit in that
position.
The guard for logtest requires its arguments to be integers.
Logtest is defined in Common Lisp. See any Common Lisp documentation for
more information.
Function: logtest
(defun logtest (x y)
(declare (xargs :guard (and (integerp x) (integerp y))))
(not (zerop (logand x y))))