I have been trying to express XOR in terms of just the '&' and '~' operators. I have managed to get the original XOR definition
(~x & y) | (x & ~y)
down to ~(x & y) & ~(~x & ~y) using DeMorgan's Law.
Using Wolfram I have found that this expression can be simplified down to ~x & y. Could someone show me the steps involved to do this as I just can't work it out.
$$ x ⊕ y = \bar xy + x \bar y$$ Take DeMorgan's. Take inverse, invert terms and change operator. $$ x ⊕ y = \overline {\bar xy} • \overline {x \bar y}$$ So this is as good as it gets for AND and NOT operators. 2 NANDs, 1 AND and 2 NOTs. NAND = AND + NOT