|
Digital Logic - XOR & XNOR gate
Input & Output
A XOR gate (eXclusive-OR
gate) has two (or more) inputs and one output.
The XOR gate is sometimes called the difference gate - if the
inputs are different, the output is 1; if the inputs are the same, the
output is 0.
The XNOR (eXclusive-NOR)
is sometimes called the equivalence gate - the output is 1 if the
inputs are the same, 0 if they are different (the inverse of the XOR).
In theory, an XOR or XNOR gate can have any number of inputs (as long
as it has at least two). In practice, we usually use 2-input XOR
& XNOR gates.
Symbol:
|
XOR:
2-input XOR gate |
The mathematical symbol for XOR is a + inside
of a circle:  |
|
|
XNOR:
2-input XNOR gate |
|
|
|
Truth Table & Equation:
|
| 2-input XOR gate
... two inputs, so 4 rows. (remember 22 = 4)

|
|
input
|
output
|
|
A
|
B
|
C
|
|
0
|
0
|
0
|
|
0
|
1
|
1
|
|
1
|
0
|
1
|
|
1
|
1
|
0
|
|
Equation: the equation can be written as shown: there
will be many times we use techniques to find equations for a circuit.
XOR symbols are rarely used in practice; instead, the 2nd equation is typically
used:

|
|
2-input XNOR gate
.. two inputs, so 4 rows. (remember 22 = 4)

|
|
input
|
output
|
|
A
|
B
|
C
|
|
0
|
0
|
1
|
|
0
|
1
|
0
|
|
1
|
0
|
0
|
|
1
|
1
|
1
|
|
Equation: the equation can be written as shown: there
will be many times we use techniques to find equations for a circuit.
XNOR symbols are rarely used in practice; instead, the 2nd equation is
typically used:

(note: there is a separate line over each letter A and B in
the 2nd equation - not one solid line over both!) |
|
Examples:
|