XOR Gate

The EXCLUSIVE-OR gate is a two-input, one-output gate. Figure shows the logic symbol and truth table of a two-input XOR gate. As can be seen from the truth table, the output of an XOR gate is a logic ‘1’ when the inputs are unlike and a logic ‘0’ when the inputs are like. The truth table of a multiple-input XOR function can be expressed as follows. The output of a multiple-input XOR logic function is a logic ‘1’ when the number of 1s in the input sequence is odd and a logic ‘0’ when the number of 1s in the input sequence is even, including zero. That is, an all 0s input sequence also produces a logic ‘0’ at the output.
The output of a two-input XOR gate is expressed by,

Y = A⊕B = AB+AB

XOR1

All About Basic Electronics