XOR Gates with the 74LS86
Building XOR Gates with the 74LS86
The XOR (exclusive OR) gate is one of the most interesting logic gates, it outputs HIGH only when its inputs are different. In this post, we’ll build and test it using the 74LS86 TTL chip.
What You’ll Need
-
1 × 74LS86 IC (Quad 2-input XOR gates)
-
Breadboard + jumper wires
-
2 × push buttons (for inputs)
-
2 × 10 kΩ resistors (pull-downs)
-
1 × LED (any colour)
-
1 × 330 Ω resistor (for the LED)
-
5 V power supply (or Arduino 5 V pin)
How the XOR Gate Works
An XOR gate compares two logic inputs (A and B).
It outputs HIGH when only one input is HIGH, not both.
Pinout (74LS86)
The 74LS86 contains four independent XOR gates.
Typical pin connections:
Circuit Diagram
Wiring the circuit
-
Connect pin 14 to +5 V and pin 7 to GND.
-
Use pins 1 and 2 as your input A and B by connecting +5V to one side of the push button and the other side to pin 1 or 2.
-
Tie pins 1 & 2 to ground via 10 kΩ pull-down resistors between the push buttons and pins 1 and 2
-
Connect pin 3 (output) through a 330 Ω resistor to an LED, then to ground.
-
Press the buttons to test all combinations!
Understanding It Visually
-
No buttons pressed: both inputs LOW → LED OFF
-
Only A pressed: A = HIGH, B = LOW → LED ON
-
Only B pressed: A = LOW, B = HIGH → LED ON
-
Both pressed: both inputs HIGH → LED OFF
How to Use XOR Gates
XOR gates are used for:
-
Parity checkers / error detection
-
Bitwise comparison circuits
-
Half adders (next step in digital logic)
-
Signal toggling / difference detection












Comments
Post a Comment