OR Gate from Transistors
Build an OR gate using two transistors—the output is HIGH when either or both inputs are HIGH.
Overview
The OR gate outputs HIGH when at least one input is HIGH. Think of it as "this OR that (or both)"—any true input makes the output true. This project uses two transistors in parallel so that either one can turn on the output. OR gates are fundamental in decision-making circuits.
Components Needed
- 2x Switch
- 3x 10kΩ resistor
- 1x LED
- 2x 2N2222 transistor
- severalx Wires
Instructions
Gather Your Components
You'll need two switches for inputs, two 2N2222 transistors, three 10kΩ resistors, an LED for output, wires, breadboard, and 5V power. The component image shows parts for multiple projects.
Build the OR Gate Circuit
Wire two transistors with their collectors connected together and to the LED (through a resistor to 5V). Each transistor base connects to its own switch through a 10kΩ resistor. Both emitters connect to ground. When either transistor turns on, it provides a path for LED current.
Test: Both OFF → LED OFF
With both switches in the OFF position (right), neither transistor conducts. No current path exists through the LED, so it remains OFF. This is the only input combination that produces a LOW output.
Test: Left ON, Right OFF → LED ON
Turn the left switch ON (left position) while keeping the right switch OFF. The left transistor conducts, providing a path for current. The LED turns ON, demonstrating that one HIGH input is enough.
Test: Left OFF, Right ON → LED ON
Now switch positions—left OFF, right ON. The right transistor conducts instead. The LED is still ON because either input being HIGH produces a HIGH output.
Test: Both ON → LED ON
Turn both switches ON. Both transistors conduct simultaneously. The LED remains ON—with OR logic, having both inputs HIGH still gives a HIGH output. More current flows but the result is the same.
Challenges
- Build a 3-input OR gate by adding another transistor in parallel
- Measure the output voltage in each state with a multimeter
- Combine this OR gate with a NOT gate to create a NOR gate
- Try building the same logic using diodes instead of transistors
- Design a circuit where an LED turns on when any of three buttons is pressed