Digital Logic

XOR (Exclusive OR)

A logic gate that outputs high when inputs differ—one input high and one low—and low when inputs match.

Detailed Explanation

XOR of two bits: 0⊕0=0, 0⊕1=1, 1⊕0=1, 1⊕1=0. XOR is self-inverse: A⊕B⊕B=A. This property enables parity calculation, toggle operations, and certain error detection/correction codes.

Multi-input XOR outputs the parity of inputs (1 if odd number of 1s). XNOR (equivalence gate) is inverted XOR—outputs 1 when inputs match.