An OR gate outputs a HIGH signal (1) whenever at least one of its inputs is HIGH. You can build one in several ways: with two switches wired in parallel, with a pair of diodes and a resistor, with transistors, or with a ready-made IC chip on a breadboard. The method you choose depends on whether you’re learning the concept, prototyping a circuit, or building something permanent.
The OR Gate Truth Table
Before building anything, it helps to know exactly what an OR gate does. A standard 2-input OR gate has inputs A and B and one output. The output follows this pattern:
- A = 0, B = 0: Output = 0
- A = 0, B = 1: Output = 1
- A = 1, B = 0: Output = 1
- A = 1, B = 1: Output = 1
The only time the output is LOW (0) is when both inputs are LOW. Any other combination produces a HIGH output. Every build method below recreates this exact behavior.
Parallel Switches: The Simplest Demonstration
If you just want to see OR logic in action without any electronics knowledge, wire two single-pole single-throw (SPST) switches in parallel with a light bulb and a battery. You need two switches, one bulb, a power source, and five short pieces of wire.
Connect both switches side by side so that either one can complete the circuit to the bulb. When both switches are off, no current flows and the bulb stays dark. Flip either switch on and the bulb lights up, because current has a complete path through the closed switch. It doesn’t matter if the other switch is off or on. This mirrors the OR truth table perfectly: the bulb (output) is on whenever at least one switch (input) is on.
This approach is great for classroom demos but impractical for real circuits because mechanical switches can’t keep up with the speed electronic logic requires.
Diode-Resistor OR Gate
A diode-resistor logic (DRL) OR gate is the easiest electronic version to build. You need two diodes, one 1 kΩ resistor, a breadboard, a 5V power supply, and optionally an LED with a 220Ω resistor to see the output.
How It Works
A diode only lets current flow in one direction. Place two diodes so their anodes connect to the two input lines and their cathodes meet at a single output node. Connect a 1 kΩ pull-down resistor from that output node to ground. When both inputs are LOW (0V), no current flows through either diode, and the pull-down resistor holds the output at ground, giving you a logic 0. When either input goes HIGH (5V), current flows through that diode to the output node, pulling it up to roughly 4.3V (5V minus the voltage drop across the diode). That’s high enough to register as a logic 1.
Breadboard Wiring
Place the two diodes on the breadboard with their banded (cathode) ends meeting in the same row. That shared row is your output. Run the 1 kΩ resistor from the output row to the ground rail. Connect input A to the anode of the first diode and input B to the anode of the second. To visualize the output, connect a 220Ω resistor from the output row to an LED, then connect the other leg of the LED to ground. Apply 5V to either input and the LED lights up.
The main limitation of diode-resistor logic is the voltage drop. Each stage loses about 0.7V across the diode, so you can’t chain many DRL gates together before the signal degrades below a usable level.
Transistor OR Gate
Using two NPN transistors gives you a cleaner output signal and is closer to how real digital chips work internally. The key idea: wire two NPN transistors in parallel so their collectors share the same connection to the supply voltage through a resistor, and their emitters both connect to ground. Each transistor’s base is one of your inputs.
When input A or input B goes HIGH, it turns on the corresponding transistor, which conducts current and pulls the output (taken from the collectors) HIGH. When both inputs are LOW, neither transistor conducts, and the output sits at LOW. This is called resistor-transistor logic (RTL), and it handles the truth table cleanly without the voltage-drop problem of diodes.
For a basic build, use two 2N2222 or 2N3904 NPN transistors, a 1 kΩ collector resistor connected to 5V, and 10 kΩ resistors on each base input to limit current. The output is taken from the shared collector node.
Using a 74HC32 OR Gate IC
For any practical project, a dedicated OR gate chip is the fastest and most reliable option. The CD74HC32 (or SN74HC32) is a 14-pin IC that contains four independent 2-input OR gates. It’s widely available, costs under a dollar, and works on a breadboard with no extra components beyond a power supply.
Pinout
With the chip’s notch facing left, pin 1 is at the top-left and pin 14 is at the top-right. The four gates are laid out as follows:
- Gate 1: Input A on pin 1, Input B on pin 2, Output on pin 3
- Gate 2: Input A on pin 4, Input B on pin 5, Output on pin 6
- Gate 3: Input A on pin 9, Input B on pin 10, Output on pin 8
- Gate 4: Input A on pin 12, Input B on pin 13, Output on pin 11
Pin 7 is ground and pin 14 is the positive supply voltage (VCC). Connect VCC to 5V (or 3.3V, since the HC family supports both) and pin 7 to ground. Any input pins you’re not using should be tied to VCC to prevent unpredictable behavior.
Breadboard Setup
Place the chip across the center gap of your breadboard so each row of pins sits in its own row of holes. Run a wire from pin 14 to the positive power rail and from pin 7 to the ground rail. To test Gate 1, connect two jumper wires to pins 1 and 2 as your inputs. You can toggle them between 5V (HIGH) and ground (LOW) manually. Connect an LED and a 220Ω current-limiting resistor from pin 3 to ground. The LED will light whenever at least one input is HIGH.
Voltage Levels and What Counts as HIGH
If you’re mixing components or connecting your OR gate to other circuits, you need to know what voltage the receiving device considers HIGH or LOW. In a standard 5V TTL system, anything from 0V to 0.8V counts as LOW, and anything from 2V to 5V counts as HIGH. CMOS chips running at 5V have tighter requirements: LOW is 0V to 1.5V, and HIGH is 3.5V to 5V. The gap between those ranges is a “no man’s land” where behavior is unpredictable.
This matters most for the diode-resistor build, where the 0.7V drop per diode can push your HIGH signal into ambiguous territory if you’re chaining gates. Transistor and IC-based gates don’t have this problem because they actively drive the output to near-supply or near-ground levels.
Preventing Floating Inputs
A floating input is an input pin that isn’t connected to anything, leaving it free to pick up stray electrical noise and randomly flip between HIGH and LOW. This is the single most common cause of erratic behavior in DIY logic circuits.
The fix is a pull-down resistor: a 10 kΩ resistor connecting each input to ground. When a switch or jumper wire is open, the pull-down resistor holds the input firmly at 0V. When you apply 5V through the switch, the input goes HIGH and the small current through the 10 kΩ resistor to ground is negligible. Values anywhere from 1 kΩ to 100 kΩ work, but 10 kΩ is the standard choice for most 5V logic circuits. On the 74HC32 chip, any gate inputs you aren’t actively using should be tied directly to VCC rather than left disconnected.
CMOS: How Modern Chips Build an OR Gate
Inside real integrated circuits, OR gates are built using CMOS technology, which pairs two types of transistors (NMOS and PMOS) to create logic with almost zero idle power consumption. Interestingly, CMOS can’t produce an OR gate directly. Instead, it builds a NOR gate first, then inverts the output.
The NOR portion uses two NMOS transistors in parallel (connected between the output and ground) and two PMOS transistors in series (connected between the output and the supply voltage). If either input is HIGH, one of the parallel NMOS transistors turns on and pulls the output LOW, while the series PMOS path breaks. The result is the inverse of OR logic. Feeding that output into a simple CMOS inverter (one PMOS and one NMOS transistor) flips it back, giving you a true OR output. So every OR gate inside a modern chip actually uses six transistors: four for the NOR stage and two for the inverter.
You don’t need to build this yourself unless you’re studying chip design, but it explains why NOR and NAND gates are considered more “fundamental” than OR and AND in digital electronics. They require fewer transistors and are the natural building blocks of CMOS logic.

