The XOR gate provides HIGH output only when its inputs have opposite logic levels. If both inputs are the same, the output is LOW.
Symbol of XOR Gate
XOR Gate Truth Table
If A and B are the two inputs of the XOR gate and X is the output then XOR gate truth table is:
A | B | X |
0 | 0 | 0 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 0 |
Analytical Function of XOR Gate
XOR gate can be mathematically expressed by equation:
F = |X – Y|
where
X = Input 1
Y = Input 2
Let’s analyze the function for four different conditions
- F(0, 0) = |0 – 0| = 0
- F(0,1) = |0 – 1| = |-1| = 1
- F(1,0) = |1 – 0| = 1
- F(1,1) = |1 – 1| = 0
Summary