Module 2
Module 2
Semester 2/2024
Contents
1 Module 2 - Digital Circuitry and Interfacing - Basic Gates - Logic Families - Driving Loads 3
1.1 Digital Circuitry and Interfacing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1.1 Learning Outcomes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 Basic Gates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2.1 Describing the Operation of a Logic Circuit . . . . . . . . . . . . . . . . . . . . 4
1.2.1.1 The Logic Symbol . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.2.1.2 The Truth Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.2.1.3 The Logic Function . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.2.1.4 The Logic Waveform . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.2.2 The Buffer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.2.3 The Inverter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.2.4 The AND Gate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.2.5 The NAND Gate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.2.6 The OR Gate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.2.7 The NOR Gate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.2.8 The XOR Gate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.2.9 The XNOR Gate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.3 Digital Circuit Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.3.1 Logic Levels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.3.2 Output DC Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.3.3 Input DC Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
1.3.4 Noise Margins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
1.3.5 Power Supplies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
1.3.6 Switching Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
1.3.7 Data Sheets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
1.4 Logic Families . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
1.4.1 Complementary Metal-Oxide Semiconductors (CMOS) . . . . . . . . . . . . . . 24
1.4.1.1 CMOS Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
1.4.1.2 CMOS Inverter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
1.4.1.3 CMOS NAND Gate . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
1.4.1.4 CMOS NOR Gate . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
1.4.2 Transistor-Transistor Logic (TTL) . . . . . . . . . . . . . . . . . . . . . . . . . 33
1.4.2.1 TTL Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
1.4.3 The 7400 Series Logic Families . . . . . . . . . . . . . . . . . . . . . . . . . . 35
1.4.3.1 Part-Numbering Scheme . . . . . . . . . . . . . . . . . . . . . . . . 35
1.4.3.2 DC Operating Conditions . . . . . . . . . . . . . . . . . . . . . . . . 37
1.4.3.3 Pin-Out Information for the DIP Packages . . . . . . . . . . . . . . . 37
1.5 Driving Loads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
1
1.5.1 Driving Other Gates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
1.5.2 Driving Resistive Loads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
1.5.2.1 Primer on Ohm’s Law . . . . . . . . . . . . . . . . . . . . . . . . . . 41
1.5.3 Driving LEDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
1.6 Assignments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
2
Chapter 1
• Analyze the DC and AC behavior of a digital circuit to verify it is operating within specification.
• Describe the meaning of a logic family and the operation of the most common technologies used
today.
• Determine the operating conditions of a logic circuit when driving various types of loads.
3
1.2.1 Describing the Operation of a Logic Circuit
1.2.1.1 The Logic Symbol
A logic symbol is a graphical representation of the circuit that can be used in a schematic to show
how circuits in a system interface to one another. For the set of basic logic gates, there are uniquely
shaped symbols that graphically indicate their functionality. For more complex logic circuits that are
implemented with multiple basic gates, a simple rectangular symbol is used. Inputs of the logic circuit
are typically shown on the left of the symbol and outputs are on the right. Fig. 1.1 shows two example
logic symbols.
4
1.2.1.3 The Logic Function
A logic expression, (also called a logic function), is an equation that provides the functionality of each
output in the circuit as a function of the inputs. The logic operations for the basic gates are given a
symbolic set of operators (e.g., +, ., ⊕), the details of which will be given in the next sections. The logic
function describes the operations that are necessary to produce the outputs listed in the truth table. A
logic function is used to describe a single output that can take on only the values 1 and 0. If a circuit
contains multiple outputs, then a logic function is needed for each output. The input variables can be
included in the expression description just as in an analog function. For example, "F(A, B, C) = ..."
would state that "F is a function of the inputs A, B, and C". This can also be written as "FA,B,C =..."
The input variables can also be excluded for brevity as in "F = ...". Fig. 1.3 shows the formation of an
example 3-input logic expression.
5
Figure 1.4: Example logic waveform.
Figure 1.5: Buffer symbol, truth table, logic function, and logic waveform.
6
Figure 1.6: Inverter symbol, truth table, logic function, and logic waveform.
Figure 1.7: 2-input AND gate symbol, truth table, logic function, and logic waveform.
Ideal AND gates (In reality we cannot build or it is not efficient to build very large input AND gates)
can have any number of inputs. The operation of an n-bit, AND gates still follows the rule that the output
will only be true when all of the inputs are true. Later we will discuss the limitations on expanding the
number of inputs of these basic gates indefinitely.
7
Figure 1.8: 2-input NAND gate symbol, truth table, logic function, and logic waveform.
Figure 1.9: 2-input OR gate symbol, truth table, logic function, and logic waveform.
8
Figure 1.10: 2-input NOR gate symbol, truth table, logic function, and logic waveform.
Figure 1.11: 2-input XOR gate symbol, truth table, logic function, and logic waveform.
Using the formal definition of an XOR gate (i.e., the output is true if any of the input codes are
different from one another), an XOR gate with more than two inputs can be built. The truth table for
a 3-bit, XOR gate using this definition is shown in Fig. 1.12. In modern electronics, this type of gate
has found little use since it is much simpler to build this functionality using a combination of AND and
OR gates. As such, XOR gates with greater than two inputs do not implement the difference function.
Instead, a more useful functionality has been adopted in which the output of the n-bit, XOR gate is the
result of a cascade of 2-input XOR gates. This results in an ultimate output that is true when there is
an ODD number of 1’s on the inputs. This functionality is much more useful in modern electronics for
error correction codes and arithmetic. As such, this is the functionality that is seen in modern n-bit, XOR
gates. This functionality is also shown in Fig. 1.12.
9
Figure 1.12: 3-input XOR gate implementation.
Figure 1.13: 2-input XNOR gate symbol, truth table, logic function, and logic waveform.
10
In-class Question 1: Given the following logic diagram, which is the correct logic expression for
logic function F? [5min]
1. F = (A.B)0 ⊕ C
2. F = (A0 .B 0 ) ⊕ C
3. F = (A0 .B 0 ⊕ C)
4. F = A.B 0 ⊕ C
11
uses a voltage threshold (Vth ) to represent the switching point between the binary codes. If the voltage
of the signal (Vsig ) is above this threshold, it is considered a logic HIGH. If the voltage is below this
threshold, it is considered a logic LOW. A graphical depiction of this is shown in Fig. 1.15. The terms
HIGH and LOW are used to describe which logic level corresponds to the higher or lower voltage.
It is straightforward to have the HIGH level correspond to the binary code 1 and the LOW level
correspond to the binary code 0; however, it is equally valid to have the HIGH level correspond to the bi-
nary code 0 and the LOW level correspond to the binary code 1. As such, we need to define how the logic
levels HIGH and LOW map to the binary codes 1 and 0. We define two types of digital assignments:
positive logic and negative logic. In positive logic, the logic HIGH level represents a binary 1, and the
logic LOW level represents a binary 0. In negative logic, the logic HIGH level represents a binary 0,
and the logic LOW level represents a binary 1. Fig. 1.16 shows the definition of positive and negative
logic. There are certain types of digital circuits that benefit from using negative logic; however, we will
focus specifically on systems that use positive logic since it is more intuitive when learning digital design
for the first time. The transformation between positive and negative logic is straightforward and will be
covered later.
1. VOH-max
2. VOH-min
12
3. VOL-max
4. VOL-min
The VOH-max and VOH-min specifications provide the range of voltages the transmitter is guaranteed to
provide when outputting a logic HIGH (or logic 1 when using positive logic). The VOL-max and VOL-min
specifications provide the range of voltages the transmitter is guaranteed to provide when outputting a
logic LOW (or logic 0 when using positive logic). In the subscripts for these specifications, the "O"
signifies "output" and the "L" or "H" signifies "LOW" or "HIGH", respectively.
The maximum amount of current that can flow through the transmitter’s output (IO ) is also specified.
The specification IOH-max is the maximum amount of current that can flow through the transmitter’s output
when sending a logic HIGH. The specification IOL-max is the maximum amount of current that can flow
through the transmitter’s output when sending a logic LOW. When the maximum output currents are
violated, it usually damages the part. Manufacturers will also provide a recommended amount of current
for IO that will guarantee the specified operating parameters throughout the life of the part. Fig. 1.17
shows a graphical depiction of these DC specifications. When the transmitter output is providing current
to the receiving circuit (aka, the load), it is said to be sourcing current. When the transmitter output is
drawing current from the receiving circuit, it is said to be sinking current. In most cases, the transmitter
sources current when driving a logic HIGH and sinks current when driving a logic LOW. Fig. 1.17
shows a graphical depiction of these specifications.
13
1.3.3 Input DC Specifications
Receiving circuits provide specifications on the range of input voltages (VI ) that they will interpret as
either a logic HIGH or LOW. These are called the DC input specifications. There are four DC voltage
specifications that specify this range:
1. VIH-max
2. VIH-min
3. VIL-max
4. VIL-min
These specifications provide the range of voltages that the receiver will interpret as a logic HIGH (or
logic 1 when using positive logic). The VIL-max and VIL-min specifications provide the range of voltages
that the receiver will interpret as a logic LOW (or logic 0 when using positive logic). In the subscripts
for these specifications, the "I" signifies "input". The maximum amount of current that the receiver will
draw, or take in, when connected is also specified II ). The specification IIH-max is the maximum amount
of current that the receiver will draw when it is being driven with a logic HIGH. The specification IIL-max
is the maximum amount of current that the receiver will draw when it is being driven with a logic LOW.
Again, Fig. 1.17 shows a graphical depiction of these DC specifications.
14
N MH = VOH−min − VIH−min (1.1)
N ML = VIL−max − VOL−max (1.2)
Fig. 1.17 includes the graphical depiction of the noise margins. Notice in this figure that there is a
region of voltages that the receiver will not interpret as either a HIGH or LOW. This region lies between
the VIH-min and VIL-max specifications. This is the uncertainty region and should be avoided. Signals in
this region will cause the receiver’s output to go to an unknown voltage. Digital transmitters are designed
to transition between the LOW and HIGH states quickly enough so that the receiver does not have time
to react to the input being in the uncertainty region.
15
Example 1: Calculating ICC and IGND when sourcing multiple loads:
Given: The driver is specified to have a quiescent current of 1 mA and is driving a logic HIGH
on two of its output pins. Each of the two loads on the output pins is being sourced with 4 mA of
current from the driver.
Solution: The current into the device must equal the current out of the device. The quiescent current
of 1 mA is used for functional operation of the transistors within the transmitter and will flow into the
device through VCC pin and out of the device on the GND pin. The output currents that are being sourced
by the driver exit the circuit on the two output pins Vo(1) and Vo(2) . An equal amount of current must also
flow into the device Io(1) + Io(2) = 8mA, which enters the device on the VCC pin. This means the total
amount of current flowing into the circuit on the VCC pin is:
The total amount of current flowing out of the circuit on the GND pin is simply the quiescent current
Iq .
16
Check: Does the total amount of current entering the circuit equal the total amount of current exiting
the circuit?
Answer: Yes, there is 9 mA entering the circuit through the VCC pin. There is also 9 mA exiting the
circuit using the Vo(1) , Vo(2) , and GND pins.
Example 2: Calculating ICC and IGND when both sourcing and sinking loads:
Given: The driver is specified to have a quiescent current of 0.5 mA and is driving a logic HIGH
on one of its output pins and a logic LOW on two of its output pins. The driver is sourcing 1 mA
when driving a HIGH and 2 mA when driving a LOW.
Solution: The current into the device must be equal to the current out of the device. The quiescent
current of 0.5 mA enters the circuit on the VCC pin and exits on the GND pin. The output current for
Vo(1) enters the circuit on the VCC pin and exits the circuit on the Vo(1) pin. The output current for Vo(2)
and Vo(3) enters the circuit on the Vo(2) and Vo(3) pins and exits the circuit on the GND pin. This means
the total amount of current flowing into circuit on the VCC pin is:
17
The total amount of current flowing out of circuit on the GND pin is the quiescent current Iq plus the
current being sunk from the pins Vo(2) and Vo(3) :
18
Figure 1.18: Switching characteristics of a digital circuit.
19
Figure 1.19: Example data sheet excerpt (1).
20
Figure 1.20: Example data sheet excerpt (2).
21
Figure 1.21: Example data sheet excerpt (3).
In-class Question 2: Given the following DC specifications for a driver/receiver pair, in what situation
may a logic signal transmitted not be successfully received?
22
2. Driving a HIGH with Vo = +2.5 v
In-class Question 3: For the following driver configuration, which of the following is a valid con-
straint that could be put in place to prevent a violation of the maximum power supply currents (ICC-max
and IGND-max )?
1. Modify the driver transistors so that they can’t provide more than 5 mA on any output.
2. Apply a cooling system (e.g., a heat sink or fan) to the driver chip.
3. Design the logic so that no more than half of the outputs are HIGH at any given time.
In-class Question 4: Why is it desirable to have the output of a digital circuit transition quickly
between the logic LOW and logic HIGH levels?
1. So that the outputs are not able to respond as the input transitions through the uncertainty region.
This avoids unwanted transitions.
4. Because the system can only have two states, a LOW and a HIGH.
23
1.4 Logic Families
It is apparent from the prior discussion of operating conditions that digital circuits need to have compara-
ble input and output specifications in order to successfully communicate with each other. If a transmitter
outputs a logic HIGH as +3.4 v and the receiver needs a logic HIGH to be above +4 v to be successfully
interpreted as a logic HIGH, then these two circuits will not be able to communicate. In order to address
this interoperability issue, digital circuits are grouped into logic families. A logic family is a group
of parts that all adhere to a common set of specifications so that they work together. The logic family
is given a specific name, and once the specifications are agreed upon, different manufacturers produce
parts that work within the particular family. Within a logic family, parts will all have the same power
supply requirements and DC input/output specifications such that if connected directly, they will be able
to successfully communicate with each other. The phrase "connected directly" is emphasized because it
is very possible to insert an interconnect circuit between two circuits within the same logic family and
alter the output voltage enough so that the receiver will not be able to interpret the correct logic level.
Analyzing the effect of the interconnect circuit is part of the digital design process. There are many logic
families that exist (up to 100 different types!), and more emerge each year as improvements are made to
circuit fabrication processes that create smaller, faster, and lower power circuits.
24
associated with the power supply voltage. For example, a logic family may go by the name "+3.3 v
CMOS" or "+2.5 v CMOS". These names give a first-level description of the logic family operation, but
more details about the operation must be looked up in the data sheet. There are two types of transistors
used in CMOS. The transistors will be closed or open based on an input logic level. The first transistor is
called an N-type MOSFET, or NMOS. This transistor will turn on, or close, when the voltage between
the gate and source (VGS ) is greater than its threshold voltage. The threshold voltage (VT ) is the amount
of voltage needed to create a conduction path between the drain and the source terminals. The threshold
voltage of an NMOS transistor is typically between 0.2 v and 1 v and much less than the VCC voltage
in the system. The second transistor is called a P-type MOSFET, or PMOS. This transistor turns on,
or closes, when the voltage between the gate and the source (VGS ) is less than VT , where the VT for
a PMOS is a negative value. This means that to turn on a PMOS transistor, the gate terminal needs
to be at a lower voltage than the source. The type of transistor (i.e., P-type or N-type) has to do with
the type of semiconductor material used to conduct current through the transistor. An NMOS transistor
uses negative charge to conduct current (i.e., negative-type), while a PMOS uses positive charge (i.e.,
positive-type). Fig. 1.22 shows the symbols for the PMOS and NMOS, the fabrication cross sections,
and their switch-level equivalents.
Figure 1.22: Complementary Metal Oxide Field Effect Semiconductor (CMOS) Transistor.
The basic operation of CMOS is that when driving a logic HIGH, the switches are used to connect
the output to the power supply (VCC ), and when driving a logic LOW, the switches are used to connect
the output to GND. In CMOS, VCC is considered an ideal logic HIGH and GND is considered an ideal
logic LOW. VCC is typically much larger than VT so using these levels can easily turn on and off the
transistors. The design of the circuit must never connect the output to VCC and GND at the same time or
else the device itself will be damaged due to the current flowing directly from VCC to GND through the
transistors.
Due to the device physics of the MOSFETS (We will discuss the details of this later on), PMOS tran-
sistors are used to form the network that will connect the output to VCC (aka, the pull-up network), and
25
NMOS transistors are used to form the network that will connect the output to GND (aka, the pull-down
network). Since PMOS transistors are closed when the input is a 0 (thus providing a logic HIGH on
the output) and NMOS transistors are closed when the input is a 1 (thus providing a logic LOW on the
output), CMOS implements negative logic gates. This means CMOS can implement inverters, NAND
and NOR gates, but not buffers, AND and OR gates, directly. In order to create a CMOS AND gate, the
circuit would implement a NAND gate followed by an inverter and similarly for an OR gate and buffer.
The inputs of both the PMOS and NMOS are connected together. The PMOS is used to connect the
output to VCC , and the NMOS is used to connect the output to GND. Since the inputs are connected
together and the switches operate in a complementary manner, this circuit ensures that both transistors
will never be on at the same time. When In = 0, the PMOS switch is closed and the NMOS switch is
open. This connects the output directly to VCC , thus providing a logic HIGH on the output. When In =
1, the PMOS switch is open and the NMOS switch is closed. This connects the output directly to GND,
thus providing a logic LOW. This configuration yields an inverter. This operation is shown graphically
in Fig. 1.24.
26
Figure 1.24: CMOS Inverter Operation.
The pull-down network consists of two NMOS transistors in series (M1 and M2), and the pull-up
network consists of two PMOS transistors in parallel (M3 and M4). Let’s go through each of the input
27
conditions and examine which transistors are on and which are off and how they impact the output. The
first input condition is when A = 0 and B = 0. This condition turns on both M3 and M4 creating two
parallel paths between the output and VCC . At the same time, it turns off both M1 and M2 preventing
a path between the output and GND. This input condition results in an output that is connected to VCC
resulting in a logic HIGH. The second input condition is when A = 0 and B = 1. This condition turns
on M3 in the pull-up network and M2 in the pull-down network. This condition also turns off M4 in the
pull-up network and M1 in the pull-down network. Since the pull-up network is a parallel combination
of PMOS transistors, there is still a path between the output and V CC through M3. Since the pull-down
network is a series combination of NMOS transistors, both M1 and M2 must be on in order to connect
the output to GND. This input condition results in an output that is connected to V CC resulting in a
logic HIGH. The third input condition is when A = 1 and B = 0. This condition again provides a path
between the output and VCC through M4 and prevents a path between the output and ground by having
M2 open. This input condition results in an output that is connected to V CC resulting in a logic HIGH.
The final input condition is when A = 1 and B = 1. In this input condition, both of the PMOS transistors
in the pull-up network (M3 and M4) are off preventing the output from being connected to VCC . At the
same time, this input turns on both M1 and M2 in the pull-down network connecting the output to GND.
This input condition results in an output that is connected to GND resulting in a logic LOW. Based on
the resulting output values corresponding to the four input codes, this circuit yields the logic operation
of a 2-input NAND gate. This operation is shown graphically in Fig. 1.26.
28
Figure 1.26: CMOS 2-Input NAND Gate Operation.
Creating a CMOS NAND gate with more than two inputs is accomplished by adding additional
PMOS transistors to the pull-up network in parallel and additional NMOS transistors to the pull-down
network in series. Fig. 1.27 shows the schematic for a 3-input NAND gate. This procedure is followed
for creating NAND gates with larger numbers of inputs.
29
Figure 1.27: CMOS 3-Input NAND Gate Schematic.
If the CMOS transistors were ideal switches, the approach of increasing the number of inputs could
be continued indefinitely. In reality, the transistors are not ideal switches, and there is a limit on how
many transistors can be added in series and continue to operate. The limitation has to do with ensuring
that each transistor has enough voltage to properly turn on or off. This is a factor in the series network
because the drain terminals of the NMOS transistors are not all connected to GND. If a voltage develops
across one of the lower transistors (e.g., M3), then it takes more voltage on the input to turn on the next
transistor up (e.g., M2). If too many transistors are added in series, then the uppermost transistor in the
series may not be able to be turned on or off by the input signals. The number of inputs that a logic gate
can have within a particular logic family is called its fan-in specification. When a logic circuit requires
a number of inputs that exceed the fan-in specification for a particular logic family, then additional logic
gates must be used. For example, if a circuit requires a 5-input NAND gate but the logic family has a
fan-in specification of 4, this means that the largest NAND gate available only has 4-inputs. The 5-input
NAND operation must be accomplished using additional circuit design techniques that use gates with 4
or less inputs. These design techniques will be covered in upcoming weeks.
30
Figure 1.28: CMOS 2-Input NOR Gate Schematic.
The series configuration of the pull-up network will only connect the output to VCC when both inputs
are 0. Conversely, the pull-down network prevents connecting the output to GND when both inputs are
0. When either or both of the inputs are true, the pull-up network is off, and the pull-down network is
on. This yields the logic function for a NOR gate. This operation is shown graphically in Fig. 1.29. As
with the NAND gate, the number of inputs can be increased by adding more PMOS transistors in series
in the pull-up network and more NMOS transistors in parallel in the pull-down network.
31
Figure 1.29: CMOS 2-Input NOR Gate Operation.
The schematic for a 3-input NOR gate is given in Fig. 1.30. This approach can be used to increase
the number of inputs up until the fan-in specification of the logic family is reached.
32
Figure 1.30: CMOS 3-Input NOR Gate Schematic.
33
Figure 1.31: Bipolar Junction Transistor- PNP and NPN transistors.
Fig. 1.32 shows a simplified model of how TTL logic operates using BJTs and resistors. This
simplified model does not show all of the transistors that are used in modern TTL circuits but instead is
intended to provide a high-level overview of the operation. This gate is an inverter that is created with an
NPN transistor and a resistor. When the input is a logic HIGH, the NPN transistor turns on and conducts
current between its collector and emitter terminals. This in effect closes the switch and connects the
output to GND providing a logic LOW. During this state, current will also flow through the resistor to
GND through Q1, thus consuming more power than the equivalent gate in CMOS. When the input is a
logic LOW, the NPN transistor turns off and no current flows between its collector and emitter. This, in
effect, is an open circuit leaving only the resistor connected to the output. The resistor pulls the output up
to VCC providing a logic HIGH on the output. One drawback of this state is that there will be a voltage
drop across the resistor, so the output is not pulled fully to VCC .
34
Figure 1.32: TTL Inverter - BJT Inverter Operation (Simplified).
35
1. Manufacturer
2. Temperature Range
3. Logic Family
4. Logic Function
5. Package Type
36
1.4.3.2 DC Operating Conditions
Fig. 1.34 gives the DC operating conditions for a few of the logic families within the 7400 series. Notice
that the CMOS families consume much less power than the TTL families. Also notice that the TTL
output currents are asymmetrical (Look at IOMAX(H/L) column). The differences between the IOH and
IOL within the TTL families have to do with the nature of the bipolar transistors and the resistors used
to create the pull-up networks within the devices. CMOS has symmetrical drive currents due to using
complementary transistors for the pull- up (PMOS) and pull-down networks (NMOS).
Figure 1.34: DC operating conditions for a sample of 7400 series logic families.
37
Figure 1.35: Pin-outs for a subset of basic gates from the 74HC logic family in DIP packages.
38
In-class Question 5: Why doesn’t the following CMOS transistor configuration yield a buffer?
1. In order to turn on the NMOS transistor, VGS needs to be greater than zero. In the given configu-
ration, the gate terminal of the NMOS (G) needs to be driven above the source terminal (S). If the
source terminal was at +3.4 v, then the input (In) would never be able to provide a positive enough
voltage to ensure the NMOS is on because "In" doesn’t go above +3.4 v.
3. The power consumption will damage the device because both transistors will potentially be on.
4. The sources of the two devices can’t be connected together without causing a short in the device.
39
Example 3: Determining if specifications are violated when driving another gate as a load.
Given: 74HC04 Specifications:
• II-max = 1 uA
• Iq = 20 uA
• IO-max = 25 mA
• ICC-max = 50 mA
Solution: The maximum input current of the load (e.g., the receiving inverter) is 1 uA. This means
that IO for the driver will be 1 uA because the load sets the output current. This is far below the maximum
output current of 25 mA so the IO-max specification is not violated.
The driver will draw Iq through its VCC pin to power its functional operation. In addition to Iq the
driver will also pull a current equal to IO through the VCC pin while driving a logic HIGH. This means
the maximum current pulled through the VCC pin is Iq + IO = 20 uA + 1 uA = 21 uA. Again, this is well
below the specification for the maximum amount of current that can flow through the VCC pin (50 mA)
so the ICC-max specification is also not violated.
From this example, it is clear that there are no issues when a gate is driving another gate from the
same family. This is as expected because that is the point of a logic family. In fact, gates are designed
to drive multiple gates from within their own family. Based solely on the DC specifications for input
and output current, it could be assumed that the number of other gates that can be driven is simply IO-max
divide by II-max . For the example in Example 3, this would result in a 74HC gate being able to drive
25,000 other gates (i.e., 25 mA/1 uA = 25,000). In reality, the maximum number of gates that can be
driven is dictated by the switching characteristics. This limit is called the fan-out specification. The
fan-out specification states the maximum number of other gates from within the same family that can be
driven.
As discussed earlier, the output signal needs to transition quickly through the uncertainty region so
that the receiver does not have time to react and go to an unknown state. As more and more gates are
driven, this transition time is slowed down. The fan-out specification provides a limit to the maximum
number of gates from the same family that can be driven while still ensuring that the output signal
transitions between states fast enough to avoid the receivers from going to an unknown state. Example 4
40
shows the process of determining the maximum output current that a driver will need to provide when
driving the maximum number of gates allowed by the fan-out specification.
Example 4: Determining the output current when driving multiple gates as the load.
Given specifications:
• Fan-out = 3
• II-max = 1 uA
Find: IO .
Solution: The fan-out specification is 3, which means that the transmitting inverter can drive up to
3 other gates from its own logic family. Each of the receivers will draw their input current of II = 1 uA,
which will be provided by the driver. Therefore, the total amount of output current from the driver is
3 × 1 uA = 3 uA.
41
Figure 1.36: Ohm’s Law.
A resistor is characterized by its resistance, which describes how much current will flow when a
voltage is present across its two terminals. The units of resistance are Ohms (Ω = Volts / Amp). The
current in Ohm’s Law is defined to flow from + to - of the voltage.
Example 5: Use Ohm’s Law to to find the current flowing through the following resistor.
V =I ×R (1.7)
3.4 = I × (1 k) (1.8)
I = 0.0034 A = 3.4 mA (1.9)
Let’s see how we can use Ohm’s law to analyze the impact of a resistive load in a digital circuit.
Consider the circuit configuration in Example 6 and how we can use Ohm’s law to determine the output
current of the driver. The load in this case is a resistor connected between the output of the driver and
the power supply (+5 v). When driving a logic HIGH, the output level will be approximately equal to
the power supply (i.e., +5 v). Since in this situation both terminals of the resistor are at +5 v, there is
no voltage difference present. That means when plugging into Ohm’s law, the voltage component is 0 v,
which gives 0 amps of current. In the case where the driver is outputting a logic LOW, the output will be
approximately GND. In this case, there is a voltage drop of +5 v across the resistor (5 v – 0 v). Plugging
this into Ohm’s law yields a current of 50 mA flowing through the resistor. This can become problematic
because the current flows through the resistor and then into the output of the driver. For the 74HC logic
family, this would exceed the IO-max specification of 25 mA and damage the part. Additionally, as more
current is drawn through the output, the output voltage becomes less and less ideal. In this example, the
first-order analysis uses VO = GND. In reality, as the output current increases, the output voltage will
move further away from its ideal value and may eventually reach a value within the uncertainty region.
42
Example 6: Determining the output current when driving a pull-up resistor as the load.
Give: The following circuit configuration:
Find: IO .
Solution: We need to solve for when the driver outputs both a HIGH and a LOW.
A similar process can be used to determine the output current when driving a resistive load between
the output and GND. This process is shown in Example 7.
43
Example 7: Determining the output current when driving a pull-down resistor as the load.
Give: The following circuit configuration:
Find: IO .
Solution: We need to solve for when the driver outputs both a HIGH and a LOW.
44
that flows from the anode to the cathode is called the forward current. A voltage that is developed across
a diode from its anode to cathode is called the forward voltage. A diode has a unique characteristic that
when a forward voltage is supplied across its terminal, it will only increase up to a certain point. The
amount is specified as the LED’s forward voltage (Vf ) and is typically between 1.5 v and 2 v in modern
LEDs. When a power supply circuit is connected to the LED, no current will flow until this forward
voltage has been reached. Once it has been reached, current will begin to flow, and the LED will prevent
any further voltage from developing across it. Once current flows, the LED will begin emitting light. The
more current that flows, the more light that will be emitted up until the point that the maximum allowable
current through the LED is reached and then the device will be damaged. When using an LED, there
are two specifications of interest: the forward voltage and the recommended forward current. The
symbols for a diode and an LED are given in Fig. 1.37.
When designing an LED driver circuit, a voltage must be supplied in order to develop the forward
voltage across the LED so that current will flow. A resistor is included in series with the LED for two
reasons. The first reason is to provide a place for any additional voltage provided by the driver to develop
in the situation that VO > Vf , which is most often the case. The second reason for the resistor is to set
the output current. Since the voltage across the resistor will be a fixed amount (i.e., VO – Vf ), then the
value of the resistor can be chosen to set the current. This current is typically set to an optimum value
that turns on the LED to a desired luminosity while also ensuring that the maximum output current of
the driver is not violated. Consider the LED driver configuration shown in Example 8 where the LED
will be turned on when the driver outputs a HIGH.
45
Example 8: Determining the output current when driving an LED where HIGH = ON.
Given:
Vf = +2v
If (rec) = 10mA
Find: R to achieve the recommended forward current of 10mA through the LED.
Solution:When the driver outputs a logic LOW, it will provide VO =O v. This means there will be no
voltage that develops across the series combination of the resistor and LED. Since there is not enough
voltage to meet the forward voltage requirements of the LED, no current will flow and the LED will be
OFF.
When the driver outputs a logic HIGH, it will provide VO =+5 v. This voltage will develop across
the series combination of the resistor and LED. The LED will increase up to its forward voltage of +2
v and then remain there. The rest of the output voltage will develop across the resistor (e.g., +3 v). We
can choose the value of the resistor to set the current that will flow through the series combination using
Ohm’s Law since we know the voltage across the resistor and the desired current. In this case, the LED
will be ON when the driver outputs a logic HIGH.
V = I.R
3 = (10mA).R
R = 300Ω
46
Example 9: Determining the output current when driving an LED where LOW = ON.
Given:
Vf = +1.8v
If (rec) = 4mA
Solution:When the driver outputs a logic HIGH, it will provide VO =+3.4 v. This means there will
be no voltage that develops across the series combination of the resistor and LED. Since there is also at
+3.4 v. when driving a logic HIGH the LED will be OFF.
When the driver outputs a logic LOW, it will provide VO =0 v. Since the resistor is tied to +3.4 v, this
voltage will develop across the series combination of the resistor and LED. The LED will increase up to
its forward voltage of +1.8 v and then remain there. The rest of the output voltage will develop across
47
the resistor (e.g., +1.6 v). We can choose the value of the resistor to set the current that will flow through
the series combination using Ohm’s Law since we know the voltage across the resistor and the desired
current. In this case, the LED will be ON when the driver outputs a logic LOW.
V = I.R
1.6v = (4mA).R
R = 400Ω
In-class Question 6: A fan-out specification is typically around 6–12. If a logic family has a maxi-
mum output current specification of IO-max = 25 mA and a maximum input current specification of only
II-max + 1 uA, a driver could conceivably source up to 25,000 gates (IO-max / II-max = 25 mA/ 1 uA =
25,000) without violating its maximum output current specification. Why isn’t the fan-out specification
then closer to 25,000?
1. The fan-out specification has significant margin built into it in order to protect the driver.
2. Connecting 25,000 loads to the driver would cause significant wiring congestion and would be
impractical.
4. The fan-out specification is in place for AC behavior. It ensures that the AC loading on the driver
doesn’t slow down its output rise and fall times. If too many loads are connected, the output
transition will be too slow, and it will reside in the uncertainty region for too long leading to
unwanted switching on the receivers.
48
1.6 Assignments
1. Give the truth table for a 3-input AND gate with the input variables A, B, C and output F.
2. Give the truth table for a 3-input XNOR gate with the input variables A, B, C and output F.
3. Give the logic expression for a 3-input AND gate with the input variables A, B, C and output F.
4. Give the logic expression for a 3-input OR gate with the input variables A, B, C and output F. Give
the logic waveform for a 3-input AND gate with the input variables A, B, C and output F. Give the
logic waveform for a 3-input XNOR gate with the input variables A, B, C and output F.
5. Using the DC operating conditions from Table 1.34, give the noise margin HIGH (NMH ) for the
74LS logic family.
6. Using the DC operating conditions from Table 1.34, give the noise margin LOW (NML ) for the
74LS logic family.
7. Using the DC operating conditions from Table 1.34, give the noise margin HIGH (NMH ) for the
74HC logic family with VCC = +5 v.
8. Using the DC operating conditions from Table 1.34, give the noise margin LOW (NML ) for the
74HC logic family with VCC = +5 v.
9. For the driver configuration in Fig. 1.38, give the current flowing through the GND pin.
10. For the driver configuration in Fig. 1.38, give the current flowing through the VCC pin.
11. Using the data sheet excerpt from Fig. 1.21, give the maximum propagation delay (tpd ) for the
74HC04 inverter when powered with VCC = +2 v.
49
12. Using the data sheet excerpt from Fig. 1.21, give the maximum propagation delay from low to high
(tPLH ) for the 74HC04 inverter when powered with VCC = +2 v. Note: When tpd is given instead of
tPHL and tPLH , that means the propagation delay is symmetrical (e.g., the delay is the same whether
the output goes from a LOW to HIGH or HIGH to LOW).
13. Using the data sheet excerpt from Fig. 1.21, give the maximum propagation delay from high to
low (tPHL ) for the 74HC04 inverter when powered with VCC = +2 v.
14. Using the data sheet excerpt from Fig.1.21, give the maximum transition time (tt ) for the 74HC04
inverter when powered with VCC = +2 v.
15. Using the data sheet excerpt from Fig. 1.21, give the maximum rise time (tr ) for the 74HC04
inverter when powered with VCC = +2 v. Note: When tt is given instead of tr and tf , that means the
transition time is symmetrical (e.g., the 10%-90% transition time is the same whether the output
goes from a LOW to HIGH or HIGH to LOW).
16. Using the data sheet excerpt from Fig. 1.21, give the maximum fall time (tf ) for the 74HC04
inverter when powered with VCC = +2 v.
17. Using the data sheet excerpt from Fig. 1.21, give the maximum propagation delay (tpd ) for the
74HC04 inverter when powered with VCC = +6 v.
20. Provide the transistor-level schematic for the 2-input AND Gate in CMOS.
21. Provide the transistor-level schematic for the 2-input OR Gate in CMOS.
23. In the driver configuration shown in Fig. 1.39, the buffer is driving its maximum fan-out specifi-
cation of 6. The maximum input current for this logic family is II = 1 nA. What is the maximum
output current (IO ) that the driver will need to source?
50
24. Calculate the value of the resistor shown in Fig. 1.40 in order to ensure that the output (IO ) does
not exceed 20 mA.
25. For the driver configuration shown in Fig. 1.41, calculate the values of the resistor in order to set
the LED forward current to 5 mA. The LEDs have a forward voltage of 1.9 v.
26. Calculate the value of the resistor shown in Fig. 1.42 in order to ensure that the forward current
does not exceed 5 mA and a voltage drop of 1.9 v.
51
52