Digital Electronics Module 03
Digital Electronics Module 03
3 www.learnabout-electronics.org
Digital Electronics
3.0 Introduction to Logic Families
What you´ll learn in Module 3
technology. However as these ICs developed, at first as SSI (small scale integrated) devices, with
just a few transistors per chip, and then as MSI (medium scale integrated) devices with 100 or more
transistors, a problem arose that as more gates (and therefore more transistors) were packed into a
single IC, the scale of integration would be limited by the power dissipation of the device.
Although each gate only dissipates a few milliWatts, the heat generated within a single large-scale
integrated (LSI) circuit containing tens of thousands of transistors could potentially quickly destroy
the IC.
It was therefore necessary to develop gates with much lower
power consumption, so in the 1970s a series of CMOS
(Complimentary Metal Oxide Semiconductor) ICs, called
the 4000 series was developed, in which the power
consumed by each gate was about 1/1000th of the power
consumed by a similar TTL gate, making very large scale
integration (VLSI) with millions, and more recently billions
of transistors per chip possible. CMOS chips were also more
flexible in their supply voltage requirements, working from
supplies between 3V to 18V, compared with the TTL
requirement for supplies of 5V +/- 0.25V. This made CMOS
devices ideal for battery operation. However the speed at
which these early CMOS devices operated was about 10
times slower than TTL. Fig. 3.1.2 Original CMOS and
TTL Pinouts for Comparable
These two logic families were not readily compatible; apart
NAND gate ICs
from the differences in supply voltage and speed, they were
not particularly pin compatible, as illustrated in Fig. 3.1.2 so
TTL chips, even simple ICs with the same types of gates as CMOS, could not be directly
interchanged.
Power vs. Speed
Ideally logic gates should be able to change state immediately and consume little or no power.
However the laws of physics, as presently understood, say that this is not possible. All electrical
circuits must consume some power, and any change in the voltages and currents in that circuit must
take at least some time.
Chip designers therefore had to try and reconcile the fact that higher speeds meant more power
consumption, and so some families developed, using optimum speed whilst others were developed
to use the minimum of power.
CMOS (Complimentary Metal Oxide
Semiconductor) chips, designed for
minimum power, got faster and TTL
families, using bipolar transistors for
optimum speed, were developed that
not only increased speed but also
reduced power consumption.
As the overall performance of these
families increased they also became
more compatible. The increase in
portable (battery powered) electronic
devices along with the ability of chip
manufacturers to make the component
parts of ICs much smaller also meant
that power could be reduced and speed Fig 3.1.3 Logic Families Power vs Speed
increased.
Some of the main TTL and CMOS sub-families currently in use are compared in Fig. 3.1.3. Note
how CMOS speed has been increased and power reduced with the introduction of the 74HC (High-
speed CMOS) although (as the laws of physics demand), power consumption still increases, as the
frequency at which they operate increases.
Because CMOS and TTL families can now operate at similar speeds and similar power
consumption, the 74HCT (a CMOS sub-family compatible with TTL pinouts and voltage levels)
now makes it possible to easily interface both families within in a single design, so enabling the use
of the best features of each family.
74HC (and 74HCT for interfacing with the larger 74TTL families) are now recommended for most
new designs.
The ECL Families
The ECL (Emitter Coupled Logic) families, originated in the late 1950s and remain the fastest chips
available, but consume more power, and because they use a negative power supply (of –5.2V) have
been difficult to interface with other families. This has changed with the introduction of PECL
(Positive ECL) using a +5V supply, and LVPECL (Low Voltage Positive ECL) using a +3.3V
supply. This now offers the opportunity of using mixed CMOS and TTL families at various power
levels for logic operations and interfacing with ECL for high frequency digital communications.
The base potential of T4 is made up of T3 base/emitter potential VBE (about 0.7V), plus the
collector/emitter, potential (VCE) of T2, (about 0.2V), giving a base voltage for T4 of about 0.9V.
Therefore the base and emitter voltages on T4 are approximately equal, so T4 will be turned off.
With BOTH input terminals at logic 1 therefore, the output terminal will be at logic 0, the correct
operation for a NAND gate.
If either one of the inputs is taken to logic 0 however, this will make T1 conduct, as the emitter that
is at logic 0 will be at a lower voltage than that supplied to the base by R1. This will cause T1 to
saturate, taking its collector to a low potential (less than 0.8V) and as this is also connected to T2
base T2 will turn off, making its collector voltage and T4 base voltage, rise to very nearly +Vcc.
As virtually no current (ICE) is flowing through T2 collector/emitter circuit, practically no voltage is
developed across the emitter resistor R3, reducing T3 base voltage to 0V, and so T3 is turned off.
However, sufficient current will be flowing out of the output terminal (feeding the next gate input
circuit) to cause T4 emitter to be held at about 4.1V. This is 0.9V below +Vcc, made up of the
voltage across D1 (0.7V) plus the saturation voltage VCE of T4 (0.2V). This places about 4V or
logic 1 (between 2.4V and 5V) on the output terminal.
CMOS
CMOS ICs can operate from a wide range of supply voltages
(typically 3 to 18V, and lower with some sub families), with
very low power consumption. The name CMOS
(COMPLIMENTARY Metal Oxide Semiconductor) is used
because opposite types, both P type and N type MOSFETs are
used in the construction of these gates. Fig 3.2.3 shows a
theoretical schematic circuit for a NAND gate.
Operation
T1 and T2 are P type MOSFETs and either of these transistors
will be turned on when logic 0 is applied to its gate. T3 and
T4 are N type MOSFETs and either of these transistors will
be turned on by applying a logic 1 to its gate.
Fig 3.2.3 CMOS NAND Gate
T1 and T2 are connected in parallel from supply to the output
X, so switching either of them on will result in a logic 1 at output X.
T3 and T4 are connected in series between X and ground so when
both are switched on, a logic 0 will appear at output X. The eventual
logic state at X depends of course on the on or off state of the
combination of all four transistors, and these are controlled by the
logic states applied to the inputs A and B as can be seen in Table
3.2.1.
Input A controls T2 and T3 so that when logic 0 is applied, T2 is on
and T3 is off. Logic 1 on input A reverses this condition.
Input B controls T1 and T4 so that logic 0 applied to B turns T1 on
and T4 off. Logic 1 on input B reverses the condition.
Anti-Static Protection
Because MOSFETs, have a gate that is insulated from the transistor’s
conducting channel, they can also be called Insulated Gate Field
Effect Transistors (IGFETs) and have practically no current flowing
into their inputs, therefore any high voltages due to static electricity
are not reduced by current flow so can easily destroy the very thin
Fig. 3.2.4 Anti Static
insulating layer between the gate and the conducting channel of the
Packaging
transistor. To minimise such damage and protect the gates from any
DIGITAL ELECTRONICS MODULE 03.PDF 6 E. COATES 2007-2014
www.learnabout-electronics.org Digital Electronics Module 3
high voltage static electricity spikes that may appear across the IC during handling, CMOS ICs
should always be stored in anti static packaging, and handled in accordance with manufacturers
handling procedures.
To protect the ICs from high voltage spikes when in circuit, protection diodes (see Fig. 3.2.3) are
used at the gate inputs.
Protection diode D3 is connected between input A and +Vcc so that if any voltage higher than Vcc
appears at input A, D3 will become forward biased and conduct, limiting the input voltage to +Vcc.
Similarly, if a negative voltage appears at input A, D4 will conduct, limiting the input voltage to no
less than 0V.
Input B is protected in a similar manner by D1 and D2. Note however, that although the diodes
offer protection, it is still possible that very large static voltages may still damage these devices, so
anti-static precautions should always be used when handling CMOS devices.
Capacitance in CMOS devices
Because CMOS transistors are IGFETs with insulating layers between electrodes, they naturally act
as capacitors. The value of these capacitors is of course small because the electrodes either side of
the very thin insulating layer are extremely small. However the combined capacitance between the
various sections of the several IGFETs that make up a CMOS gate, added to any capacitance
between lead-out wires etc. is sufficient to have an effect on the overall gate performance. When a
change in logic state occurs, ideally it should complete its transition from 0 to 1, or 1 to 0
immediately. However because of the gate capacitance and internal resistances that are present, the
change cannot happen in less time than the CR time constant of the circuit. The output of a gate
cannot complete its change until the input has completed its transition, and the output must
similarly take some additional time, before reaching its new value.
Propagation Delay
Any gate introduces some delay between when its input changes
and when a resulting change takes place at its output. This is
called the propagation delay of the gate, and is made up of two,
often different delays, as shown in Fig. 3.2.5 using a simple
inverter gate as an example.
The High to Low Propagation Time (tPHL) measured from the
time (usually in nanoseconds) when the input rises past the 50%
level to the time when the output falls past the 50% level. A
similar, but usually longer delay (tPLH) is measured from when
the input falls past the 50% level to when the output rises past
the 50% level. Therefore the average propagation delay of the
gate is:
Fig. 3.2.5 Propagation Delay
(tPHL + tPLH) / 2
Typical average propagation delay for a 74HC04 inverter is about 8ns.
ECL
Because the early designs of ECL ICs needed a negative
supply voltage of -5.2V they were not particularly
compatible with either CMOS or TTL circuits, even
though, like TTL, they use bipolar transistors. However
there are now newer ECL sub families available that use
positive supplies such as PECL (+5V) and LVPECL
(+3.3V). Although the supply voltages for these ECL
gates are now more compatible with CMOS and TTL,
the logic levels used in ECL are quite different to other
logic families. ECL is extremely fast in operation with
propagation delays of less than 1 nanosecond available.
ECL was extensively used in early super computers, but
because of its high power requirement (up to 40mW per
gate) fell out of general use. Today modern ECL sub
families such as PECL or LVPECL are now mainly used
for interfacing CMOS or TTL digital systems to high Fig 3.2.6 ECL OR/NOR Gate
frequency signal communication (up to several GHz) circuits. The two opposite logic state outputs
(VOUT and VOUT ) means that the ECL OR gate illustrated in Fig. 3.2.6 can operate as an OR gate or
a NOR gate and also makes ECL for interfacing with differential (two conductor) transmission lines
possible. This method of transferring high-speed digital data uses a pair of high frequency anti-
phase signals as a method of cancelling out electromagnetic interference that may be picked up
during transmission
Operation
The basis of the ECL circuit is a differential amplifier (T3 and T4 in Fig. 3.2.6), which is ideal for
high frequency use and reducing noise on the amplified signals. This amplifier compares the
voltage at the inputs (the bases of T1 and T3) with a steady reference voltage produced by T5, D1
and D2. To avoid any delay caused by the transistors saturating, the differential amplifier is
designed to always be in a linear amplifying mode, approximately half way between saturation and
cut off.
The voltage change between logic 1 and logic 0 is between –0.9 and –1.75 respectively. Power
consumption is considerably higher than CMOS or TTL because the transistors in the differential
amplifier are always conducting, rather than switching on and off as in TTL and CMOS.
ECL and PECL use differential transmission, a pair of conductors with opposite polarity signals,
along which data can be transmitted for around 50m. The technique reduces interference in the
transmission lines when passing data from one digital system to another, and was used in many data
transmission links in computing up to the 1990s, but for many uses, such as USB, HDMI etc. ECL
has now been largely superseded by LVDS (Low Voltage Differential Signalling), a CMOS based
high frequency digital transmission system. This system uses much less power than ECL and can
transfer data over distances of up to 10m at a rate of several hundred Megabits per second.
Noise Margin
Because voltages in digital circuits can be continually changing very rapidly between logic 1 and
logic 0, (virtually between supply voltage and ground), they have the potential to produce a lot of
noise, in the form of high frequency voltage spikes on the IC power supply lines.
To counteract this it is important to include effective
decoupling, not only at the power supply unit, but also
by connecting decoupling capacitors across the VDD and
0V connections at each IC. These capacitors are
normally connected as physically close to the IC as
possible, as shown in Fig. 3.3.2.
Despite these measures, it is possible that some noise
will remain that could disturb the logic levels of digital
signals. However logic ICs have a built in ‘Noise
Margin’, illustrated in Fig. 3.3.3. This is the difference
between the worst-case voltage (VOH) for logic 1 at the
output, which is 2.4V in the case of 74HCT, and the Fig. 3.3.2 Logic IC Decoupling
minimum voltage required for logic 1 to be recognised at
the input (VIH), 2.0V in 74HCT. This difference (0.4V)
should be enough to ensure that noise does not cause a wrong
logic level to be seen by the 74HCT input; a similar noise
margin is provided for logic 0 (VIL-VOL) as shown in Fig.
3.3.3.
It can be seen from Fig. 3.3.1 that different logic families
have very different noise margins. The CMOS 74HC gates
have a much wider noise margin than LS TTL or the TTL
compatible 74HCT series, making them much more tolerant
of noise. This is because the CMOS outputs are normally
driven very close to VDD or 0V as very little current is drawn
from a CMOS output to drive any CMOS inputs connected to Fig. 3.3.3 Noise Margin
it.
Minimising Power Consumption
In both CMOS and TTL ranges it is important that the central (white) range of voltages in Fig. 3.3.1
is avoided as much as possible. This is done by ensuring that switching between 1 and 0 is as fast as
possible. If the IC is operating within the ‘invalid range’, power consumption increases
dramatically. When the output voltage is close to the supply voltage, current is almost zero and
therefore power (V x I) is very low. Similarly when the output is close to 0V but maximum current
is flowing, V x I is again very low. Power consumption is at its highest when both voltage and
current are around the mid range, and operating the ICs in this range would substantially increase
the heat dissipated by the IC.
However, any unused inputs on CMOS ICs will tend to float to a mid voltage level, causing power
dissipation to increase. To avoid problems with floating CMOS inputs, they should therefore be
connected to either supply or ground, either directly or via a resistor, so they are not allowed to
‘float’ and cause excessive power consumption. This is not absolutely necessary, (though good
practice), with TTL ICs as any unused TTL inputs will float up to logic 1.
Notice that ECL/PECL gates operate exclusively in this mid range area; this is why power
consumption in these families is higher than in TTL or CMOS. However the close proximity of the
logic 1 and logic 0 values in ECL allows for much higher switching speeds. This operation also
gives ECL a much narrower noise margin however, making these chips more susceptible to noise.
This was the reason for the original ECL family having its positive supply tied to 0V, which is
generally less noisy than sharing a positive supply with many other ICs.
DIGITAL ELECTRONICS MODULE 03.PDF 10 E. COATES 2007-2014
www.learnabout-electronics.org Digital Electronics Module 3
Wired AND
If two or more open collector gate outputs are connected
together, any gate with a logic 0 output will pull all other
connected outputs to logic 0, giving an output of logic 0 at
output X, but if all the connected outputs are at logic 1,
then X will be at logic 1, the action of an ‘invisible’ AND
gate.
Fig 3.4.2 Wired AND Function
Wired OR
It is also possible to implement a wired OR function using
open collector (or drain) gates as shown in Fig. 3.4.3, although
the explanation here is a little more complex as it involves
using Negative Logic.
The circuit in Fig. 3.4.3 is used to obtain the Boolean function
(A•B)+(C•D) without using a physical OR gate.
Notice that the circuit in Fig. 3.4.3 is similar to the wired
AND circuit in Fig. 3.4.2, except that the two open collector
AND gates have been replaced by two open collector NAND Fig. 3.4.3 Wired OR Function
gates.
The main difference with this circuit however is that to obtain an OR function from what appears to
be a wired AND function, Negative Logic is applied.
Negative Logic
In Digital Electronics it is usual to explain the operation of a circuit
theoretically in terms of 1 and 0, but the actual gates are really just
specialised analogue circuits. As explained in Module 3.3, the outputs
normally thought of as 1s and 0s are really ranges of voltage and current,
1 and 0 are no more than convenient names given to these voltages and
currents. It is also usually assumed that logic 1 refers to the higher of the
two voltage ranges – but that need not be so! Also logic 1 is normally the
active state of an output, and logic 0 is the inactive state, but this is not
always what is required.
For example, the source current available from an open collector gate
Fig 3.4.4 Active Zero
output when it is at logic 1 is very small, compared to the current the gate
will sink when its output transistor is turned on, giving an output of logic 0.
It is quite reasonable therefore, to drive some output device, such as a lamp or relay for example,
using the higher current available from a logic 0 output, as shown in Fig. 3.4.4.
In negative logic it is assumed that the active state is the low
voltage state and that this is called logic 1. What this does to the
familiar truth tables used in positive logic is to replace all the
logic 1s (previously assumed to be the active state) with logic 0s
and vice versa.
The effect of this reversal of logic states can be seen in Table
3.4.1. The X column for the positive AND gate is as would be
expected; a logic 1 when both A and B are 1, otherwise logic 0s.
However using negative logic on the same physical AND gate,
simply swapping the 1s and 0s in both the input and output
columns has changed the X output column from three 0s and a 1,
to three 1s and a 0, so that X = 1 whenever A or B is 1. The AND
gate has been transformed to an OR gate!
DIGITAL ELECTRONICS MODULE 03.PDF 14 E. COATES 2007-2014
www.learnabout-electronics.org Digital Electronics Module 3
Using negative logic will change the function of any of the six two input logic gates, if you want to
see what happens, try re-writing the truth tables for AND, OR, NAND, NOR, XOR, and XNOR in a
similar manner to Table 3.4.1. However, negative logic is not widely used and so unless a logic
circuit is actually described as using negative logic, it can be assumed that positive logic is being
applied.
Negative Logic and the Wired OR Circuit
Fig. 3.4.5 shows how the wired AND circuit shown in Fig.
3.4.2 is made to work as the wired OR in Fig. 3.4.3. The only
physical change is that the two AND gates have been replaced
by two NAND gates; this has the effect of inverting the inputs
of the ‘invisible’ wired AND gate. According to De Morgan’s
Theorem, this has the effect of converting an AND gate into a
NOR gate.
To implement negative logic however, and change the invisible
AND gate to an OR gate, both the inputs and the outputs must
be inverted, changing all the 1s to 0s and 0s to 1s. The Fig. 3.4.5 How the Wired OR
inversion ‘bubble’ is shown at the output of the wired OR gate Circuit Works
because the active state of the output is chosen to be the low
voltage output normally called the logic 0 inactive state, but now using negative logic as shown in
Fig. 3.4.5, the low voltage output is considered to be the ‘active logic 1’ state using negative logic.
If positive logic is used however, and logic the low voltage output from the invisible wired AND
gate called the inactive logic 0 state, the output of the wired gate is logic of the circuit is that of a
wired NOR gate.
Buffers
Buffers in digital electronics are special gates inserted between
one circuit and another to reduce any unwanted interaction
between the two. The gates in buffer ICs typically have high
impedance inputs and low impedance outputs, giving larger fan
out factors than standard gates. Another common use is to enable
a logic circuit having a low voltage and/or low current output to
drive a circuit or output device requiring higher voltage or current
than is available for standard logic ICs.
Open Collector Buffers
Typical ICs using buffered output gates are shown in Fig. 3.4.6.
Buffered inverters and non-inverters are common, but there are
also gates with other logic functions that have buffered outputs,
including some open collector gates, such as the 74HC03 Quad 2
input NAND with open drain from NXP Semiconductors.
Open collector buffers such as the SN74LS06 Hex inverter
buffer/driver IC, and the non-inverting buffer DM7407 from Fig 3.4.6 Open Collector/Drain
Texas Instruments, allow devices such as lamps, motors and Buffer ICs
relays for example, that normally require higher currents and
voltages, to be driven directly from a low voltage logic circuit.
Schmitt Gates
The digital signals processed by logic gates need to have fast rising and falling
edges. Taking too much time to change logic states, spending too long in the
‘invalid’ zone between states, can cause unreliable logic levels, timing problems
and excessive power dissipation, even shortening the life of logic ICs. Standard
gate inputs change from 0 to 1 or 1 to 0 at a voltage of about 2.0V. If there is any
noise on the input signal, it may be rapidly changing its voltage above and below
this level, so causing the gate to rapidly change state if the noise exceeds the
noise margin. These rapid and uncertain changes in the gate’s input circuit will
also cause the output to oscillate between 1 and 0, transmitting the problem to
any subsequent gates in the digital system. Fig. 3.4.7
To avoid these problems, gates with Schmitt inputs such as those shown in Fig. Schmitt Gates
3.4.7 are often used, especially at the input to a system where noise may be
expected, as signals arrive from an external source.
Schmitt gates use positive feedback, which causes the gate to switch between logic states extremely
quickly. They also have a hysteresis effect, which only allows a change of state to occur as the input
voltage passes two specific and different voltages, the Positive-going input threshold voltage (VT+)
and the Negative-going input threshold voltage (VT-).
As the input voltage passes VT+ during a positive going transition,
the gate input changes very rapidly to its high state. It then cannot
return to its low state until the input voltage falls to the lower level of
VT-.
This action has several beneficial effects on poor input signals, as
illustrated in Fig. 3.4.8.
(a) It can be used to change slowly changing signals to square
waves having very fast transitions.
(b) Noise can be removed from signals, provided that the
amplitude of the noise is not greater than ∆VT.
(c) Slow rise and fall times can be restored to practically
instant transitions by feeding the signal through a Schmitt
trigger.
Fig. 3.4.8 Schmitt Gate
Action
74 Series Schmitt Gates
Typical Schmitt Hex inverter and Quad NAND gate ICs from the 74 series are illustrated in Fig.
3.4.9.
3.
In Fig. 3.5.1, if input A is at logic 1 and input B is at logic 0,
what will be the approximate voltage across R3?
a) 5V
b) 2.5V
c) 0.7V
d) 0v
4.
What is he main advantage of PECL gates Over ECL gates?
a) They use positive logic.
b) They can dissipate more power than ECL.
c) They use a positive power supply.
d) Their propagation delay is measured in picoseconds.
5.
What does the VOH parameter of a logic IC refer to?
a) The highest permissible output voltage.
b) The lowest output voltage recognised as logic 1.
c) The highest output voltage recognised as logic 1.
d) The highest output voltage recognised as logic 0.
6.
Which of the following refers to the noise margin of a logic gate?
a) The difference between VIH and VOL
b) The difference between VOH and VOL
c) The difference between VOH and VIH
d) The difference between VIH and VIL
7.
Which of the following ICs has the largest noise margin?
a) SN74LS04n Hex inverter.
b) CD74HCT00N Quad 2 input NAND.
c) MC10EL05 2 input ECL AND/NAND.
d) SN7408N Quad 2 input TTL AND
8.
What logic function is achieved by operation an AND gate using negative logic?
a) AND.
b) NAND.
c) NOR.
d) OR.
9.
Refer to Fig. 3.5.2.
Which of the following input combinations will cause output X to sink
current?
a) A=0 B=0.
b) A=0 B=1.
c) A=1 B=0.
d) A=1 B=1
10.
For which of the following purposes would a Schmitt buffer be chosen?
a) To provide a high output current.
b) To enable wired logic to be used.
c) To reduce noise at the circuit input.
d) To translate logic levels when interfacing between logic families.