Digital Electronics Series
XOR Gate: Exclusive OR
Logic Operation, Truth Table & Arithmetic Applications
Live XOR Logic Simulator
Input A
Input B
Result Y
0
Notice: Output is HIGH only when inputs are different!
The XOR gate (Exclusive OR) is a digital logic gate that outputs HIGH only when the number of HIGH inputs is odd. For a 2-input gate, this means the output is 1 if the inputs are different.
01 Truth Table
| Input A | Input B | Output Y (A ⊕ B) |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
Boolean Expression
Y = A \oplus B
Adders
XOR gates produce the ‘Sum’ bit in Half-Adders and Full-Adders because $1+1=0$ (carry 1).
Parity
Used to generate parity bits for data transmission to detect single-bit errors.
Encryption
Fundamental in symmetric key cryptography (Stream Ciphers) because XORing twice restores data.
