An exclusive-OR gate implements the XOR logic function in hardware. It drives its output high (1) if one input is high and the other is low, but drives it low (0) if both inputs are the same. These gates are the primary building blocks for arithmetic logic units, specifically in half adders and full adders, as well as in cryptographic circuits.
The schematic shows an XOR gate combining the clock and the data stream to recover the timing signal.
In schematics, an XOR gate is drawn like a standard OR gate but with a curved double line at the input side.
Do not mix it up with
- OR gate: An OR gate outputs true if both inputs are true, whereas an XOR gate outputs false if both inputs are true.
Related terms
XOR
Exclusive OR is a logical operation that outputs true only when its inputs differ.
Half adder
A digital logic circuit that adds two single-bit binary numbers and produces a sum and a carry output.
Combinational circuit
A digital logic circuit whose output depends strictly on the immediate state of its inputs.