How do we demonstrate using Boolean algebra that these NAND and NOR gate combinations are XOR gates?
-
$\begingroup$ By boolean algebra, do you mean something like $\overline{\overline{A\overline{AB}}\,\overline{\overline{AB}B}} ={A\overline{AB}+\overline{AB}B} =A(\overline{A} + \overline{B})+(\overline{A} + \overline{B})B =A\overline B+\overline{A}B $? $\endgroup$– John L.Commented Apr 16, 2019 at 12:12
-
$\begingroup$ $\overline{\overline{A + \overline{A+B}}+\overline{\overline{A+B}+B}} =(A+\overline{A+B})(\overline{A+B}+B) =(A+\overline{A}\,\overline{B})(\overline{A}\,\overline{B}+B) =(AB+\overline{A}\,\overline{B})$. Then, $\overline{(AB+\overline{A}\,\overline{B}) + (AB+\overline{A}\,\overline{B})} =\overline{(AB+\overline{A}\,\overline{B})} =\overline{AB}\,\overline{\overline{A}\,\overline{B}} =\overline{AB}(A+B) =(\overline{A} + \overline{B})(A+B) =\overline{A}B + \overline{B}A =A\overline{B} + B\overline{A} $ $\endgroup$– John L.Commented Apr 23, 2019 at 9:44
2 Answers
The nice thing about small Boolean circuits like this, is there are only a few possible inputs.
With two input wires, there are $2^2=4$ possible inputs to your circuit: $00, 01, 10, 11$. You can test each one and write down its output. Then compare that to the XOR gate's outputs.
If the two line up, then the circuits are equivalent! And if they're not, something has to be adjusted.
Just write down what the output of every circuit is. In the first example, the left circuit is X = NAND (a, b), top middle is Y = NAND (a, X), bottom middle is Z = NAND (X, b), right = NAND (Y, Z).
Substitute everything into the eqation for the right circuit, then use Boolean algebra.