The exclusive-OR (XOR) and exclusive-NOR (XNOR) gates are two special two-input logic gates that compare their inputs rather than simply combining them.
The XOR gate gives a HIGH output only when its two inputs are different — that is, when exactly one input is 1. Its Boolean equation is Y=A⊕B=AB+AB, and its symbol is drawn like an OR gate with an extra curved line across the inputs. Because its output is 1 for an odd number of 1s, cascaded XOR gates form the basis of parity generators and checkers; for example A⊕B⊕C is built from two two-input XOR gates.
The XNOR gate is the exact complement of the XOR gate. It gives a HIGH output only when the two inputs are equal (both 0 or both 1), so it acts as an equality or coincidence detector. Its Boolean equation is Y=A⊕B=AB+AB, and its symbol is the XOR symbol with an inversion bubble on the output.
Each gate is available as a ready-made IC — the 7486 holds four XOR gates and the 74266 holds four XNOR gates in a 14-pin package. Mastering the truth tables, symbols and equations of these gates is essential groundwork for comparators, adders and code converters in the Karnataka 2nd PUC Electronics course.