74HC86 XOR Gate
Components

74HC86 XOR Gate

0.0(0)
The 74HC86 is a 14-pin (DIP-14) logic IC that contains four two-input XOR (exclusive OR) gates. An XOR gate compares its inputs: the output is 1 when the two inputs differ and 0 when they are the same. The inputs of the first gate are pins 1 and 2, and its output is pin 3. It runs from 2 to 6 V; pin 14 goes to the supply (VCC) and pin 7 to GND. Unused inputs must not be left floating: tie them to GND or VCC, otherwise the output behaves unpredictably and the chip draws needless current. Connect an LED with a 470 Ω to 1 kΩ resistor to an output to see the result directly. More than 6 V damages the chip, so put a 5 V regulator in between when you use a 9V battery. An XOR gate with one input tied to 1 inverts the other input, and with that input tied to 0 it passes the signal unchanged, so it also works as a selectable inverter. Equality checks, adders and parity circuits are all built from XOR gates.