Build it step by step
0 of 7 donePower the chips
Put all five chips on the breadboard and connect pin 14 and pin 7 on each.
Build the inputs
Two buttons with 10 kΩ pull-down resistors to make node A and node B.
Tie off unused inputs
Connect every unused gate input to GND.
Test the AND gate
Connect node A and B to its gate 1 inputs and the output to the LED.
Fill in the table
Try all four button combinations and write down whether the LED is on.
Repeat for the other chips
Move the two input wires to OR, NAND, NOR and XOR.
Compare
Check that each table matches its definition. Which gate is the opposite of AND?
How do you build a logic gate truth table lab?
Test AND, OR, NAND, NOR and XOR chips with two switches and an LED, and fill in each truth table. You need 74HC08 quad AND gate, 74HC32 quad OR gate, 74HC00 quad NAND gate, 74HC02 quad NOR gate, 74HC86 quad XOR gate, Tactile push button 6 mm × 2, Resistor 10 kΩ × 2, LED 5 mm red, Resistor 330 Ω, Breadboard 830 Tie Points, Jumper wires male to male (40 pcs, 20 cm), Breadboard power supply module (MB102) and 12 V 2 A DC adapter. It takes 7 steps and about 60 minutes.
- Level
- Beginner
- Time
- About 60 min
- Parts
- 13
Parts list
- Integrated CircuitsBuy
- Integrated CircuitsBuy
- Integrated CircuitsBuy
- Integrated CircuitsBuy
- Integrated CircuitsBuy
- SwitchesBuy
- PassivesBuyResistor 10 kΩ × 2
- SemiconductorsBuyLED 5 mm red × 1
- PassivesBuyResistor 330 Ω × 1
- PrototypingBuy
- PrototypingBuy
- PowerBuy
- PowerBuy
Tick what you already own. It saves to My Garage, so “Build with what I have” knows.
Wiring
| From | To | Why |
|---|---|---|
| All chips | Pin 14 to +5 V, pin 7 to GND | Power each chip |
| Button A | +5 V to node A, with 10 kΩ from node A to GND | High when pressed |
| Button B | +5 V to node B, with 10 kΩ from node B to GND | High when pressed |
| Gate 1 inputs (AND, OR, NAND, XOR: pins 1 and 2; NOR: pins 2 and 3) | Node A and node B | Move the two jumpers from chip to chip |
| Gate 1 output (pin 3; NOR: pin 1) | 330 Ω, then LED to GND | Output indicator |
| Unused inputs | GND | Never leave CMOS inputs floating |
No code needed
No code. Power: a breadboard power supply module (MB102) from the 12 V adapter, with its jumper set to 5 V. All 14-pin gate chips (74HC00, 74HC08, 74HC32, 74HC86) have VCC on pin 14 and GND on pin 7, with gate 1 on pins 1, 2 and 3. The 74HC02 NOR chip is different: gate 1 output is pin 1 and its inputs are pins 2 and 3.
Test checklist
What you should see at each check. If a reading is far off, stop and use the troubleshooting list.
| Check | Expected |
|---|---|
| AND | LED on only when A and B are both pressed |
| OR | LED on when either or both are pressed |
| NAND | The opposite of AND: off only when both pressed |
| XOR | LED on when exactly one button is pressed |
If it does not work
LED always on or off
An input is floating or wired to the wrong pin. Check the pin numbers for that chip.
Results look random
Unused inputs are floating. Tie them to GND.
NOR gives wrong answers
Its pinout differs: output on pin 1.
Chip gets warm
VCC and GND are swapped. Disconnect power at once.
Still stuck? Find the fault step by step with your multimeter →
Common questions
What parts do I need for the logic gate truth table lab?
74HC08 quad AND gate, 74HC32 quad OR gate, 74HC00 quad NAND gate, 74HC02 quad NOR gate, 74HC86 quad XOR gate, Tactile push button 6 mm × 2, Resistor 10 kΩ × 2, LED 5 mm red, Resistor 330 Ω, Breadboard 830 Tie Points, Jumper wires male to male (40 pcs, 20 cm), Breadboard power supply module (MB102) and 12 V 2 A DC adapter.
How long does the logic gate truth table lab take to build?
About 60 minutes for a beginner maker, in 7 steps.
How do I know the logic gate truth table lab works?
AND: LED on only when A and B are both pressed. OR: LED on when either or both are pressed. NAND: The opposite of AND: off only when both pressed.
LED always on or off: what should I check?
An input is floating or wired to the wrong pin. Check the pin numbers for that chip.
Results look random: what should I check?
Unused inputs are floating. Tie them to GND.
NOR gives wrong answers: what should I check?
Its pinout differs: output on pin 1.
Chip gets warm: what should I check?
VCC and GND are swapped. Disconnect power at once.
