Chips, Ahoy! 183
Experiment 19: Learning Logic
The 74HC00 actually contains four NAND gates, each with two logical inputs
and one output. They are arrayed as shown in Figure 4-49. Because only one
gate was needed for the simple test, the input pins of the unused gates were
shorted to the negative side of the power supply.
Pin 14 supplies positive power for the chip; pin 7 is its ground pin. Almost
all the 7400 family of logic chips use the same pins for positive and negative
power, so you can swap them easily.
In fact, let’s do that right now. First, disconnect the power. Carefully pull out
the 74HC00 and put it away with its legs embedded in conductive foam. Sub-
stitute a 74HC08 chip, which is an AND chip. Make sure you have it the right
way up, with its notch at the top. Reconnect the power and use the pushbut-
tons as you did before. This time, you should find that the LED comes on if
the first input AND the second input are both positive, but it remains dark
otherwise. Thus, the AND chip functions exactly opposite to the NAND chip.
Its pinouts are shown in Figure 4-50.
You may be wondering why these things are useful. Soon you’ll see that we
can put logic gates together to do things such as create an electronic com-
bination lock, or a pair of electronic dice, or a computerized version of a TV
quiz show where users compete to answer a question. And if you were really
insanely ambitious, you could build an entire computer out of logic gates.
7400
Quad
2-Input
NAND gate
3
4
1
2
14
13
12
11
6
7
10
9
8
5
Figure 4-49. The pinouts of the logic gates in a 74HC00chip.
7408
Quad
2-Input
AND gate
3
4
1
2
14
13
12
11
6
7
10
9
8
5
Figure 4-50. The pinouts of the logic gates in a 74HC08chip.
Figure 4-48. The structure and function of
the NAND gate is easier to visualize with
this simplified schematic that omits the
power supply for the chip and doesn’t
attempt to place the wires to fit a bread-
board layout.