Learning Objectives
By the end of this lab, you will be able to:
- Construct a reusable logic test bench in Tinkercad β switch-driven inputs, LED output indicator, and a socketed gate under test β and use it to characterize six different 74xx-family ICs.
- Determine the complete truth table of AND, OR, NAND, NOR, XOR, XNOR, and NOT gates by direct measurement, recording one row per input combination.
- Interpret 14-pin DIP pinout diagrams: locate pin 1 from the notch, apply the counterclockwise numbering convention, and wire VCC (pin 14) and GND (pin 7) on every chip before anything else.
- Contrast the standard quad-gate pinout (74HC00/08/32/86: inputs 1,2 β output 3) with the reversed 74HC02 NOR pinout (output 1 β inputs 2,3), and explain why datasheet verification beats assumption.
- Write the Boolean expression for each gate (AΒ·B, A+B, AΒ·B, A+B, AβB, AβB, A) and match expressions to measured behavior.
- Synthesize an XNOR function from a 74HC86 XOR gate and a 74HC04 inverter, demonstrating that gates compose into new functions.
- Demonstrate NAND's universality by building a working NOT and AND from 74HC00 gates alone, and explain why defined logic levels (never floating inputs) matter in real hardware.
Key Terms & Concepts
Click any card to reveal its definition. Review these before you build.
π₯ Tinkercad Setup Notes for Logic ICs
Fifth lab, familiar toolkit β new part family:
- Finding the chips: in the parts panel, switch Components to All and search the number β "74HC08" (quad AND), "74HC32" (OR), "74HC00" (NAND), "74HC02" (NOR), "74HC86" (XOR), "74HC04" (hex inverter). Tinkercad labels each pin when you hover β but read the pinout tabs below first, then use hover to confirm.
- No XNOR chip: Tinkercad's library has no 74HC266. Part 4 builds XNOR from XOR + inverter β a genuine design exercise, and the same lesson as the Rectifier lab's missing transformer: simulators have gaps; engineers compose around them.
- Power first, always: every chip needs pin 14 β 5 V and pin 7 β GND before any logic wiring. A logic chip without power doesn't do "nothing" β it does garbage, which is worse.
- Inputs via slide switches: Tinkercad's Slideswitch is SPDT β wire terminal 1 to GND, terminal 3 to 5 V, and the middle terminal to the gate input. The input is then always solidly HIGH or LOW, never floating.
- Output indicator: gate output β LED anode; LED cathode β 220 Ξ© β GND. LED ON = 1.
- Supply: one Power Supply at 5.00 V (or Tinkercad's 5 V regulator/breadboard supply) to the rails. 74HC chips are happy from 2β6 V; we standardize on 5 V.
π§ Virtual Parts List
| Qty | Component (Tinkercad name) | Setting / Part | Purpose |
|---|---|---|---|
| 1 | Breadboard (small) | β | Test bench platform |
| 1 | Power Supply | 5.00 V | Logic supply to rails |
| 2 | Slideswitch | SPDT: GND / input / 5 V | Inputs A and B, never floating |
| 1 | LED (red) + Resistor 220 Ξ© | β | Output indicator: ON = 1 |
| 1 ea | 74HC08 Β· 74HC32 Β· 74HC00 Β· 74HC02 Β· 74HC86 | quad 2-input gates | AND Β· OR Β· NAND Β· NOR Β· XOR |
| 1 | 74HC04 | hex inverter | NOT Β· XNOR build Β· NAND challenge |
| 1 | Multimeter | V mode | Measuring actual HIGH/LOW voltages |
| ~12 | Wires | red / black / green | Power, ground, logic |
π The Test Bench & The Pinouts
One test bench, six chips. You build the switch-and-LED harness once; each new gate is a two-minute chip swap β provided you respect the pinouts.
The Seven Gates at a Glance
| Gate | Chip | Gate-1 pins | Boolean | Output is HIGH when⦠|
|---|---|---|---|---|
| AND | 74HC08 | 1, 2 β 3 | Y = AΒ·B | both inputs are 1 |
| OR | 74HC32 | 1, 2 β 3 | Y = A+B | at least one input is 1 |
| NAND | 74HC00 | 1, 2 β 3 | Y = AΒ·B | NOT both 1 (AND inverted) |
| NOR | 74HC02 β | 2, 3 β 1 | Y = A+B | both inputs are 0 (OR inverted) |
| XOR | 74HC86 | 1, 2 β 3 | Y = AβB | inputs differ |
| XNOR | 86 + 04 build | 3 β 1 β 2 | Y = AβB | inputs match |
| NOT | 74HC04 | 1 β 2 | Y = A | the (single) input is 0 |
π Step-by-Step Procedure
Suggested split: Session 1 = Parts 1β2 (bench + the five quad-gate chips). Session 2 = Parts 3β5 + analysis.
Part 1 β Build the Test Bench + First Chip: AND (β30 min)
- Create the workspace. New circuit named "LastName β Logic Gates Lab." Small breadboard; Power Supply at 5.00 V to the bottom rails.
- Input switches. Place two Slideswitches left of the board. For each: terminal 1 β GND rail, terminal 3 β +5 V rail, middle terminal β a labeled breadboard column (call them column A and column B). Slide each switch and verify with the multimeter: the middle terminal reads cleanly 0 V or 5 V.
- Output indicator. Reserve a column Y β LED anode; cathode β 220 Ξ© β GND rail.
- Seat the 74HC08. Straddle the trench, notch to the left. Ritual: find the notch β pin 1 below-left of it β wire pin 14 β +5 V, pin 7 β GND β hover-confirm pins 1, 2, 3 against Figure 2.
- Connect the harness. Column A β pin 1, column B β pin 2, pin 3 β column Y.
- Measure the truth table. Start the simulation. Step through all four input combinations in binary order β 00, 01, 10, 11 β and record the LED state for each row in Data Table 1's AND column. Four rows, no skipping: two of them are where AND, NAND, and OR all look alike, and the other two are where they don't.
- Measure a real HIGH. With Y = 1, put the multimeter on pin 3: record the actual output voltage in Data Table 3. It won't be exactly 5.000 V β note what it is.
Part 2 β The Chip Parade: OR, NAND, XOR, then NOR (β30 min)
- Swap to the 74HC32 (OR). Stop the sim, delete only the chip, seat the 74HC32 in the same spot, re-wire power + pins 1/2/3 (same map). Measure all four rows into the OR column.
- Swap to the 74HC00 (NAND). Same drill. Before measuring, predict the column by inverting your AND results β then verify row by row.
- Swap to the 74HC86 (XOR). Same map again. Measure, and note in words when the LED lights.
- Now the 74HC02 (NOR) β read first. Open Figure 3. This chip is mirrored: inputs go to pins 2 and 3, output comes from pin 1. Wire it accordingly: A β pin 2, B β pin 3, pin 1 β Y.
- Measure NOR into its column. Then, as a deliberate experiment: rewire it the standard way (Aβ1, Bβ2, 3βY) for one input combination and observe the nonsense. Put the correct wiring back. You have now personally met the trap β record one sentence about what the wrong wiring produced.
Part 3 β NOT with the Hex Inverter (β10 min)
- Seat the 74HC04. Power ritual first. This gate has ONE input: column A β pin 1, pin 2 β Y. Switch B rests this round.
- Measure both rows (A = 0, A = 1) into Data Table 2. Then try one of the other five inverters on the chip (say pins 3 β 4) to confirm the sections are identical and independent.
Part 4 β Build the Missing Gate: XNOR (β15 min)
- Two chips, both powered. Seat the 74HC86 and the 74HC04 side by side; give each its pin 14 / pin 7 power connections.
- Compose per Figure 4. A β 86 pin 1, B β 86 pin 2; 86 pin 3 β 04 pin 1; 04 pin 2 β Y.
- Predict, then measure. Write the predicted XNOR column (complement of your XOR data) first, then measure all four rows. The gate that wasn't in the library now exists on your bench.
Part 5 β Universal-Gate Challenge (β15 min, extension)
- NOT from NAND. On a fresh 74HC00: tie pins 1 and 2 together to column A; pin 3 β Y. Measure both rows β you built an inverter from a NAND.
- AND from NAND. Keep gate 1 as a normal NAND (Aβ1, Bβ2). Route its output (pin 3) into gate 2's tied-together inputs (pins 4 and 5 jumpered); pin 6 β Y. Measure all four rows and compare to Part 1's AND column: identical, using only NANDs.
- Reflect. One paragraph: why does "NAND is universal" matter for how real chips and FPGAs are manufactured?
- Wrap up. Complete the Analysis Questions and Knowledge Check, then Print/Save the report with your data tables.
π Data Tables
Record the LED state (1 = ON, 0 = OFF) for every row. The tables persist when you print this page.
Data Table 1 β Two-Input Gates (measured truth tables)
| A | B | AND (08) | OR (32) | NAND (00) | NOR (02) | XOR (86) | XNOR (86+04) |
|---|---|---|---|---|---|---|---|
| 0 | 0 | ||||||
| 0 | 1 | ||||||
| 1 | 0 | ||||||
| 1 | 1 |
Data Table 2 β NOT & the NAND-Built Gates
| A | B | NOT (04) | NOT from NAND | AND from 2Γ NAND |
|---|---|---|---|---|
| 0 | 0 | |||
| 0 | 1 | β | β | |
| 1 | 0 | |||
| 1 | 1 | β | β |
Data Table 3 β Real Voltages Behind the 1s and 0s
| Measurement | Voltage | Reads as |
|---|---|---|
| Output pin, LED ON (any gate) | ||
| Output pin, LED OFF | ||
| Switch middle terminal, slid HIGH |
π Interactive Gate Playground
A live twin of your Tinkercad test bench. Pick a gate, click the input switches, and watch the symbol, the wires, the LED, and the truth-table highlight respond together. Use it to predict each row before you measure it on the breadboard β and afterward, to check your data tables.
β Analysis Questions
Answer in complete sentences in your lab report.
- Two of the four rows of your AND and OR columns are identical, and two differ. Identify which rows distinguish the gates, and explain why testing only "both LOW" and "both HIGH" would be an incomplete characterization of a mystery chip.
- Compare your NAND column to your AND column, and your NOR column to your OR column. State the relationship, then express it with a Boolean overbar.
- Describe what happened in the deliberate mis-wiring experiment of Part 2 step 5, and explain why the 74HC02's mirrored pinout produced that behavior rather than a clean "wrong gate."
- Your XNOR was built from two chips. Using your measured XOR data, prove (row by row) that the composite circuit had to produce the XNOR truth table.
- In Data Table 3, the "HIGH" output wasn't exactly 5.000 V, yet the logic worked perfectly. Explain how defined logic-level ranges make digital circuits immune to the small analog imperfections you measured β and why a floating input defeats that immunity.
- From Part 5: draw (or describe) how you would build an OR gate using only 74HC00 NAND gates. (Hint: De Morgan β invert both inputs first. How many NAND sections does it take?)
- A security-minded connection: XOR is the heart of stream ciphers and one-time pads because A β K β K = A. Using your measured XOR truth table, show why XORing with the same key twice returns the original bit.
Key Facts Reference Box
Interactive Knowledge Check
Six questions drawn directly from the lab. Select an answer for each, then press Grade My Quiz.