The exclusive-OR gate has a high output only when an odd number of inputs is high.
As shown in above circuit of Exclusive-OR gate, the upper AND gate gives output A’B and lower AND gate gives AB’ and both these output are given as input to OR gate whose output is given by Y=A’B+AB’
As shown in above circuit when both the inputs are low, both AND gates have low outputs, therefore final output Y is low.
If input A is low and B is high, the upper AND gate has high output, so the OR gate has high output as shown below.
Similarly, when A is high and B is low, we get final output high as shown below
If both A and B inputs are high, both AND gates have low outputs and the final output is low as shown below.
From the above discussion, the truth table of two input exclusive-OR gate can be given as follow.
From this truth table, we can say output is high when either A or B is high. When both the inputs are low or high, the output is low. This why circuit is known as exclusive-OR gate.
Four Inputs Exclusive-OR Gate:
As shown in above circuit, a pair of exclusive-OR gate driving an exclusive-OR gate. If all inputs are low (A to D), input gates have low output, so the final gate has a low output.(verify from two input exclusive-OR gate truth table). If A to C are low and D is high, the upper gate has a low output, the lower gate has a high output, and the output gate has a high output.
Here is an important property of the above circuit’s truth table. Each ABCD input with an ODD number of 1s produces an output 1 as shown below truth table.
In second row of above truth table, when ABCD=0001, it has ODD number of 1s which gives output 1. When ABCD=0010, it produces output 1.
For EVEN number of input ABCD=0011, it produces output low.
Any Number of Inputs Exclusive-OR Gates: