NAND Logic - XOR

XOR

An XOR gate is constructed similarly to an OR gate, except with an additional NAND gate inserted such that if both inputs are high, the inputs to the final NAND gate will also be high, and the output will be low. This effectively represents the formula: "NAND(A NAND (A NAND B)) NAND (B NAND (A NAND B))".

Desired Gate NAND Construction
Truth Table
Input A Input B Output Q
0 0 0
0 1 1
1 0 1
1 1 0

Read more about this topic:  NAND Logic