THE NAND GATE
The NAND gate is an electronic circuit that performs alternative denial (i.e. “not both”). The output of the NAND Boolean operator is false only when both of the inputs are true. Otherwise, the output is true.
It is often helpful to think of NAND as not both, as in the sentence not both Natalie and Katy are engineers.
The following analysis clarifies the meaning of the NAND operator. Consider the statement not both math and biology are tested on the final board. We could say neither math nand biology are tested on the final board, but such is not a currently acceptable English usage of the word NAND; so bear with not both.
For each of the two subjects, math and biology, there are two possibilities: either a subject is tested or it is not tested. As such there are four possible conditions, as in Table 1.
Having listed the possibilities, we proceed to evaluate the original statement using the four cases. The truth we are analyzing for is not both, so as long as we can answer not both the case is true. We show the complete evaluation in Table 2 below. Observe that the final board can be structured as any of the first three cases. Only the last case cannot be the final board, since we are guaranteed that not both will be tested.
Observe further that not both does not necessarily mean one of them. If I tell you not both slices of pizza are for you, that does not necessarily mean one of them is yours. Maybe you get none.
An important discovery about the word NAND is that it can express all logical operations. In other words, if you become good at using the word NAND, then you will never need to use any of the operators AND, OR, NOT to adequately express yourself. To see how the NAND gate is used to construct all the other logic gates, see the Universal Gates pages. Also, the Boolean algebra article offers greater detail on the logic significance of the word NAND.
It is typical in engineering to use 1 instead of TRUE and 0 instead of FALSE. Hence, we rewrite Table 2 as Table 3 below.
In order to apply the principles of Boolean algebra to create real machines that can think and make decisions, we have had to find ways to physically implement the logic operators AND, OR, NOT, etc. To that end, modern day engineering uses transistor networks called logic gates. Hence, a logic gate is actually a group of transistors so arranged as to behave as a Boolean operator.
From a circuit complexity perspective, the most basic logic gate is the NOT gate (aka the Inverter). The NOT gate is made of two transistors, as shown in Figure 1. The next most basic logic gate is the NAND gate, which is effectively two Inverters as shown in Figure 2. Hence, we only need four transistors to build a NAND gate.
The use of transistors to build logic gates is quite modern. Before transistors we used other devices, such as vacuum tubes (aka thermionic valves). And very soon we may use DNA, or some other abundant material. There are many types of transistors. Our circuits in figures 1 and 2, for example, use complementary metal–oxide semiconductor (CMOS) technology. Our choice of CMOS is arbitrarily based on the fact that CMOS is by far the dominant technology in use today. The dominance is due to how well CMOS performs in all the important categories: fabrication cost, packing density, loading capacity (i.e. fan–out), operational speed (i.e. propagation delay), noise margin, and power dissipation (i.e. green technology).
There is of course more to transistors than can be presented here; especially since transistors are used for more than just digital systems. And so we refer you to any good micro–electronics textbook.
Below we show two additional typical constructions of the NAND gate. Each of the constructions presents specific conveniences to designers. If you are very new to digital systems design, you may not understand the importance of the figures below. Still, we include them in this article for the people who may need them.