One gate type builds every circuit.
NAND gates alone (or NOR gates alone) can make AND, OR and NOT, and therefore any logic function. Ten minutes of reading, then build them.
Why NAND and NOR are universal
Every Boolean function can be written with AND, OR and NOT. So if one gate type can make all three, it can make anything. NAND and NOR can, and they are also the simplest and fastest gates to make in silicon, which is why real logic families are built on them.
AND, OR and NOT are enough for any function (sum of products).
A whole circuit from one 7400 means fewer chip types to stock and wire.
A sum of products drawn with NAND gates only keeps the same two level shape.
NOT from one gate
Tie both inputs of a NAND together: (A . A)' = A'. Tie both inputs of a NOR together: (A + A)' = A'. This is Figure 2c.
| A | B | X |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
X = (A . B)' · on the trainer: IC 7400
AND and OR from NAND gates
- AND (Figure 2a): a NAND gives (AB)'; a second NAND used as an inverter turns it back into AB.
- OR (Figure 2b): invert A and B with two NAND inverters, then NAND them: (A'B')' = A + B by De Morgan.
AND and OR from NOR gates
- OR: a NOR gives (A + B)'; a NOR inverter after it gives A + B.
- AND: invert A and B with two NOR inverters, then NOR them: (A' + B')' = A . B.
It is the same pattern with the roles of AND and OR swapped: that is the duality of Boolean algebra.
Bubbles and alternate symbols
A small circle (bubble) on a gate line means an inversion. An OR body with bubbles on both inputs and on the output computes ((A' + B'))' = A . B: it is an AND gate drawn the other way. Designers use these symbols so that bubbles meet bubbles and the active LOW signals are easy to follow.
OR body, bubbles in and out: the same as AND.
AND body, bubbles in and out: the same as OR.
OR body with input bubbles only: the same as NAND (and an AND body with input bubbles is NOR).
The two chips
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.
Watch the 7402: its outputs are on pins 1, 4, 10 and 13, not pins 3, 6, 8 and 11 as on the 7400. Wiring a 7402 like a 7400 joins outputs to switches.
Check yourself
Q1How many NAND gates make an OR gate?
Three: two as inverters and one NAND.
Q2How do you make a NOT gate from a NOR gate?
Join its two inputs and drive them with the signal.
Q3What is an AND body with bubbles on both inputs equal to?
A' . B' = (A + B)', a NOR gate.
Q4Why must every chip on the board be a 7400 in Task 1?
The task shows that NAND alone is enough; another chip type would break that rule.