The 'logxor' function returns the logical bitwise 'exclusive-or' of the list of expressions. If there is only one argument, it is returned unaltered. If there are two or more arguments, the 'logxor' function performs the 'exclusive-or' successively applying the bitwise operation.
(logxor 0 0) ; returns 0 (logxor 0 1) ; returns 1 (logxor 1 0) ; returns 1 (logxor 1 1) ; returns 0 (logxor #b0011 #b0101) ; returns 6 (logxor 255 #xF0) ; returns 15 (logxor 255 #x0F) ; returns 240 (logxor 255 (logxor 255 99)) ; returns 99
Note: XLISP does not check when read-macro expansions like '#x0FF' are out of bounds. It gives no error message and will just truncate the number to the low-order bits that it can deal with [usually 32 bits or 8 hex digits].
See the
logxor
function in the