common lisp だとそういうのは、
(logand a b c)
(logior a b c)
(logxor a b c)