xor and xnor gate code example
Example 1: xor gate
XOR gate
0 0 = 0
1 0 = 1
0 1 = 1
1 1 = 0
Example 2: xnor gate
XNOR gate:
A B Output
0 0 = 1
1 0 = 0
0 1 = 0
1 1 = 1
XOR gate
0 0 = 0
1 0 = 1
0 1 = 1
1 1 = 0
XNOR gate:
A B Output
0 0 = 1
1 0 = 0
0 1 = 0
1 1 = 1