N04_CMOS
N04_CMOS
1
2 An electrically-controllable switch?
Ideally, we would build logic gates out of electrically-controllable switches.
These are switches that we would be able to open and close by some
electrical control signal. This switch must be able to transition between
these the open and closed states quickly if the control signal changes. Such
a device must have three terminals: two for the current to flow between,
and one for control.
2
The basic function of a logic gate is to determine, based on the voltage
levels present at the inputs, if its output should be connected to the supply
voltage (1) or to ground (0). There is some network (circuit) connecting
the output node to the supply voltage through a series of switches, and
another network connecting the output node to ground. These are known
as a pull-up network and a pull-down network, respectively.
Figure 2: A logic gate has one decision to make: pull up to the supply
voltage, or pull down to ground? The output will be 1 or 0, respectively.
Each network is a circuit that makes the connections to pull Vout up or
down based on the inputs.
3
3 MOSFET
The MOSFET has three terminals: drain (D), source (S), and gate (G).
The conductivity of the material between the drain and source is controlled
by a voltage applied between the gate and source VGS . There are two main
varieties: NMOS (N-channel) and PMOS (P-channel). Briefly, the NMOS
transistor is ON when the gate voltage is high, and the PMOS transistor
is ON when the gate voltage is low.
D − S
VGS
+
G G
+
VGS
− S D
NMOS Transistor PMOS Transistor
Figure 3: NMOS (left) and PMOS (right) Transistors. The PMOS symbol
has a small circle at its gate to differentiate it from an NMOS. The control
signal is VGS , the voltage between the gate and source.
4
3.1 N-Channel MOSFET (NMOS)
The basic structure of an N-channel MOSFET is a pair of n-type semicon-
ductor wells embedded into a p-type bulk (sometimes called the body or
substrate). These wells are the source and drain. PN junctions between
the wells and bulk ensure that current cannot flow between the source and
drain, in either direction (see Note 03: Diodes).
5
In later courses, you will study more nuanced behavior for intermediate
values of VGS that enable analog signal amplification.
This time, a lower potential at the gate relative to the bulk will attract
positively-charged holes to the surface, providing a positive channel con-
necting the source to the drain with a high conductive path for current.2
This channel only forms if the gate is at a sufficiently lower po-
tential than the source. In 18-100, we consider this to be the case when
2
Electrons in the n-type bulk will be repelled from the gate, and will ultimately end up at the
source, which is at a higher potential than the gate.
6
the gate voltage is low (+0V) and the source voltage is high (+5V), the
opposite case from the NMOS.
7
4 NMOS Logic
In NMOS logic, NMOS transistors are used to form a pull-down network.
The counterweight for this NMOS pull-down network is a pull-up resistor.
If the NMOS pull-down network is inactive (i.e. if there is an open between
Vout and GND), there will be no current through the pull-up resistor. Since
there would be no voltage drop across the pull-up resistor, Vout would be
“pulled” up to +5V.
The simplest NMOS logic gate is the inverter, which uses one NMOS
transistor to pull Vout down when VA is high. When Vout is pulled low,
+5V drops across the pull-up resistor, so current is drawn and power is
consumed (recall P = I 2R). When VA is low, the NMOS transistor is off,
so there is no drop across the pull-up resistor and Vout = +5V.
+5V
Vout
D
G
VA
S
GND
8
5 Complementary MOS (CMOS) Logic
CMOS circuits naturally produce inverting logic. NMOS transistors in the
pull-down network are active when their inputs are high. Complementary
PMOS transistors in the pull-up network are active when their inputs are
low. The main advantage is low power consumption, because there is
hardly any current between +5V and GND in either output case. As you
read through this section, think about how you could build the basic logic
gates (AND, OR, XOR) from these inverting circuits.
S
+5V
G
D
VA Vout
D
G
S
GND
S S +5V
G G
VA VB
D D
D Vout
G
VA
S
D
G
VB
S
GND
10
5.3 CMOS NOR
In the CMOS NOR circuit:
S +5V
G
VA
D
S
G
VB
D
D D Vout
G G
VA VB
S S
GND
11
6 Glossary
• MOSFET: Metal-Oxide-Semiconductor Field-Effect Transistor. A
three-terminal device designed to control current flow. The voltage
between the Gate and Source terminals (VGS ) affects the current
that can pass between the Drain and Source (IDS ). A metal oxide
insulator electrically isolates the gate from the substrate (body) of
the transistor. When the potential difference between the gate and
source is sufficiently high, the resulting electric field attracts charge
carriers to the surface, creating a high-conductivity channel within
the substrate.
12