Untitled
Untitled
ELECTRONICS
Fourth Edition
R PJain
Director
BM Institute ofEngineering and Technology
Sonepat
1. FUNDAMENTAL CONCEPTS 1
1. 1 Introduction 1
1.2 Digital Signals 2
1.3 Basic Digital Circuits 3
1.4 NANO and NOR Operations 8
1.5 Exclusive-OR and Exclusive-NOR Operations 12
1.6 Boolean Algebra 15
1. 7 Examples ofIC Gates 18
Summary 19
Glossary 21
Review questions 23
Problems 23
7. FLIP-FLOPs 279
7.1 Introduction 279
7.2 A 1-Bit Memory Cell 280
7.3 Clocked S-R FLIP-FLOP 282
7.4 J-K FLIP-FLOP 284
7.5 D-TYPE FLIP-FLOP 288
7.6 T-TYPE FLIP-FLOP 289
7.7 Excitation Table of FLIP-FLOP 290
7.8 Clocked FLIP-FLOP Design 290
viii Modern Digital Electronics
Index 703
Preface to The Fourth Edition xiii
• Added a large number of Solved Examples, Review Questions with Answers, and Problems to help
students understand and apply the topics discussed successfully.
Chapter 1 introduces the fundamental concepts of digital electronics, advantages of digital systems,
and the basic digital circuits. Various number systems and commonly used codes in digitial systems and
microprocessors have been discussed in Chapter 2. Error-detecting and error-correcting codes have also been
discussed in detail. Chapter 3 reviews semiconductor devices from the point of view of their applications
in digital circuits. Based on these devices, various digital circuits, referred to as logic families, have been
discussed in Chapter 4.
CMOS logic has now almost replaced the earlier most commonly used TTL logic. However, because
of its higher speed of operation and driving capabilities TTL logic is still preferred in many designs. Even
a number of CMOS devices are available which are TTL compatible. The latest 74F (Fast TTL) series has
also been included in this chapter. The CMOS logic has been discussed in detail and the advanced high
speed CMOS logic family series 74AHC/74AHCT/74FCT, and low-voltage CMOS (LVCMOS) logic have
also been included in this edition. The logic family using bipolar and unipolar logic BiCMOS has also been
introduced in this edition. This chapter also deals in detail the interfacing problems between ICs of the same
logic family and between those of different logic families to obtain maximum benefits in the design of digital
systems.
Chapter 5 deals with the conventional methods of combinational circuits design such as algebraic method,
K-map simplification and Quine-Mcluskey method. Hazards in combinational digital circuits and design of
hazard-free circuits have also been included in this edition.
Combinational logic design using MSI circuits is covered in Chapter 6, which is important for the design
of digital systems considering the simplicity in design, cost, space, power requirement, speed and other
factors.
Chapter 7 introduces the basic building block of a sequential circuit-the FLIP-FLOP. All types of
FLIP-FLOPs with their excitation tables and triggering methods have been discussed in detail. Sequential
logic design has been discussed in Chapter 8. Here again, both the approaches, namely conventional design
using FLIP-FLOPs and the modem approach using available MSI circuits, have been discussed. Design of
synchronous sequential as well as asynchronous sequential circuits have been discussed in detail. Synchronous
counters design using D-type FLIP-FLOPs have been added since D-type FLIP-FLOPs are most commonly
used in modem programmable logic devices. Hazards in sequential circuits have also been dealt with in this
chapter.
Chapter 9 deals with timing circuits and their applications which are essential to a digital system.
The analog-to-digital (AID) and digital-to-analog (D/A) converters form an important part of many digital
systems and the commonly used techniques for such conversions have been discussed in Chapter 10.
Chapter 11 deals with semiconductor memories which have assumed an important role in present-day
digital systems. This chapter has thoroughly been revised to include various semiconductor memory devices
which are being used currently. Serial and parallel EEPROMs, serial and parallel flash memories, first-in,
first-out (FIFO) memories, bidirectional FIFO (BiFIFO) memory, asynchronous and synchronous SRAMs,
asynchronous and synchronous DRAMs have been discussed in detail.
Programming techniques used for programmable ROMs and erasing techniques used for erasable
programmable ROMs have also been discussed.
Chapter 12 presents various programmable logic devices (PLDs), such as programmable logic array
(PLA), programmable array logic (PAL), electrically erasable PLD (EEPLD), generic array logic (GAL),
complex programmable logic devices (CPLDs), and field programmable gate array (FPGA) devices. Xilinx
Cool Runner-II CPLD family, Virtex FPGA family, and Altera Stratix FPGA family devices have been
discussed in detail.
xiv Modern Digital Electronics
The microprocessors have been introduced in Chapter 13. The fundamentals of microprocessors have
been presented in a manner that even a novice would understand this highly sophisticated device. The most
widely used Intel's 8085A 8-bit microprocessor has been chosen for discussion. Its organisation, operation
and programming have been discussed in detail, which will help the students learn the use of microprocessors.
The Intel's 16-bit microprocessor 8086 has also been introduced briefly.
Chapter 14 introduces computer aided design (CAD) approach to digital system design. CAD tools needed
for this purpose have been discussed. The VHDL, a hardware description language has been introduced,
which is the basic requirement of designing using CAD tools.
Combinational logic circuits: truth table, arithmetic circuits, decoders, multiplexers, priority encoder,
digital comparators, BCD-to-7-segment decoder, tristate buffer, and Sequential logic circuits: FLIP-FLOPs,
latches, shift registers, registers, and counters have been described using VHDL.
Glossary of the important terms used in the book and Review Questions with answers for each chapter
have been included to enhance the understanding of the users.
Online Leaming Centre
This book is accompanied by an exhaustive online learning centre http://www.mhhe.com/jain/mde4e which
provides useful resources for students and instructors. Students can access simulation software, sample
chapters, additional MCQs, web links and university questions along with answers. Instructors can avail
PowerPoint Slides (chapter-wise), solution manual, university questions along with answers and class tests.
Suggestions for further improvement of the book can be sent at the following email id-tmh.cse feedback@
gtnail.com (kindly mention the title and author name in the subject line).
RP Jain
xvi Modern Digital Electronics
Chapter 1 introduces the fundamental concepts of digital electronics, advantages of digital systems and
basic digital circuits. Chapter 2 reviews semiconductor devices from the point of view of their applications
in digital circuits. Based on these devices, various digital circuits, referred to as logic families, have been
discussed in Chapter 3. This also deals with the interfacing problems between ICs of same logic families and
between those of different logic families. Necessary number systems and commonly used codes in digital
systems and microprocessors have been discussed in Chapter 4.
Chapter 5 deals with the conventional methods of combinational system design. The importance of the
methods, such as the Kamaugh map technique, has gone down because of simpler methods required to
design the same systems using other functions such as multiplexers, demultiplexers and PLAs which are
easily available in ICs. Combinational logic design using MSI circuits is covered in Chapter 6 which assumes
greater importance for the design of digital systems due to considerations of simplicity in design, cost, space,
power requirement, speed, etc.
Chapter 7 introduces the basic building block of a sequential circuit-the FLIP-FLOP. All types ofFLIP-
FLOPs with their excitation tables and triggering methods have been discussed in detail. Sequential logic
design has been discussed in Chapter 8. Here again, both the approaches, namely conventional design using
FLIP-FLOPs and the modem method using available MSI circuits, have been discussed.
Chapter 9 deals with timing circuits which are an essential part of a digital system. Timing circuits using
various ICs, such as gates, OP AMP, Schmitt trigger, monostable multivibrator, and 555 Timer, have been
discussed.
The analog-to-digital (AID) and digital-to-analog (D/A) converters form an important part of many digital
systems and the commonly used techniques have been discussed in Chapter 10.
Chapter 11 deals with semiconductor memories which have assumed an important role in present-day
digital systems. Various semiconductor memories, such as static and dynamic shift register memories,
static and dynamic RAMs, ROM, PROM, EPROM, EAROM, CAM, and CCD, have been discussed in
detail. Programming techniques used for programmable ROMs and erasing techniques used for erasable
programmable ROMs have also been discussed thoroughly. The LSI device PLA which is very useful for
digital system design has been introduced in a very simple and systematic way which will help the reader to
understand the operation and usefulness of this device for digital system design.
The microprocessor has been introduced in Chapter 12. The fundamentals of microprocessors have been
presented in a manner which will help a novice understand this highly sophisticated device. The most widely
used Intel's 8085A 8-bit microprocessor has been chosen for discussion. Its organisation, operation and
programming have been discussed in detail, which will help the reader learn the use of microprocessors.
RP Jain
Combinational Logic Design Using MS! Circuits 263
Number of
BCD decades 74184 ICs required
2 2
3 6
4 II
5 19
6 28
Example 6.9
Verify the operation of a 2-decade BCD-to-binary converter of Fig. 6.31 for ar input of 29 .
Solution
The input is
D , C, B , A , D 0 C0 B 0 A 0 = 00101001
The binary output B0 = A 0 = I
The inputs of IC I are E = B, = I
D = A, = 0
C = D0 = I
B = C0 = 0
A = B0 = 0
The outputs ofICI are Y5 = 0
Y4 = I
y3 = I
y2 = I
Y, = 0
The binary outputs B, and B 2 are
B, = Y , = 0
B2 = yl = 0
The inputs ofIC2 are E = D, = 0
D = C, = 0
C= Y5 ofICI = 0
B = Y4 ofICI = 0
A = Y3 ofIC I = I
The outputs of IC2 are Y5 = 0
Y4 = 0
y3 = 0
Y,= 1
Y, = I
264 Modern Digital Electronics
Bo
B,
o----------oAo}
(LSB)
A Y, ~
LSD
~~~cy ~ B Y2 : ~
inputs B3 - C Y3 - Do 2-decade
74185A BCD outputs
B4 D Y4
Bs E Ys
MSB ~
Enable input - ~ G y6 -
(active-low)
The method of expansion to accommodate larger number of binary inputs is quite complicated. The circuit
for conversion of 8-bit binary number to BCD is given in Fig. 6.33. This requires three ICs. Table 6.17 gives
the number of ICs required for a given number of input binary bits. Similar to the BCD-to-binary converters
we may have to resort to ROM for conversion of longer binary words.
266 Modern Digital Electronics
E D C B A
IC !
y6 Ys Y4 Y3 Y2 Y1
E D C B A
IC2
Ys Y4 Y3 Y2 Y1
- E D C B A
IC3
Ys Y4 Y3 Y2 Yi
B2 A2 D1 Ci Bi Ai Do Co Bo Ao
'-v----' ~ - - - . - - - - ~
MSD LSD
3-decade BCD outputs
Number of
Binary bits 74185 /Cs required
4- 6 I
7, 8 3
9 4
10 6
11 7
12 8
13 10
14 12
15 14
16 16
Combinational Logic Design Using MSI Circuits 267
Example 6.10
Verify the operation of 8-bit binary-to BCD converter of Fig. 6.33 for the binary input of 11010011.
Solution
The inputs ofICl are E=B7 = 1
D=B6 = 1
C=B 5 =0
B=B4 = 1
A=B3 =0
The outputs ofICl are Y6 = 1
Y5 =0
y4 = 1
Y3 =0
Y2 =0
YI= 1
The inputs ofIC2 are E= Y3 ofICl = 0
D = Y2 ofICl = 0
C= Y1 ofICl = 1
B=B2 =0
A=BI = 1
The outputs ofIC2 are Y6 =0
Y5 =0
y4 = 1
Y3 =0
Y2 =0
Yl=0
The inputs ofIC3 are E=0
D= Y6 ofICl = 1
C= Y5 ofICl = 0
B= Y4 ofICl = 1
A = Y5 ofIC2 = 0
The outputs ofIC3 are Y6 =0
Y5 = 1
Y4 =0
Y3 =0
Y2 =0
Yl=0
The BCD outputs are B 2 = Y5 ofIC3 = 1
A 2 = Y4 ofIC3 = 0
D 1 = Y3 ofIC3 = 0
cl = y2 ofIC3 = 0
B 1 = Y1 ofIC3 = 0
A 1 = Y4 ofIC2 = 1
D 0 =Y3 ofIC2=0
C0 = Y2 ofIC2 = 0
268 Modern Digital Electronics
B 0 = Y1 ofIC2 = 0
A 0 =B0 = 1
Therefore, the BCD output is 10 0001 0001 = 211.
0
I
:}
Binary outputs
2 (active-low)
Octal intputs 3
(active-low) 4 74148 (MSB)
5
6
7 GS} Carry outputs
Enable intput
EO (active-low)
(active-low)
Inputs Outputs
EI 0 1 2 3 4 5 6 7 C B A GS EO
I X X X X X X X X I I I I I
0 0 I I I I I I I I I I 0 I
0 X 0 I I I I I I I I 0 0 I
0 X X 0 I I I I I I 0 I 0 I
0 X X X 0 I I I I I 0 0 0 I
0 X X X X 0 I I I 0 I I 0 I
0 X X X X X 0 I I 0 I 0 0 I
0 X X X X X X 0 I 0 0 I 0 I
( Continued)
270 Modern Digital Electronics
Example 6.11
Design a hexadecimal-to-binary encoder using 74148 encoders and 74157 multiplexer.
Solution
Since there are sixteen symbols (0-F) in hexadecimal number system, two 74148 encoders are required. Hexadecimal
inputs O through 7 are applied to IC 1 input lines and inputs 8 through F to IC2 input lines. Whenever one of the
inputs of IC2 is active (LOW), IC 1 must be disabled, on the other hand, if all the inputs of IC2 are HIGH then IC 1
must be enabled. This is achieved by connecting the EO line ofIC2 to the EI line ofICl. A quad 2:1 multiplexer is
required to get the proper 4-bit binary outputs. The complete circuit is shown in Fig. 6.36. The GS output of74148
goes LOW whenever one of its inputs is active. Therefore, GS ofIC2 is connected to select input of 74157, which
selects A inputs if it is LOW, otherwise B inputs are selected. The outputs of the multiplexer are the required binary
outputs and are active-low. This circuit is also a priority encoder.
0
A Bo
2 B B1
3 C B2
4 IC ! B3
5 74148
Logic I
6 GS
s 7
·-t~
EO Yo "'
s
a-~
-
. -~
e
0
b Ii"
IC3 Yi 5 ~
·u., .::: 741 57 ~]
. tl
"0
~
::i::
..
~
8
9
El
A Ao
Y2
Y3
-:s~-
i:: · -
~
~
A B A1
B IC2 C A2
C 74148 A3
D -
E GS
F Select Strobe
-
exadecimal-to-Binary PriorityEncoder
------
Combinational Logic Design Using MS! Circuits 271
Facilities available
Rating Lamp Ripple blanking Ripple blanking Blanking
(Max voltage, Test Input Output Input
IC No. Output Sink current) LT RBI RBO BI
7446, 74246 Active-low; 30 V, 40 mA Yes Yes Yes Yes
Open-collector
7447, 74247 Active-low; 15 V, 40 mA Yes Yes Yes Yes
Open-collector
(Continued)
272 Modern Digital Electronics
Facilities available
Rating Lamp Ripple blanking Ripple blanking Blanking
(Max voltage, Test Input Output Input
IC No. Output Sink current) LT RBI RBO BI
7448, 74248 Active-high; 5.5 V, 6.4 mA Yes Yes Yes Yes
Pull-up resis-
tor=2kf!
7449, 74249 Active-high; 5.5 V, 8 mA No No No Yes
Open-collector
LT This is used to check the segments of LED. If it is connected to logic O level, all the segments of the
display connected to the decoder will be ON. For normal decoding operation, this terminal is to be connected
to logic 1 level.
RBI It is to be connected to logic 1 for normal decoding operation. If it is connected to O level, the segment
outputs will generate data for normal 7-segment decoding for all BCD inputs except zero. Whenever the
BCD inputs correspond to zero, the 7-segment display switches off This is used for blanking out leading
zeros in multi-digit displays.
BI If it is connected to logic O level, the display is switched off irrespective of BCD inputs. This is used for
conserving power in multiplexed displays.
RBO This output, which is normally at logic 1 goes to logic Oduring zero blanking interval. This is used for
cascading purposes and is connected to RBI of the succeeding stage.
Example 6.12
(a) Set up a single 7-segment LED display using 744 7 BCD-to-7-segment decoder/driver.
(b) Design a 4-digit 7-segment LED display system with leading zero blanking.
(c) Design a 4-digit multiplexed 7-segment LED display system with leading-zero blanking.
Combinational Logic Design Using MS! Circuits 273
Solution
(a) The set up is given in Fig. 6.37.
(b) A 4-digit display system can display numbers from 0000 to 9999. If the number to be displayed is smaller than
a 4-digit number then there is a problem of leading zeros. It is very often desirable to design a display system
so that any number less than 1000 will not show leading zeros. For example, the number 0203 should appear as
203. The block diagram of a 4-digit display system with leading zero blanking is shown in Fig. 6.38. The reader
should verify the operation of this circuit.
(c) When a multi-digit, 7-segment LED display system is used, it requires power which is n-times the power
required for a single 7-segment LED, where n is the number of such LEDs in the system. Typically, the current
requirement of one segment is 20 mA at full brightness which makes the maximum current requirement for a
single 7-segment LED to be 140 mA (corresponding to zero). If there are four such LEDs in the display system,
then the maximum current required would be 560 mA. It is possible to reduce the overall current drain of the
display system by using the concept of multiplexing the display, i.e. to energize the output digits one at a time.
If this is done in rapid succession, the display would appear to be continuous to the human eyes and the overall
current drain is equal to that of a single 7-segment display. Figure 6.39 gives the block diagram of a 4-digit
multiplexed 7-segment LED display system. Here, a counter (to be discussed later) drives the BCD-to-decimal
decoder 7442 and the output of the decoder through an inverter pulls up the common anode terminal to HIGH.
Each anode is excited in sequence at the rate determined by the clock frequency. Multi-digit 7-segment display
assemblies which can be used only in the multiplexed mode are also commercially available.
Vee
BCD { ~o--
: _ __,
=
inputs Co--------t
7447
Du-----_,
(MSB)
LT
----- RBI
GND
FND 507
-
Fig. 6.37 A 7447 Driving a 7-Segment LED Display
274 Modern Digital Electronics
Vee
R R R R
1-
_1 1-
_1 1-
_1 1-
_1
!_I !_I !_I !_I
MSD LSD
BCD inputs
Fig. 6.38 A 4-digit LED Display System with Leading Zero Blanking
Counter
Clock ----a
A B C D
A B C D
7442
0 2
R R R
1-
_1 1-
_1 1-
_1 1-
_1
!_I !_I !_I !_I
Vee
MSD LSD
BCD inputs
Fig. 6.39 A 4-digit Multiplexed Display System with Leading Zero Blanking
Combinational Logic Design Using MS! Circuits 275
SUMMARY
The most popular and commonly available MSI ICs and their applications have been discussed in this
chapter. Since the logic equations for these circuits are very complex, therefore, their applicability
must be recognised at the system level. Quite often, the system specifications are affected by the initial
knowledge of available standard circuits. Each technique discussed can be thought of as a tool and each
tool has its place. The designer has to make a proper choice of the tool for the job. Though more than
one tool may work for a given job, the key is to select the right one. Although system design has been
oriented around making use of higher levels of integration, a lot of little jobs of interfacing the MSI
devices are still best done with discrete gates.
Active-low inputs and outputs have been indicated by small circles throughout. Recently, many
authors have started using an alternative symbol (small right triangle) to represent the active-low input/
output to avoid confusion (of inversion) associated with the small circle. Figure 6.35 is redrawn in Fig.
6.40 to indicate this new system.
2
A}
B
C
Binary
outputs
Octal 3
inputs 4 74148
5
6
GS} Carry
7
EO outputs
EI
GLOSSARY
Arithmetic-logic unit (ALU) A logic circuit that performs arithmetic and logical operations.
Comparator A logic circuit that compares two binary numbers and produces an output indicating whether
they are equal or which is greater if they are unequal.
Demultiplexer A logic circuit that connects a single input line to one of the several output lines.
Dot matrix display A display device consisting of elements in the form of dots arranged in a matrix form.
It is used to display alphanumeric and special characters.
Driver A circuit capable of supplying high load current.
Hardware The physical parts forming a system.
Look-ahead carry A method of generating carry for fast addition.
Multiplexed display A display system used in multiplexed mode.
Priorly encoder An encoder that responds to the highest number when two or more numbers are applied
simultaneously.
276 Modern Digital Electronics
Strobe An input signal to a digital circuit that can enable or disable the circuit.
Subtractor A logic circuit used for subtraction.
Ten's complement It is 9's complement of a decimal number plus one.
REVIEW QUESTIONS
6.1 A logic circuit that gates one out of several inputs to single output is known as a _ _ _ _ __
6.2 A _ _ _ _ _ is a logic circuit that accepts one data input and distributes it over several
outputs.
6.3 The minimum number of selection inputs required for selecting one out of 32 inputs is _ _ __
6.4 A logic circuit required for converting BCD code to 7-segment code is known as _ _ _ _ __
6.5 In a BCD adder _ _ _ _ _ _ is added in case the sum is not valid BCD number.
6.6 A logic circuit used to compare binary numbers is _ _ _ _ _ __
6.7 _ _ _ _ _ _ _ is used in display systems to save_ _ _ _ _ __
6.8 A 4-variable logic expression can be realised using single _ _ _ _ _ _ multiplexer.
6.9 A decoder with 64 output lines has _ _ _ _ _ _ _ data inputs.
6.10 ALU stands for
-----------
6.11 A bubble at the output of a multiplexer indicates _ _ _ _ _ _ _ output.
6.12 Chip select input of a digital IC has L':,. symbol. This indicates _ _ _ _ __
6.13 A 4-digit display system with leading zero blanking displays 47 as _ _ _ _ _ __
6.14 _ _ _ _ _ _ _ _ complementation is used for performing BCD subtraction.
6.15 Subtractors are designed using _ _ _ _ _ _ _ I Cs.
PROBLEMS
6.1 Realise the logic function of table 6.3 using
(a) A 16:1 multiplexer IC 74150, and
(b) An 8:1 multiplexer IC 74152.
6.2 Design a 32: 1 multiplexer using two 16: 1 multiplexer I Cs
6.3 Design a full adder using 8:1 multiplexer ICs. Compare the IC package count with the NAND-NAND
realisation.
6.4 Design a 4-bit ADDER/SUBTRACTOR circuit with ADD/SUB control line.
6.5 Design a Gray-to-BCD code converter using
(a) Two dual 4:1 multiplexer ICs (74153) and some gates, and
(b) One 1:16 demultiplexer IC 74154 and NAND gates.
Combinational Logic Design Using MSI Circuits 277
a
a a a a
b
C f 1-:-1 f 1-;-1 f 1-:-1
1--:-1 b f b b b
Cathodes d
e e/-1
- -
c eI-le
- d
e/-/c
- e-I-le
d d
f d
g
Anodes
Fig. 6.41 A 4-digit 7-Segment Display System
6.27 A commonly used display system known as 7 x 5 dot matrix is shown in Fig. 6.42a. This is used to
display alphanumeric characters and some special symbols. It is desired to display R using this display
system whose pattern of glowing of the dots is shown in Fig. 6.42b. Design a suitable circuit for this .
• • • • • • • • •
2 • • • • • • •
3 • • • • • • •
ROWS
(Cathodes)
4 • • • • • •• • •
5 • • • • • • •
6 • • • • • • •
7.
DP •l 2• •3 4• •5 • •
COLUMNS
(Anodes)
(a) (b)
Fig. 6.42 A 7 x 5 Dot Matrix Display
CHAPTER 7
FLIP-FLOPS
7.1 INTRODUCTION
So far we have directed our studies towards the analysis and design of combinational digital circuits. Though
very important, it constitutes only a part of digital systems. The other major aspect of digital systems is
analysis and design of sequential circuits. However, sequential circuit design depends, to a large extent, on
the combinational circuit design discussed earlier.
There are many applications in which digital outputs are required to be generated in accordance with the
sequence in which the input signals are received. This requirement can not be satisfied using a combinational
logic system. These applications require outputs to be generated that are not only dependent on the present
input conditions but they also depend upon the past history of these inputs. The past history is provided by
feedback from the output back to the input.
A block diagram of a sequential circuit is shown in Fig. 7.1. It consists of combinational circuits which
accept digital signals from external inputs and from outputs of memory elements and generates signals for
external outputs and for inputs to memory elements referred to as excitation.
A memory element is some medium in which one bit of information ( 1 or 0) can be stored or retained until
necessary, and thereafter its contents can be replaced by a new value. The contents of memory elements in
Fig. 7.1 can be changed by the outputs of the combinational circuit which are connected to its input.
Ex
Nx
The combinational circuit performs certain operations, some of which are used to determine the digital
signals to be stored in memory elements. The other operations are performed on external inputs and memory
outputs to generate the external outputs.
The above process demonstrates the dependence of the external outputs of a sequential circuit on the
external inputs and the present contents of the memory elements (referred to as the present state of memory
elements). The new contents of the memory elements, referred to as the next state; depend on the external
inputs and the present state. Hence, the output of a sequential circuit is a function of the time sequence of
inputs and the internal states.
Sequential circuits are classified in two main categories, known as asynchronous and synchronous
sequential circuits depending on timing of their signals.
A sequential circuit whose behaviour depends upon the sequence in which the input signals change is
referred to as an asynchronous sequential circuit. The outputs will be affected whenever the inputs change.
The commonly used memory elements in these circuits are time delay devices. These can be regarded as
combinational circuits with feedback.
A sequential circuit whose behaviour can be defined from the knowledge of its signal at discrete instants
of time is referred to as a synchronous sequential circuit. In these systems, the memory elements are affected
only at discrete instants of time. The synchronization is achieved by a timing device known as a system clock
which generates a periodic train of clock pulses as shown in Fig. 7.2. The outputs are affected only with the
application of a clock pulse.
Bit-time Bit-time
n n+l
ftJLl_ __ _
0 T 2T (n -1) T nT (n + 1) T
••• t
Since the design of asynchronous circuits is more-tedious and difficult, therefore their uses are rather
limited.
Synchronous circuits have gained considerable domination and wide popularity and are also known as
clocked-sequential circuits. The memory elements used are FLIP-FLOPS which are capable of storing
binary information.
s 0-------;
(Set)
Ro------;
(Reset)
Fig. 7.4 The Memory Cell with Provision for Entering Data
If S = R = 0, the circuit is exactly the same as that of Fig. 7.3 (Prob. 7.1). If S = 1 and R = 0, the output of
G3 will be 0 and the output of G4 will be 1. Since one of the inputs of G I is 0, its output will certainly be 1.
Consequently, both the inputs of G2 will be 1 giving an output Q = 0. Hence, for this input condition, Q = 1
and Q= 0. Similarly, if S = 0 and R = 1 then the outputs will be Q = 0 and Q = 1. The first of these two input
conditions (S = 1, R = 0) makes Q = 1 which is referred to as the set state, whereas the second input condition
(S = 0, R = 1) makes Q = 0 which is referred to as the reset state or clear state. This gives us the means for
entering the desired bit in the latch.
Now we see what happens if the input conditions are changed from S = 1, R = 0 to S = R = 0 or from
S = 0, R = 1 to S = R = 0. The output remains unaltered (Prob. 7.2). This shows the basic difference
between a combinational circuit and a sequential circuit, even though the sequential circuit is made up of
combinational circuits.
The two input terminals are designated as set (S) and reset (R) because S = 1 brings the circuit in set state
and R = 1 brings it to reset or clear state.
282 Modern Digital Electronics
If S = R = 1, both the outputs Q and Q will try to become 1 which is not allowed and therefore, this input
condition is prohibited.
Assuming that the inputs do not change during the presence of the clock pulse, we can express the operation
of a FLIP-FLOP in the form of the truth table in Table 7.1 for the S-R FLIP-FLOP. Here Sn and Rn denote
the inputs and Qn the output during the bit time n (Fig. 7.2). Qn+t denotes the output Q after the pulse passes,
i.e. in the bit time n + 1.
Inputs
Output
s R Qn+l
" "
0 0 Q,,
l 0 l
0 l 0
l l ?
If Sn= Rn= 0, and the clock pulse is applied, the output at the end of the clock pulse is same as the output
before the clock pulse, i.e. Qn+t = Qn. This is indicated in the first row of the truth table.
If Sn= 1 and Rn= 0, the output at the end of the clock pulse will be 1, whereas if Sn= 0 and Rn= 1, then
Qn+t = 0. These are indicated in the second and third rows of the truth table respectively.
Flip-Flops 283
In the circuit of Fig. 7.4, it was mentioned that S = R = 1 is not allowed. Let us see what happens in the
S-R FLIP-FLOP of Fig. 7.5 if Sn= Rn= 1. When the clock is present the outputs of gates G 3 and G 4 are
both 0, making one of the inputs of G I and G 2 NANO gates 0. Consequently, Q and Q both will attain logic 1
which is inconsistent with our assumption of complementary
outputs. Now, when the clock pulse has passed away (CK=
0), the outputs of G 3 and G 4 will rise from Oto 1. Depending
s- - Q upon the propagation delays of the gates, either the stable state
S-R Qn+t = 1 (Qn+i = 0) or Qn+t = 0 (Qn+i = 1) will result. That means
CK - the state of the circuit is undefined, indeterminate or ambiguous
FLIP-FLOP
and therefore is indicated by a question mark (fourth row of the
R Q
truth table).
The condition S n = R n = 1 is forbidden and it must not be
allowed to occur.
Fig. 7.6 Logic Symbol of Clocked S-R The logic symbol of clocked S-R FLIP-FLOP is given
FLIP-FLOP
in Fig. 7.6.
Prest (Pr)
Clear (Cr)
(a)
Fig. 7.7 (a) An S-R FLIP- FLOP with Preset and Clear,
(b) Its Logic Symbol
284 Modern Digital Electronics
Pr
s 0---------, Q
S-R
CK o---------,
FLIP - FLOP
Ro---------, Q
Cr
( )
Fig. 7.7 (Continued)
The condition Pr = Cr = 0 must not be used, since this leads to an uncertain state.
In the logic symbol of Fig. 7.7b, bubbles are used for Pr and Cr inputs, which means these are active-low,
i.e. the intended function is performed when the signal applied to Pr or Cr is LOW The operation of Fig. 7.7
is summarised in Table 7.2.
The circuit can be designed such that the asynchronous inputs override the clock, i.e. the circuit can be set
or reset even in the presence of the clock pulse (Prob. 7.4).
S=J·Q (7.la)
R=K·Q (7.1 b)
AJ-K FLIP-FLOP thus obtained is shown in Fig. 7.8. Its truth table is given in Table 7.3a which is
reduced to Table 7.3b for convenience. Table 7.3a has been prepared for all the possible combinations of J
Flip-Flops 285
and K inputs, and for each combination both the states of the output have been considered. The reader can
verify this (Prob. 7.5).
Pr
S= JQ
l-----+---<>------0 Q
Ju-----,
S-R
CK 0------1
FF
l------+---ll------0 Q
R = KQ
Cr
Inputs to
Data inputs Outputs S-RFF Output
I -
I
Inputs I Output
J,, K,, Qn+I
0 0 Q,,
l 0 l
0 l 0
l l Qn
It is not necessary to use the AND gates of Fig. 7.8, since the same function can be performed by adding an
extra input terminal to each NANO gate G3 and G4 of Fig. 7.7 (Prob. 7.6). With this modification incorporated
in Fig. 7.7, we obtain the J-K FLIP-FLOP using NANO gates as shown in Fig. 7.9. The logic symbol of J-K
FLIP-FLOP is given in Fig. 7.10.
Pr
Jo------1 f-------0 Q
CK 0------1
J- K
FF
K o------1 f------OQ
Cr
"~•,/1~ 0 T
Fig. 7.11 A Clock Pulse
The race-around condition can be avoided if tp < M < T. However, it may be difficult to satisfy this
inequality because of very small propagation delays in ICs. A more practical method for overcoming this
difficulty is the use of the master- slave (M-S) configuration discussed below.
Pr
CK
Cr
CK
When CK= 1, the first FLIP-FLOP is enabled and the outputs Q Mand QMrespond to the inputsJ and K
according to Table 7.3. At this time, the second FLIP- FLOP is inhibited because its clock is LOW (CK= 0).
When CK goes LOW (CK= 1), the first FLIP-FLOP is inhibited and the second FLIP-FLOP is enabled,
because now its clock is HIGH (CK= 1). Therefore, the outputs Q and Q follow the outputs QM and QM,
respectively (second and third rows of Table 7.3b). Since the second FLIP-FLOP simply follows the first
one, it is referred to as the slave and the first one as the master. Hence, this configuration is referred to as
master-slave (M-S) FLIP-FLOP .
288 Modern Digital Electronics
https://static.javatpoint.com/tutorial/digital-electronics/images/d-flip-flop2.png
Pr Pr
J rS
D J-K Q D Q
r D
CK S-R CK FF
FF
Q Q
K rR
Cr Cr
(a) ( )
Fig. 7.14 (a)A J-K or S-R FLIP-FLOP Converted into a D-type FLIP-FLOP (b) its Logic Symbol
Input Output
D,, Qn+l
0 0
Flip-Flops 289
This is equivalent to saying that the input data appears at the output at the end of the clock pulse. Thus,
the transfer of data from the input to the output is delayed and hence the name delay (D) FLIP-FLOP . The
D-type FLIP- FLOP is either used as a delay device or as a latch to store 1-bit of binary information.
Pr Pr
J
T Q T Q
J-K T
CK FF CK FF
Q Q
K
Cr Cr
(a) ( )
Fig. 7 . 15 (a) AJ-K FLIP-FLOP Converted into a T-type FLIP-FLOP (b) its Logic Symbol
Input Output
T,, Qn+I
0
Q,,
An S-R FLIP-FLOP cannot be converted into a T-type FLIP-FLOP since S= R = I is not allowed. However,
the circuit of Fig. 7.16 acts as a toggle switch, i.e. the output Q changes with every clock pulse (Prob. 7.11 ).
S - - Q
S-R
CK - r> FF
R -
Q
We conclude from the above conditions that the Sn input must be 0, whereas the Rn input may be either
0 or 1 (don't-care). Similarly, input conditions can be found for all possible situations. A tabulation of
these conditions is known as the excitation table. It is a very important and useful design aid for sequential
circuits. Table 7.6 gives the excitation tables of S-R, J-K, T, and D FLIP- FLO Ps. This is derived from the
characteristic table of the FLIP-FLOP.
coupled with some combinational set/reset decoding logic to allow some input control over the set and reset
operations of the cell. The steps for the design of FLIP-FLOP are given below.
Set/Reset Feedback
Decoder
I
I
I
~---------------------------------~
Fig. 7 .17 The General Model of the FLIP- FLOP
Step 1. Examine each row of the given characteristic table, specifying the desired inputs and outputs, and
answer the following questions and make a truth table with Y1 and Y2 as output variables.
Step 2. Prepare the K-map for Y1 and Y2 output variables, minimize it and determine the logic for Y1 and Y2,
respectively. Draw the complete circuit using gates.
The above design steps are illustrated in Example 7 .1.
Example 7.1
Using the technique described above, design a clocked S- R FLIP - FLOP whose characteristic table is given in
Table 7.7.
Solution
Step 1. Determine the values of Y, and Y2 for each row. For example, for the first row Q" = 0 and Qn+i = 0. To obtain
Qn+i = 0, Y , must be equal to l , since Q"= l , Y2 can be 0 or l since Q" = 0. In a similar manner, complete
the truth table (Table 7.7).
292 Modern Digital Electronics
CK s R Q,, Y, Y,
0 0 0 0 0 X
0 0 0 1 1 X
0 0 0 0 X
0 0 1 1 1 X
0 0 0 0 X
0 0 1 1 X
0 0 0
0 1 1 1 1 X :}•
0 0 0 0 X
0 0 1 1 X
0 0 0 X
0 1 0 1 0
0 0 0
0 X
0 X X
X X :}•·
*S = R = I can happen with no clock.
**S = R = I must not happen.
Step 2. The K-maps for Y, and Y2 are given in Fig. 7.18 which give
CKS CKS
RQn 00 01 11 10 RQn 00 01 11 10
~
00 0 00 X X X
01 X X X X 01
11 X X X 11 X 0
10 X 10 X X X X
Y1 Y2
Fig. 7.18 K-maps for Ex. 7.1
------
Flip-Flops 293
J; = CK +S = CK · S
½= R + CK = CK · R
Thus, we see that the circuit resulting from this design is the same as that shown in Fig. 7.5.
f--------t---0 Q
FLIP - FLOP
FLIP-FLOP Given
Data Inputs Conversion
FLIP - FLOP
logic
f-------'-----0 Q
Fig. 7.19 The General Model Used to Convert One Type o/FLIP-FLOP to Another Type
To design the conversion logic we need to combine the excitation tables for both FLIP-FLOPS and make
a truth table with data input(s) and Q as the inputs and the input(s) of the given FLIP-FLOP as the output(s).
The conventional method of combinational logic design then follows as usual. The conversion is illustrated
in Example 7.2.
Example 7.2
Convert an S- R FLIP - FLOP to a J- K FLIP - FLOP.
Solution
The excitation tables of S- R and J- K FLIP - FLOPS are given in Table 7.6 from which we make the truth table
given in Table 7.8.
294 Modern Digital Electronics
Row J K Q s R
0 0 0 0 X
2 0 1 0 0 X
3 0 0 0
4 1 0 1 0
5 0 0
6 1 1 0 1
7 0 0 X 0
8 0 X 0
JK JK
00 01 11 10 Q 00 01 11 10
Q
0 0 0 1 1 I 0 X X 0 0
I
1 X 0 0 X 1 0 I 1 1 I 0
s R
Fig. 7.20 K-mapsfor Ex. 7.2
and R = K-Q
Thus, we see that the circuit resulting from this design is the same as that shown in Fig. 7.8.
clock is present ( CK = 1) and the output of the slave will be available at the falling edge of the clock pulse
(CK= 0). As discussed in Section 7 .4, this eliminates the problem of race-around condition. In this the data
is locked-out at the falling edge of the clock pulse, i.e. the changes occurring at the inputs once CK goes to 0
will not affect the operation of the FLIP-FLOP.
The inputs to the FLIP-FLOP may change during the presence of the clock pulse due to certain operations
in the system. This causes uncertainty in the outputs of the FLIP-FLOP which is eliminated by using edge-
triggered FLIP- FLO PS.
In the case ofan edge-triggered FLIP-FLOP, the transfer of information from data input(s) to the output
of the FLIP-FLOP occurs at the positive (or negative) edge of the clock pulse. The only time the outputs can
change state is during the brief interval of time when the clock signal is making a transition from the Oto 1
(j), or in some circuits, from the 1 to OU) states. A FLIP-FLOP which responds only to rising (or falling)
edge is referred to as positive-edge-triggered (or negative-edge-triggered). The data lock-out occurs at the
end of the edge.
The logic symbol used for an edge-triggered FLIP-FLOP is the same as that ofa master-slave FLIP-
FLOP. These are shown in Figs. 7.13, 7.14b, and 7.15b.
The timing specifications ofan edge-triggered FLIP-FLOP are illustrated in Fig. 7.21 and are explained
below.
Set-up Time (t.) It is the time required for the input data to settle in before the triggering edge of the
clock. Its minimum time is usually specified by the manufacturers.
Hold Time (th) It is the time for which the data must remain stable after the triggering edge of the clock.
Minimum value of hold time is specified by the manufacturers.
The t. and th timings are shown in Fig. 7.21a.
Propagation Delays Similar to propagation delay in combinational circuits, there is delay in the
FLIP-FLOP output Q, making a change from HIGH-to-LOW or LOW-to-HIGH when a clock pulse is
applied. These delays are specified between the 50% points on the clock and data input waveforms. The
propagation delay, when the output Q changes from LOW-to-HIGH and HIGH-to-LOW, are specified as tpLH
and tpHL respectively. These are shown in Fig. 7.21b.
Clock Pulse Width The minimum time duration for which the clock pulse must remain HIGH (tCH) and
LOW (tcL) are specified by the manufacturers. Failure to meet these requirements may result in unreliable
triggering. These timings are specified between the 50% points on the clock transitions and are shown in Fig
7.21c.
Preset and Clear Pulse Width The manufacturers also specify the minimum time duration for a
preset input (tpLH) and clear input (tpHL).
Maximum Clock Frequency The maximum clock frequency (/max) is the highest rate at which a
FLIP- FLOP can be reliably triggered. If the clock frequency is higher than this, the FF will be enable to
trigger reliably.
Various timing values for some of the commonly used TTL and CMOS FLIP-FLOPs are given in
Table 7.9.