The six gates and the first theorems.
Fifteen minutes of reading. Play with the gates below; then the trainer, the breadboard and the chips will feel familiar.
Binary logic
A digital signal has two values: 1 (HIGH, true) and 0 (LOW, false). A logic gate takes one or more such inputs and gives an output that depends only on the present inputs. The truth table lists the output for every combination of inputs: two inputs have 2 x 2 = 4 rows, three inputs 8 rows, n inputs 2n rows.
On the trainer a logic switch at 1 gives +5 V and at 0 gives 0 V. An LED lights for a 1.
Every new input doubles the truth table. List the rows in binary order: 00, 01, 10, 11.
The 74 series TTL chips each hold a few identical gates: four two input gates, or six inverters.
The six gates
AND gives 1 only when all inputs are 1. OR gives 1 when any input is 1. NOT inverts. NAND and NOR are AND and OR followed by NOT (the small circle on the symbol). XOR gives 1 when the inputs differ. Click the inputs:
| A | B | X |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
X = A . B · on the trainer: IC 7408
The trainer
The digital logic trainer supplies everything around the chips: a +5 V supply, 16 logic switches (S0 to S15) for inputs, 16 LEDs (L0 to L15) for outputs, push switches, toggle switches, a clock, a seven segment display and a voltmeter. Each switch and LED has gold header holes; you wire from those holes to the breadboard.
- Any switch S0 to S15 and any LED L0 to L15 works the same; the steps suggest S2 to S9.
- Wire with the power off when you can, then switch POWER on and test.
- In the virtual lab, hover over any hole to see what it is joined to and its level.
The breadboard
Click a hole. Green holes are joined to it inside the board: a column of five (a to e, or f to j), or a whole rail row. The channel in the middle separates the two halves, so a chip straddling it has every pin on its own column.
Chip pins and power
Hold the chip with its notch on the left. Pin 1 is at the bottom left, the pins count up to the right, then continue along the top from right to left. Most 14 pin chips have VCC on pin 14 and GND on pin 7, but not all: check every new chip.
A chip works only when it has power: +5 V on VCC and 0 V on GND. For every chip in this lab that is pin 14 and pin 7. The easiest way: wire +5 V and GND to the red and blue rails of the breadboard once, then each chip's VCC and GND to the rails.
TTL voltage levels
Reads as HIGH: logic 1. A gate output gives about 3.4 V for 1 and 0.2 V for 0, so there is room for noise on both sides.
An input that is not connected (floating) acts as a 1 on TTL chips, which often hides a missing wire. Never leave an input you use floating: wire it to a switch, to +5 V or to GND.
Boolean theorems
Absorption: if A is 1 the output is 1; if A is 0, A.B is 0 too. B never matters.
The dual form: swap AND and OR. Again the output just follows A.
And A.A' = 0. With A + 0 = A and A.1 = A these let you simplify any expression.
In Task 3 you prove absorption with real gates: two chips are enough, and the output LED copies switch A whatever switch B does.
De Morgan's laws
Break the bar and change the sign. In Tasks 4a and 4b you build both sides of each law on two LEDs and watch them agree on every row.
Faults to avoid
- No power: a chip without VCC or GND does nothing; its outputs stay dark.
- Reversed supply: +5 V on pin 7 and GND on pin 14 destroys the chip (on the bench and here).
- 12 V: the +12 V post is not for TTL chips. One touch on VCC or an input damages the chip.
- Outputs joined: two outputs on one wire, or an output wired to +5 V or GND, fight and overheat.
- +5 V wired to GND: the trainer supply trips. Remove the wire.
Check yourself
Q1A 7408 has 14 pins. How many AND gates does it have, and which pins are VCC and GND?
Four two input AND gates. VCC is pin 14 and GND is pin 7.
Q2Which gate gives 1 when its two inputs are different?
XOR (exclusive OR), the 7486.
Q3You wired an AND gate but the LED stays on for every row. What could be wrong?
An input may be floating (it reads 1), or the LED is wired to a switch instead of the gate output.
Q4Simplify A + A.B.
A (absorption).
Q5Write (A . B)' with De Morgan.
A' + B'.