The 'XOR' gate

For the output Y to be high (a logic state 1) either input A OR input B needs to be high. This high output is exclusively for the either/or state of the inputs - if both are high then the gate gives a low output. (Compare with the OR)

The truth table below shows that this is the case:

A
B
Y
0
0
0
0
1

1

1
0
1
1
1
0

 

n-input gate

You can have any number of input lines into a gate.

If there are more than two inputs we can no longer think of exclusively one being high and one low. The output is then high if an odd number of inputs is high - and a low output if the number of high inputs is even.

Boolean Expression for the NOR gate:

Making an XOR from NAND gates

A
B
C
D
E
F
0
0
1
1
1
0
0
1
1
1
0
1
1
0
1
0
1
1
1
1
0
1
1
0