I'm not sure whether this is the best place to ask this, but is the XOR binary operator a combination of AND+NOT operators?
2026-04-08 05:50:26.1775627426
On
On
Is XOR a combination of AND and NOT operators?
141.7k Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
6
There are 6 best solutions below
2
On
Here are two similar but different versions derived using a OR b = NOT(NOT a AND NOT b), though there are others
p XOR q = ( p AND NOT q ) OR ( NOT p AND q )
= NOT ( NOT ( p AND NOT q ) AND NOT ( NOT p AND q ) )
or
p XOR q = ( p OR q ) AND NOT ( p AND q )
= NOT ( NOT p AND NOT q ) AND NOT ( p AND q )
3
On
Meanwhile, let me add the fact that XOR is not expressible by any expression whose operations use only AND, OR, IMPLIES, ConverseImplies and IFF.
To see this, observe merely that True XOR True is False, but the other operations always take True input to True output, a feature that would be inductively preserved in complex expressions.

Yes. In fact, any logical operation can be built from the NAND operator, where
See for instance http://en.wikipedia.org/wiki/NAND_logic, which gives
Digression: There is a story about certain military devices being designed using only NAND gates, so that only one part needs to be certified, stocked as spares, etc. I don't know whether it's actually true.