electronics Tutorials

electronics Projects

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,