SEARCH THE BUSINESS GLOSSARY
(Figure 182) a logic gate whose output is 1 if the input is 0, and vice versa, thus:
A NOT gate is also called an inverter because it reverses the value of its input.
(Figure 186) a logic gate whose output is 1 when either or both of the inputs is 1, as shown in the table:
electronic circuits that accept binary digits (bits) as inputs and produce an output bit according to a specified rule. For examples see
A typical computer represents 1 (logic "true") as +5 volts and 0 as 0 volts. More precisely, 1 is represented by a connection to the +5-volt power supply (directly or through a resistance), and 0 is represented by a connection to ground. Note that 0 is not merely the absence of a voltage; logic circuits differ as to how they handle an unconnected input.
Basically, logic circuits are switching circuits. Figure 160(A) shows a NOT gate implemented as a switch. The output is +5 volts (binary 1, logic "true") whenever the switch is not closed. (When the switch is closed, the resistor dissipates the voltage and the output is connected to ground.) That is, the output is the negation of the state of the switch.
For this to be usable in a computer, the switching has to be controlled by an electrical signal. Figure 160(B) shows what happens when the switch is replaced by a switching transistor. The transistor conducts when its base is at least 0.6 volts above ground (i.e., when its input is binary 1). When the transistor is conducting, the effect is the same as the closed switch, and the output is 0. Thus, the output is the negation of the input, and the NOT gate works correctly.
Figure 161 shows how to build a NAND gate out of two diodes, two resistors, and a transistor. This circuit is very similar to what is used inside TTL integrated circuits. The output is 0 ("false") if and only if both of the inputs are binary 1 (+5 volts). In that situation, the diodes do not conduct, the base of the transistor receives current through the resistor, and the transistor conducts. But if even one of the inputs is binary 0 (connected to ground), the base of the transistor is held low and the transistor does not conduct, so the output is binary 1. To understand this circuit, it is very important to remember that binary 0 is represented by a connection to ground, not merely the absence of a voltage. Like real TTL ICs, this circuit happens to treat disconnected inputs as binary 1.
NAND gates are important because all the other gates can be built from them (Figure 162).A NOT gate is simply a NAND gate with only one input, or with all its inputs tied together; an AND gate is a NAND gate followed by a NOT gate; and so on. In a similar way, all the types of gates can be built from NOR gates.
Instead of TTL circuits, newer ICs use CMOS (complementary metal-oxide semiconductor) switching transistors, which come in pairs that respond to opposite polarities, so that one switches off whenever the other switches on. This makes it easy to connect the output either to +5 volts or to ground depending on the input. However, the circuits inside practical CMOS gates are too complicated to diagram here.
an electronic device that allows a small current in one place to control a larger current in another place; thus, transistors can be used as amplifiers in radio and audio circuits, and as switches in logic gates (see
A bipolar transistor is made by sandwiching a thin layer of one kind of semiconductor material (P-type or N-type) between two layers of the opposite type (N-type or P-type, respectively). Thus, an NPN transistor is a P layer between two N layers; a PNP transistor is the opposite. (See
Figure 276 shows how an NPN transistor works. (A PNP transistor works the same way with all polarities reversed.) The emitter is connected to ground (0 volts), and the collector is connected to +5 volts through some type of load. Electrons try to flow from emitter to collector, but with 0 volts on the base, they can't get through because the base-collector junction is like a reverse-biased diode (see
But if the base were to become full of electrons, it would no longer behave like P-type material, and the base-collector junction would no longer block electron flow.We can get electrons into the base by pulling them in from the emitter. Thus if we apply a positive voltage to the base in order to forward-bias the base-emitter junction, the base-collector junction will become free to conduct.A small flow of electrons through the base controls a much larger flow of electrons through the collector.
In computers, transistors act as switches. The current flowing through the base controls the current flowing through the collector, turning it on or off under external control. See
a logic gate that produces an output of 1 only when all of its inputs are 1, thus:
The symbol for an AND gate is shown in Figure 9.
AND gates are used in computer arithmetic. In addition, AND gates with more than two inputs are used to recognize signals coming in simultaneously on several wires, such as memory addresses.
(Figure 176) a logic gate whose output is 0 if both of the inputs are 1, and is 1 otherwise, thus:
A NAND gate is equivalent to an AND gate followed by a NOTgate. NAND gates are important because all the other types of logic circuits can be built out of them.