Digital Electronics - Principal and Application PDF
Digital Electronics - Principal and Application PDF
Information contained in this work has been obtained by Tata McGraw Hill, from sources believed to be reliable.
However, neither Tata McGraw Hill nor its authors guarantee the accuracy or completeness of any information published
herein, and neither Tata McGraw Hill nor its authors shall be responsible for any errors, omissions, or damages arising out
of use of this information. This work is published with the understanding that Tata McGrawHill and its authors are
supplying information but are not attempting to render engineering or other professional services. If such services are
required, the assistance of an appropriate professional should be sought.
Typeset at Text-o-Graphics, B1/56 Arawali Apartment, Sector 34, Noida 201301 and printed at India,
Lalit Offset Printer, 219, F.I.E., Patpar Ganj, Industrial Area, Delhi-110092
Cover Printer: SDR
RALYCRLZDDAZA
Dedication
In the memory of
my youngest son —Late Gajanan Mandal
and to
my parents — Smt. Arati Mandal and Shri Prokash Mandal
my wife — Malvika
and
my children — Om and Puja.
CONTENTS
Preface xi 2.5 Logic Gates 55
2.6 Universal Gate 61
1. NUMBER SYSTEM 1
2.7 Simplification of Logic Circuits 64
1.1 Introduction 1
2.8 Consensus Theorem 69
1.2 Analog Systems 2
2.9 Positive Logic and Negative Logic 70
1.3 Digital Systems 2
Summary 71
1.4 Limitations of Digital Systems 4
Multiple Choice Questions 72
1.5 Digital Number Systems 4
Review Questions 74
1.6 Binary Arithmetics 20
1.7 Signed Magnitude 24 3. DIGITAL LOGIC FAMILY 76
1.8 One’s Complement 25 3.1 Introduction 76
1.9 Two’s Complement 25 3.2 Classification of Digital Logic Family 76
1.10 Subtraction by using Two’s Complement 26 3.3 Characteristics of Digital Logic Family 77
1.11 Overflow 27 3.4 BJT Characteristics 81
1.12 Binary Coded Decimal (BCD) Number 3.5 Direct Coupled Transistor Logic (DCTL) 82
System 29 3.6 Resistor Transistor Logic (RTL) 82
1.13 Packed BCD 29 3.7 Diode Transistor Logic (DTL) 83
1.14 Gray Code (Reflected Code) 30 3.8 Transistor-Transistor Logic (TTL) 83
1.15 Gray Code to Binary Conversion 31 3.9 Emitter Coupled Logic (ECL) 85
1.16 Binary to Gray Code Conversion 31 3.10 Schottky TTL 85
1.17 Excess-3 (XS3) Code 32 3.11 High Threshold Logic (HTL) 86
1.18 Decimal to Excess-3 (XS3) Conversions 32 3.12 Integrated Injection Logic (IIL) 86
1.19 Weighted BCD Codes 32 3.13 TTL Logic Gates 88
1.20 ASCII Code 35 3.14 Characteristics of TTL 96
1.21 EBCDIC 37 3.15 Metal Oxide Semiconductor FETs (MOSFET)
1.22 Parity Bit 38 Characteristics 102
1.23 Error Correcting Code: Hamming Code 40 3.16 MOS Characteristics 107
Summary 42 3.17 CMOS Gates 107
3.18 CMOS Characteristics 111
Multiple Choice Questions 42
3.19 Interfacing TTL and CMOS Logic
Review Questions 44
Family 113
2. BOOLEAN ALGEBRA AND LOGIC GATES 46 3.20 Advantages and Disadvantages of CMOS Over
2.1 Introduction 46 TTL 116
2.2 Boolean Algebra 47 Summary 117
2.3 Boolean Laws 49 Multiple Choice Questions 117
2.4 De Morgan’s Theorem 53 Review Questions 119
viii Contents
Chapter 6 gives a detailed exposition of arithmetic and logic circuits such as binary addition, subtraction, carry
look-ahead addition, serial and parallel adder, binary multiplier, binary division, Arithmetic Logic Units (ALU), and
digital comparators.
Chapter 7 elucidates various types of latches and flip-flops such as S-R Latch using gates, D latch, edge - triggered
S-R, D, T, and JK flip-flop, flip-flop with asynchronous inputs, conversion from one type of flip-flop to another type,
operating characteristics and applications of flip-flops. The structures of flip-flops are discussed highlighting the difference
between latch and flip-flops with level-triggered and edge-triggered.
Chapter 8 covers sequential circuits such as register, shift register, buffer register, universal shift register,
applications of shift registers, asynchronous (Ripple) and synchronous counters, propagation delay in counter, mod-n
counter, counter design steps, cascade counters, programmable or pre-settable counters, self-starting and self-correcting
counters, and counter applications.
Chapter 9 deals with sequential circuits design. The sequential circuit model, state table, state diagram, state equation,
design procedure of sequential circuits, state reduction of synchronous sequential circuits, and asynchronous sequential
circuits are discussed. The Algorithmic State Machines (ASM), ASM Chart, difference between conventional flow chart
and ASM Chart are discussed in this chapter. Abundant examples of sequential circuits design are incorporated.
Chapter 10 gives the basic concept of multivibrators and types of multivibrators such as monostable, bistable, and
astable multivibrators. The 555 timer and its applications, 556 timer, 74121 monostable multivibrator, 74122 and 74123
retriggerable monostable multivibrators are explained.
Chapter 11 covers various methods of Digital to Analog Converters (DAC) and Analog to Digital Converters
(ADC), specification of ADC and DAC and applications of ADC and DAC.
Chapter 12 describes the fundamental concept of semiconductor memories, classification of memory, memory
organisation and its operation. Read Only Memory (ROM), Random Access Memory (RAM), sequential memory, Charge
Coupled Device (CCD), magnetic disk memory, and Content Addressesable Memory (CAM) are explained.
Chapter 13 covers the various programmable logic devices such as PROM, PLA and PAL. The comparison
between PROM, PAL and PLA is highlighted, and fundamental knowledge of Simple Programmable Logic Devices
(SPLDs), Complex Programmable Logic Devices (CPLDs) and Field Programmable Gate Array (FPGA) are discussed.
Chapter 14 deals with computer aided digital systems design. The basic concept of Computer Aided Design
(CAD), CAD tools, Hardware Description Language (HDL), Very high speed integrated circuit Hardware Description
Language (VHDL) and Verilog HDL are elaborately discussed.
Chapter 15 presents laboratory experiments that can be performed with hardware and be simulated with software.
Experiments on basic logic circuits using diodes, transistors and logic gates, combinational logic circuits, flip-flops,
registers, seven-segment display and decoder driver, counters, cascade counters, self-starting and self-correcting
counters, sequence generator, up-down counter, multivibrators, DAC and ADC are presented with their required formal
information. Experiments on VHDL simulation of digital systems are also incorporated.
Appendix A is a discussion on the IEEE standard graphic symbols for logic functions.
Appendix B provides the pin diagram of logic gates.
Appendix C contains glossary with explanation of important terms.
Appendix D includes answers of multiple choice questions.
Web Resources
This book is accompanied with an exhaustive online learning centre designed to provide valuable resources for instructors and
students.
For Instructors: For Students:
• Solutions Manual • Test Bank (includes Additional Questions for Practice)
• PowerPoint Slides • Tutorials on Digital Electronics
• Lab Assignments • Solutions to Selected Questions
• Chapter-wise Objectives
• References and Website Addresses
xiv Preface
Acknowledgements
The author has received inspiration and co-operation for completion of this book from Dr Gurnam Singh, PEC, Chandigarh;
Dr S Chatterjee, NITTTR, Chandigarh; Dr S K Bhattachariya, Former Director, NITTTR, Kolkata; Prof Amitabha Sinha,
Director School of Information Technology, WBUT; Dr C K Chanda and Dr P Shyam, Bengal Engineering College,
Shibpur; Dr P Sarkar, Professor and Head Electrical, Dr S Chattopadhay, Assistant Professor, and Dr S Pal, Senior
Lecturer, NITTTR, Kolkata. The author is thankful to the Electrical Engineering staff, specially A K Das, N K Sarkar,
S Roy Choudhury, and Surojit Mallick for their valuable assistance. Special thanks go to the Tata McGraw Hill team,
namely, Vibha Mahajan, Shalini Jha, Surabhi Shukla, Surbhi Suman, Dipika Dey, Anjali Razdan and Baldev Raj for their
excellent publishing initiatives.
A note of acknowledgement is due to the following reviewers for their valuable suggestions.
The readers of the book are encouraged to send their comments, queries and suggestions at the following email
id—[email protected] (kindly mention the title and author name in the subject line).
SOUMITRA KUMAR MANDAL
CHAPTER
1
NUMBER SYSTEM
1.1 INTRODUCTION
In science, technology, business, and all other fields, we always deal with quantities. Quantities can be
measured, monitored, recorded, manipulated arithmetically, observed, or in some other way utilised in
most physical systems. It is necessary to represent their values efficiently and accurately. Quantities are
represented by two ways: analog and digital. In analog representation, a quantity is represented by a volt-
age or current. Analog quantities have an important characteristic: they are continuous and can vary in
wide range of values. Figure 1.1 shows the analog voltage variation with time.
In digital representation, the quantities are represented by symbols called digits. In a digital watch, the
time of day is represented in the form of decimal digits which stand for hours, minutes and seconds.
Though the time of day changes continuously, the digital watch reading does not change continuously.
It changes in steps of one per minute or per second. Therefore, this digital representation changes in
discrete steps, as compared to an analog watch, where the dial reading changes continuously. The ana-
log voltage is digitalised and represented by discrete steps as shown in Fig. 1.2. The major difference
between analog and digital quantities can be simply stated that analog signal is continuous and digital
signal is discrete one.
any voltage between 0V to 0.8V. It will be noted that voltage between 0.8V to 2V is not used and
this may create error in a digital circuit.
In a digital system, all communication within the system are carried out in a digital manner. Usually,
the digital communication means that all signals within the system can have only two possible states of
OFF and ON or ‘0’ and ‘1’. Digital electronics is the branch of electronics and these electronic systems
are composed of elements that exhibit this digital behavior. As a digital system can only exhibit one of
two possible states, they are usually easier to understand than analog systems, which can have an infinite
number of states. The field of digital electronics is very exciting, and fast changing. Advances in digital
electronics make it possible to do very complex system in a simple manner. Digital electronics are a key
element of many products, namely personal computers, sophisticated sewing machines, microwave ov-
ens, compact disc players, and video cassette players, etc. The brains of all of these products and many
parts of these products are composed of digital electronics. Presently, it is very difficult to survive in this
world without digital electronics.
• Large numbers of transistors are required for performing some operations that can be implemented
using simpler analog hardware. For instance, additions and multiplications by constants can be
easily implemented using analog circuits based on operational amplifiers.
• In some situations, the operation speed is lower than the speed offered by equivalent analog
circuits.
The block diagram of speed control system is shown in Fig.1.4 and this speed control system requires
analog to digital converter for converting analog signals to digital form. Firstly, the speed is measured in
analog form and then converted into digital form by using analog to digital converter. This digital speed
signal is used as input of digital signal processor. After that digital signal is processed by digital signal
processor circuit, its digital output is fed to digital to analog converter. The digital to analog converter
converts the digital signal to analog form. This analog output is used as an input of the controller and
controller’s output takes necessary action to adjust the speed. Therefore, it is confirmed from the above
system that the data conversion is the major drawback of application of digital electronics.
Fig. 1.4 Block diagram of speed control system that requires analog to digital converter
hexadecimal systems. The decimal system is the most familiar number system that we commonly use
in everyday life.
103 = 1000 102 = 100 101 = 10 100 = 1 . 10–1 = 0.1 10–2 = 0.01 10–3 = 0.001
Most Decimal Least
Significant point Significant
Digit (MSD) Digit (LSD)
The example of decimal numbers are 6897 and 27.95. The decimal number (6897)10 can be written
as
(6897)10 = 6 × 103 + 8 × 102 + 9 × 101 + 7 × 10° and the number (27.95)10 can be represented
as
(27.95)10 = 2 × 101 + 7 × 10° + 9 × 10–1 + 5 × 10–2.
Any positive integer can be represented by symbol or digits in a positional number system. The
number N can be represented in the equation form
Decimal Point
The di represents the digits, which have ten values ranging from 0 to 9. The value of ‘n’ may be any
real integer to express the number N. The digit on the extreme right is called the least significant digit
(LSD) because it has the lowest positional value of 1 for integers. The next digit to the left of this least
significant digit has the positional value of 10; the next, 100; and so on. The digit on the extreme left
is called the most significant digit (MSD) as it has the highest positional value. The use of positional
numbers can be extended to fractions by adding a decimal point and letting digits to the right of the
decimal represent 1/10ths, 1/100ths, and so on, depending on position. The number N can be determined
from equation (1.2).
N = dn × 10n + dn–1 × 10n–1 + . . . . . . . + d1 × 101 + d0 × 100 + d–1 × 10–1 + d–2 × 10–2 . . . (1.2)
representation in “base 10” can be extended to 2 (binary), 8 (octal), and 16 (hexadecimal) based number
system. The generalised representation of a positional number to any base b is given by equation (1.3)
and (1.4).
N = 10101010112 = (1010101011)2
where, the subscript ‘2’ denoting the base of binary number system.
By using the formula of the general position number system, the number N can be presented in terms
of base 10 or decimal numbers.
N = 1 × 29 + 0 × 28 + 1 × 27 + 0 × 26 + 1 × 25 + 0 × 24 + 1 × 23 + 0 × 22 + 1 × 21 + 1 × 20
= 512 + 0 +128 + 0 + 32 + 16 + 8 + 2 + 1 = (699)10
It is very convenient to determine the equivalent decimal number if we represent the positional value
of each of the digits existing in binary. After that, we add the positional values corresponding to nonzero
digits ‘1’. The positional value of each digit is given below:
512 256 128 64 32 16 8 4 2 1
Number System 7
In the binary system, there are only two symbols or possible digit values, ‘0’ and ‘1’. This base-2
system can be used to represent any quantity that can be represented in decimal. Table 1.2 shows the
representation of binary number.
The four bit binary number with different possibilities is represented by decimal equivalent as shown
in Table 1.3.
Table 1.3 Four bit binary numbers and it’s decimal equivalent
(1 1 1 0 1 1) 2 (binary)
25 + 24 + 23 + 0 + 21 + 20 = 32 + 16 + 8 + 0 + 2 + 1
= 5910 (decimal)
and similarly, the binary number (110110101)2 is converted into decimal number (437)10.
11 0 1 1 0 1 0 1 2 (binary)
8 7 5 4 2 0
2 +2 +0+2 +2 +0+2 + 0+2 = 256 + 128 + 0 + 32 + 16 + 0 + 4 + 0 + 1
= 43710 (decimal)
It should be noticed that this method is to find the weights (i.e., powers of 2) for each bit position that
contains a 1, and then to add them up.
MSB LSB
All of the remainders from the division are then arranged in reverse order, from MSB to LSB
to form the correct binary sequence. Therefore, the binary equivalent of decimal number (600)10 is
(1001011000)2. The binary equivalent values for 0-15 are presented in Table1.4.
Table 1.4 The binary equivalent values for 0–15
� Solution
(a) (1110011)2 = 1 × 26 + 1 × 25 + 1 × 24 + 0 × 23 + 0 × 22 + 1 × 21 + 1 × 20
= 1 × 64 + 1 × 32 + 1 × 16 + 0 × 8 + 0 × 4 + 1 × 2 + 1 × 1
= 64 + 32 + 16 + 2 + 1 = 115
(b) (1101.11)2 = 1 × 23 + 1 × 22 + 0 × 21 + 1 × 20 + 1 × 2–1 + 1 × 2-2
= 1 × 8 + 1 × 4 + 0 × 2 + 1 × 1 + 1 × 0.5 + 1 × 0.25
= 8 + 4 + 1 + 0.5 + 0.25 = 13.75
Number System 11
Repetitive Division
This method uses repeated division by 8. Figure 1.8 depicted the flow chart for converting decimal
number into by repeated division.
The example is converting 17810 to octal:
178/8 = 22+ remainder 2 2 (Least Significant Digit)
22/ 8 = 2 + remainder 6 6
2 / 8 = 0 + remainder 2 2
(Most Significant Digit)
Result 17810 = 2628
Number System 13
1 1 3 2
MSD LSD
All of the remainders from the division are then
arranged in reverse order, from MSD to LSD to
form the correct octal sequence. Therefore the octal
equivalent of decimal number (602)10 is (1132)8.
1.5.9 Binary-to-Octal/Octal-to-Bi-
nary Conversion
The binary equivalent of octal digits 0 to 7 are Fig. 1.8 Flow chart for converting decimal
number into octal by repeated
presented in Table 1.6. division
It is clear from Table 1.6 that each octal digit is represented by three bits of binary digit. The example
of binary to octal conversion is
(111 100 111 010)2 = (111) (100) (111) (010)2 =(7 4 7 2 )8.
Similarly, the octal number (24657)8 can represented by binary number (010) (100) (110) (101)
(111)2= (010100110101111)2.
� Solution
(a) Conversion of (234)10 to octal
234/ 8 = 29+ remainder of 2 2 (Least Significant Digit)
29 / 8 = 3 + remainder of 5 5
3 / 8 = 0 + remainder of 3 3 (Most Significant Digit)
Result 23410 = (352)8
(b) Conversion of (2988.6875)10 to octal
2988/ 8 = 373 + remainder of 4 4 (Least Significant Digit)
373/ 8 = 46 + remainder of 5 5
46 / 8 = 5 + remainder of 6 1
5/8 = 0 + remainder of 5 5(Most Significant Digit)
Result 298810 = (5154)8
� Solution
(a) Conversion of (370.526)8 to binary (370.526)8 = 011 111 000.101 010 110
(b) Conversion of (2702)8 to binary (2702)8 = 010 111 000 010
� Solution
(a) Conversion of (101111001110.001 100)2 to octal
(101111001110.001 100)2 = (101) (111) (001) (110). (001) (100) = (5716.14)8
(b) Conversion of (.111001111)2 to octal (.111001111)2 = (.111) (001) (111) = (.717)8
163 = 4096 162 = 256 161 = 16 160 = 1 . 16–1 = 1/16 16–2 = 1/256 16–3 = 1/4096
Most Hexadeci- Least
Significant mal Point Significant
Digit (MSD) Digit (LSD)
MSD LSD
All of the remainders from the division are then ar-
ranged in reverse order, from MSD to LSD to form the
Fig. 1.9 Flow chart for converting decimal correct hexadecimal sequence. Therefore, the hexa-
number into hexadecimal by
repeated division decimal equivalent of decimal number (5789)10 is
(169D)16.
Hexadecimal-to-Octal Conversion
In hexadecimal to binary conversion, three steps are required. The first step is to convert hexadecimal to
binary. The second step is regrouping the binary number in 3 bits a group which starts from the LSB. In
third step, the groups of 3 bits binary number can be represented by octal numbers. One example is the
conversion of (5A8)16 to Octal number as follows:
To convert hexadecimal number (5A8)16 to octal number, all the three steps are presented below:
5A816 = (0101 1010 1000)2 (Binary) Step 1
= (010) (110) (101) (000) Step 2
= (2 6 5 0)8 (Octal) Step 3
� Solution
(a) (F2C)16 = F × 162 + 2 × 161 + C × 160 = 15 × 256 + 2 × 16 + 12 × 1
= 3840 + 32 + 12 = 3884
18 Digital Electronics: Principles and Applications
� Solution
(a) Conversion of (905)10 to hexadecimal
905/ 16 = 56+ remainder of 9 9(Least Significant Digit)
56/ 16 = 3 + remainder of 8 8
3/16 = 0 + remainder of 3 3(Most Significant Digit)
Result (905)10 = 38916
� Solution
(a) Conversion of (0.625)10 to hexadecimal
� Solution
(a) Conversion of (A4C)16 to binary (A4C)16 = (1010 0100 1100)2
(b) Conversion of (3E7.DA)16 to binary (3E7.DA)16 = (0011 1110 0111.1101 1010)2
� Solution
(a) Conversion of (101111001011)2 to hexadecimal
(101111001011)2 = (1011) (1100) (1011) = (BCB)16
(b) Conversion of (1011110011.00110010)2 to hexadecimal
(1011 1100 1101.00110010)2 = (1011) (1100) (1101) . (0011) (0010) = (BCD.32)16
� Solution
(a) Conversion of (744)8 to hexadecimal
(744)8 = (111 100 100)2
Forming into groups of 4 bits
= (0001 1110 0100)2 = (1E4)16
(b) Conversion of (3472.56)8 to hexadecimal
(3472.56)8 = (011 100 111 010.101 110)2
Forming into groups of 4 bits
= (0111 0011 1010.1011 1000)2 = (73A.B8)16
� Solution
(a) Conversion of (B7A4)16 to octal
(B7A4)16 = (1011 0111 1010 0100)2
Forming into groups of 3 bits
= (001 011 011 110 100 100)2 = (133644)8
(b) Conversion of (D43E.5A)16 to octal
(D43E.5A)16 = ( 1101 0100 0011 1110 . 0101 1010)2
Forming into groups of 3 bits
= (001 101 010 000 111 110 . 010 110 100)2 = (152076.264)8
20 Digital Electronics: Principles and Applications
100
11 Borrow bits
1 1 0 .0 0 1
– 1 0 1 .1 1 0
0 1 0. 0 1 1
By using rules of binary subtraction, we will be able to subtract two binary numbers as shown above.
But there is another method for binary subtraction, i.e., two’s complement. This method is better than
conventional method and explained latter on.
1011010
×11011 Table 1.12 Rules of binary
multiplication
1011010
0×0=0
1011010×
1×0=0
0000000××
1011010××× 0×1=0
1011010×××× 1×1=1
100101111110
The result of the multiplication of (1011010)2 and (11011)2 is (10 0 1 0 1 1 1 1 1 10)2.
The second example to perform (1100)2 ¥ (1010)2 is
22 Digital Electronics: Principles and Applications
1100
×1010
0000
1100×
0000××
1100×××
1111000
The result of the multiplication of (1100)2 and (1010)2 is (11110000)2.
The third example is multiplication between (1.01)2 and (10.1)2
1.01
×10.1
101
000×
101××
1 1. 0 0 1
The result of the multiplication of (1.01)2 and (10.1)2 is (1 1 . 0 0 1)2.
00111
111
000
� Solution
a) 1 0 1 0 1
11010
101111
Carry
11 Carry
(b) 1 0 0 1
0011
1100
� Solution
1 Borrow
(a) 101010
–100
100110
(b) 1110010
– 0000110
1101100
� Solution
(a) 10101
×101
10101
00000×
10101××
1101001
(b) 1111
×1100
24 Digital Electronics: Principles and Applications
0000
0000×
1111××
1111×××
10110100
(b) 1 1 1 ) 1 0 1 1 0 1 1 (1101
111
1000
111
111
111
10011
� Solution
(a) 15 = 0000 1111 in 8 bit notation
one’s complement of 15 = 1111 0000
In two’s complement form, –15= 1111 0000 + 1 = 1111 0001.
22 = 0001 0110 in 8 bit notation
one’s complement of 22 = 1110 1001
In two’s complement form, –22 = 1110 1001 + 1 = 1110 1010.
11110001 –15
11101010 –22
111011011 –37
(b) 22 = 0001 0110
–15 = 1111 0001
00010110 22
11110001 –15
100000111 7
1.11 OVERFLOW
In digital system, the size of the word is fixed. If the magnitude of the number after addition or subtraction
operation exceeds the allotted number of bits, an overflow occurs. Therefore, errors are generated. With
28 Digital Electronics: Principles and Applications
eight bits, we can represent one hundred twenty eight steps from zero to one hundred twenty seven (0 to
+127) or (0 to –127). This means that maximum number is +127 (0111 1111) and lowest number is –128
(1000 0000). In this case, the eighth binary digit is used to represent sign. During addition of two binary
numbers, if the result is more than +127, over flow exists. Consider two numbers (64)10 and (75)10. The
binary representation of (64)10 and (75)10 are (64)10 = (0100 0000)2 and (75)10= (0100 1011)2 respectively.
The addition of two binary numbers (0100 0000)2 and (0100 1011)2 is shown below:
0100 0000 (64)10
0100 1011 (75)10
1000 1011 (–11)10
The result is (1000 1011)2. After discarding the left most bit, the result will be incorrect as it is
negative number (–11)10 in place of (139)10. Another example is addition of two negative numbers
(–64)10 and (–75)10.
(–64)10 = 1111 1110
(–75)10 = 1011 0101
11011 0011
The result of addition of (–64)10 and (–75)10 is equal to (11011 0011)2. After discarding the extra bit,
the result is (–41)10, but the correct answer is (–139)10 . Therefore, to get the correct results bit fields
must be sufficiently large. Presently, consider nine bits to represent numbers and the ninth bit (most
significant bit) can be used as sign bit. Then the addition of (+64)10 & (+75)10 and (–64)10 & (–75)10 are
given below :
Addition of (+64)10 & (+75)10
0 0100 0000 (+64)10
0 0100 1011 (+75)10
0 1000 1011 (+139)10
Addition of (–64)10 & (–75)10
(–64)10 = 1 1111 1110
(–75)10 = 1 1011 0101
Discard
Form the above examples; we get correct answers by using sufficiently large bit fields to handle the
magnitude of the sums. The overflow can be detected after decimal addition and compare the result
with binary answers. After addition (+64)10 and (+75)10 we are supposed to get (+139)10, but binary sum
checked out to be (–11)10. Therefore, we can say that something has to be wrong. Actually overflow is
the reason for wrongness. Auspiciously, overflow detection is easily implemented in electronic circuits
and it is a standard feature in digital adder circuits.
Number System 29
Conversion from Decimal to BCD is very simple as shown in Table 1.16. Each digit of the decimal
number can be represented by a byte. Then we can convert 0 through 9 to 0000 0000 through 0000 1001.
The BCD equivalent value for the decimal number 5,219 is shown below. Since there are four digits in
our decimal number, there are four bytes in our BCD number.
In computer, the minimum of 1 byte is required for storage of a number. Therefore, we can say that the
upper nibble of each BCD number is wasting storage space. BCD is still a weighted position number system
so we can perform mathematics, but we must use special techniques in order to obtain a correct answer.
number will be stored as the THOUSANDS value and the lower nibble of the upper byte can be stored as
the HUNDREDS value. Similarly, the lower byte would store the TENS value in the upper nibble and the
UNITS digit in the lower nibble. Therefore, 5219 can be represented by 2 bytes as shown below:
Thousands - Hundreds Tens - Units
5 2 1 9
0101 0010 0001 1001
Consider the binary numbers for decimal numbers 3 and 4. We can see that there is a change in three
bit positions. So the chance of error increases in binary numbers. In the Gray code, since only one-bit
position changes between decimal numbers 3 and 4, the chances of errors are reduced. As less number of
bit changes are required for two numbers and a finite time is also required for each bit change, the Gray
code circuit can operate at higher speed. The disadvantage of the Gray code is that it cannot be used in
arithmetic operations. If addition, subtract, etc operations are necessary, the Gray code is converted into
binary and then arithmetic operations will be performed using binary data.
process can be repeated upto the LSB. The binary to Gray code
conversion of binary number 1010 is shown in Fig. 1.13. The
Gray code 1111 is the equivalent of the binary number 1010.
Example 1.20 Determine the decimal equivalent of the following BCD numbers
(a) 0011 1001 0101 0001 (b) 1001 0111 0011 0101
� Solution
(a) BCD number is 0011 1001 0101 0001.
The BCD number is divided into 4-bit groups and then converted into decimal equivalent
0011 1001 0101 0001 = (0011) (1001) (0101) (0001) = 3951
(b) BCD number is 1001 0111 0011 0101.
The BCD number is divided into 4-bit groups and then converted into decimal equivalent
1001 0111 0011 0101 = (1001) (0111) (0011) (0101) = 9735
Example 1.21 Determine the XS3 equivalent of the following decimal numbers
(a) 345 (b) 698
� Solution
(a) Firstly, add 3 to each decimal digit. Then convert into BCD form
Decimal number 345
Add 3 333
678
The XS3 equivalent of 345 is 0110 0111 1000.
(b) Firstly, add 3 to each decimal digit. Then convert into BCD form
Decimal number 698
Add 3 333
9 12 11
The XS3 equivalent of 698 is 1001 1100 1011.
34 Digital Electronics: Principles and Applications
Example 1.22 Convert the following XS3 numbers into decimal numbers
(a) 1011 (b) 1001 0011 0111
� Solution
(a) Subtract 3 from XS3 number and then convert into decimal form
XS3 number 1011
Subtract 3 0011
1000
The decimal equivalent of XS3 number 1011 is 8 .
(b) Subtract 3 from XS3 number and then convert into decimal form
XS3 number 1001 0011 0111
Subtract 3 0011 0011 0011
0110 0000 0100
The decimal equivalent of XS3 number 1001 0011 0111 is 604 .
Example 1.23 Convert the following binary numbers into Gray code number
(a) 1010 (b) 1101
� Solution
(a) 1 0 1 0 Add 1 + 0 = 1, Add 0 + 1 = 1, Add 1 + 0 = 1
1111
(b) 1 1 0 1 Add 1 + 1 = 0, Add 1 + 0 = 1, Add 0 + 1 = 1
1011
Example 1.24 Convert the following decimal numbers into 4221 BCD code
(a) 575 (b) 945
� Solution
(a) 5 represent 1001
7 represent 1101
5 represent 1001
Therefore, 4221 BCD representation of 575 is 1001 1101 1001.
(b) 9 represent 1111
4 represent 1000
5 represent 1001
Hence, 4221 BCD representation of 945 is 1111 1000 1001.
Number System 35
The lower case character symbols use the ASCII codes 61H through 7AH. The upper case and lower
case characters differ from their lower case equivalents in exactly one bit position that is bit five. Upper
case characters always contain a zero in bit five but lower case alphabetic characters always contain a
one in bit five.
Example 1.25 What is the ASCII code of message “MAY I HELP YOU”?
� Solution
Using the Table1.21, the message can be represented in the hex code and 7-bit ASCII code
Character Hex Code ASCII Code
MAY 4D 41 59 100 1101 100 0001 101 1001
I 49 100 1001
HELP 48 45 4C 50 100 1000 100 0101 100 1100 101 0000
YOU 49 4F 55 100 1001 100 1111 101 0101
Example 1.26 The ASCII code message, 100 0111 100 1111 100 0100 is stored in memory of a
computer. What is the message?
� Solution
Using the Table1.21, the ASCII code message can be represented by characters
ASCII Code Character
100 0111 G
100 1111 O
100 0100 D
1.21 EBCDIC
The EBCDIC is an 8-bit code primarily used by IBM and IBM compatible computer systems. It is
known as Extended Binary Coded Decimal Interchange Code. Like ASCII code, it is also widely used
in digital data communication of large computers. It is an 8-bit code. This 8-bit code is made up of two
groups. Group - I represents the zone and Group - II stands for numeric data as depicted in Fig. 1.15.
This code is used to represent the various characters, printable special characters and non-printable
control characters. The printable control characters are printer vertical spacing, and movement of cursor,
etc.
The Extended Binary Coded Decimal Interchange
Code (EBCDIC) for representing characters (A to Z),
digits (0 to 9) and a few special characters are shown
in Table 1.22. It is observed that this code is similar, to
punch card codes. Fig. 1.15 8 bit EBCDIC
38 Digital Electronics: Principles and Applications
problem, an extra bit is added with data for detecting errors. This extra bit is called as parity bit. There
are two types of parity bit, namely even parity and odd parity. In even parity, the parity bit is selected in
such a way that even numbers of ones are in word. In case of odd parity, the parity bit is selected so that
total numbers of ones is an odd number. When even number of ones is present in a word, this is known
as even parity word. Similarly, if odd numbers of ones are present in a word, the word is called odd
parity word. The example of even parity word and odd parity word are given below:
Even parity word 1001 1111
Odd parity word 1000 1001
ASCII code information is actually 7bit code. During
communications, 8-bit information (7 bit for ASCII code and
one extra bit for parity) has been transmitted accurately. The
extra bit or parity bit can be generated by parity generator.
The circuit diagram of odd parity bit generator is shown in
Fig. 1.16. Exclusive OR gate is used to generate the parity bit
as output of this gate is 1 when only one input is 1 and other
is 0. Seven input Exclusive – OR gate has been depicted in Fig. 1.16 Odd parity bit generation
the figure for generating parity bit.
When ASCII code is 100 1111, a parity bit 1 is added with data to make it even number of ones. Then
the new code after addition of parity bit is 1100 1111.
ASCII Code 1001111
Data 11001111
Parity bit
In another example, the ASCII code is 100 0100, a parity bit 0 is added with data as even number of
ones are already present in data. After addition of parity bit, the code has been changed to 0100 0100.
Table 1.23 and Table 1.24 represent the even parity and odd parity respectively.
ASCII Code 100 0100
Data 0 1000100
Parity bit
Table 1.23 Even parity
The hamming code was developed by R.W. Hamming. In this code, one or more parity bits are added
to the data in such a way that error can be detected and corrected. The number of bits changed from one
code word to another code word is called as hamming distance.
Now consider Ai and Aj are to be any two code words. The hamming distance dij between two different
codewords Ai and Aj is defined by the number of components in which they differ. Assuming that dij is
determined for each pair of code words, the minimum value of dij is known as the minimum hamming
distance dmin.
7 6 5 4 3 2 1 ¨ Bit Position
1 0 0 1 0 1 1 ¨ Ai
Ø Ø
1 0 1 1 0 0 1 ¨ Aj
In the above example, the code words differ in the second and fifth bit positions from the right.
Therefore Dij is 3. The important properties of hamming code distance is that—
i. To detect single error, dmin should be at least two.
ii. For single error correction, dmin should be at least three. The relationship between number of errors
and minimum hamming distance dmin is E £ (dmin – 1)/2.
iii. When the values of dmin is greater than 3, more number of errors will be detected and corrected.
This code should have a minimum distance of three between two code words, in order to achieve
single bit error detection and correction. The code word consists of parity check bits and message bits.
When ‘r’ represents the number of parity check bits, the codeword must be 2r – 1 bits. The number of
message bits are determined from m = 2r – 1 – r. For example, if r = 3, the maximum number of message
bits are four as m = 2r – 1 – r = 23 – 1 – 3 = 4.
The bit positions in the code word are numbered from 1 to 2r – 1 and the position of parity bit in
the code word is a power of 2. In a 7-bit codeword, the format of the transmitted codeword (TC) bits
position are 7, 6, 5, 4, 3, 2, and 1, and the parity bits occupy position 1, 2 and 4. Assume TC = b3 b2 b1
r3 b0 r2 r1.
The 7-bit hamming (7,4) code word is b3 b2 b1 r3 b0 r2 r1 which is associated with binary message bits
b3 b2 b1 b0.
In the above TC = b3 b2 b1 r3 b0 r2 r1, the positions occupied by the parity bits 100 (4), 010(2) and
001(1). The message bits occupy the bit positions 011(3), 101(5) 110(6) and 111(7).
The parity bit r1 can be determined by EX-ORing the message bits in bit positions 7, 5, and 3.
Therefore,
r1 = b3 ≈ b1 ≈ b0
The parity bit r2 is obtained by EX-ORing the message bits in position 7, 6 and 3 so that
r2 = b3 ≈ b2 ≈ b0
Lastly r3 is expressed by EX-ORing the message bits in bit positions 7, 6 and 5
r3 = b3 ≈ b2 ≈ b1
42 Digital Electronics: Principles and Applications
For example, when the message bits b3 b2 b1 b0 = 1011, the parity check bits are determined from
r1 = b3 ≈ b1 ≈ b0, r2 = b3 ≈ b2 ≈ b0, and r3 = b3 ≈ b2 ≈ b1. Here the parity check bits are r1s, r2s, r3s
and which are transmitted with message bits.
r1s = 1 ≈ 1 ≈ 1 = 1; r2s = 1 ≈ 0 ≈ 1 = 0; r3s = 1 ≈ 0 ≈ 1 = 0
Then, the transmitted codeword or Hamming code is
TC = b3 b2 b1 r3 b0 r2 r1 = 1010101
If the code word is transmitted, the message is received at the receiving end and we find an error in
bit b0. Then the received codeword is
RC= b3 b2 b1 r3 b0 r2 r1 =1010001
To determine the error in the received codeword, the parity bits at the receiving end must be determined
as follows:
r1r = 1 ≈ 1 ≈ 0 = 0; r2r = 1 ≈ 0 ≈ 0 = 1; r3r = 1 ≈ 0 ≈ 1 = 0
The position of the error can be determined by EX-ORing the transmitted and received parity bits.
r1s ≈ r1r = 1 ≈ 0 = 1; r2s ≈ r2r = 0 ≈ 1 = 0; r3s ≈ r3r = 0 ≈ 0 = 0
Then error can be indicated by code 011 which indicates that there is an error in the third bit position
of codeword.
SUMMARY
Decimal, binary, octal and hexadecimal number systems are explained briefly. The conversions from one number
system to others are incorporated in this chapter. The rules of binary arithmetic operations, namely addition,
subtraction, multiplication and division are discussed with examples. The signed numbers, one’s complement and
two’s complement of numbers are discussed in detail. The application of two’s complement in binary subtraction is
also included with examples.
To represent numbers, alphabets and special symbols, different codes are used. In this chapter, BCD, Packed BCD,
Gray code, Excess 3 code, weighted BCD code, ASCII code and EBCDIC are explained properly. The conversion from
one code to other is also discussed. The ASCII code is an alphanumeric code and it is commonly used in computer for
digital data transmission. During the digital data transmission from one computer to other, there may be some error
due to the presence of electrical noise. To detect error, parity bit is used. The error detection and correction technique
is also explained.
2. Why digital electronics are more widely used as compared to analog electronics? Select one reason
from the following.
(a) They are easier to maintain
(b) They are less expensive
(c) They are useful over wider ranges of problem types
(d) They are always more accurate and faster
3. The number of nibbles, which make up one byte, is
(a) 2 (b) 16 (c) 4 (d) None of these
4. The decimal equivalent of the hexadecimal number E5 is
(a) 229 (b) 279 (c) 327 (d) None of these
5. Which of the following statements is correct?
(a) Decimal 10 is presented as 10101 in binary code
(b) Decimal 9 is presented as 1011 in Excess 3 code
(c) Decimal 9 is presented as 1010 in BCD code
(d) Decimal 10 is presented as 1100 in Gray code
6. (1111.01) is
(a) (15.25)10 (b) (12.25)10 (c) (23)10 (d) (12)10
7. In the 8421 BCD code, the decimal number 125 is written as
(a) 1111101 (b) 000111 (c) 7D (d) None of these
8. Indicate which of the following binary additions is correct
(a)10101 + 1111= 111101 (b) 1010 +1101=1111
(c)1010+1110=11000 (d) 1010 + 1001=1111
9. The binary equivalent of decimal number 13 is
(a) 1001 (b) 1100 (c) 1010 (d) 1101
10. The decimal number 422 is equal to which of the following hexadecimal number?
(a) 229 (b) 279 (c) 327 (d) 1A6
11. The binary number 101011 is equivalent to
(a) 229 (b) 279 (c) 327 (d) None of these
12. The decimal equivalent of 101.101 is
(a) 5.29 (b) 5.625 (c) 327 (d) None of these
13. Convert (11001.1)2 into octal
(a) (31.4)8 (b) (32.4)8 (c) (35.4)8 (d) None of these
14. Convert (347)8 into base 2
(a) 011100111 (b) 11100111 (c) 11101011 (d) None of these
15. Parity bit for error detection doses not imply
(a) Automatic error correction (c) Odd number of error detection
(b) Increase in the hardware in the system (d) Increase in the length of code
44 Digital Electronics: Principles and Applications
REVIEW QUESTIONS
1.1 What is the difference between analog and digital quantities?
1.2 Explain advantages of digital system over analog system.
1.3 What is overflow in digital computer?
1.4 Discuss weighted code with examples.
1.5 What is the difference between ASCII code and EDCDIC code?
1.6 What is parity bit?. Explain briefly applications of parity bit.
1.7 Convert the following binary numbers to decimal numbers.
(a) 1100111 (b) 111010101 (c) 101.11011 (d) 10111.011011
1.8 Convert the following decimal numbers to binary numbers.
(a) 5635 (b) 256 (c) 100.425
(d) 0.625 (e) 100.25 (f) 37
1.9. Convert the following binary numbers to octal, and hexadecimal number.
(a) 101111010111111 (b) 110110110111 (c) 1111100111110 (d) 11101010110
1.10 Convert the following octal numbers to binary numbers.
(a) 57.35 (b) 222 (c) 50.25
(d) 2765 (e) 2567 (f) 67
1.11 Convert the following hexadecimal numbers to binary numbers.
(a) FFAF (b) 9BCD6 (c) CF
(d) AA2 (e) 87D4 (f) AE0F
1.12 Convert the following decimal numbers to octal and hexadecimal number.
(a) 546 (b) 2777 (c) 5235
(d) 46 (e) 9898 (f) 65
1.13 Add the following binary numbers.
(a) 10110111 (b) 11111101 (c) 11010011
10100110 10101100 11110110
1.14 Subtract the following binary numbers
(a) 11111011 (b) 00011011 (c) 11110011
– 01110001 –10000011 – 01110111
1.15 Divide the following binary numbers
(a) ( 10001110 ) 1001011011110111 (b) ( 10110110 ) 1101100000101001
(c) ( 11010011 ) 11001100111011111
1.16 Determine the 2’s complement of following numbers
(a) 01101101 (b) 11101111 (c) 10000011
1.17 Convert the following 2’s complement numbers into decimal
(a) 10001101101 (b) 101101111 (c) 111000011
1.18 Convert the following decimal numbers into 2’s complement numbers
(a) 599 (b) –77 (c) 365
Number System 45
1.19 Convert the following decimal numbers to 8 bit, 2’s complement numbers,
(a) 256 (b) 56 (c) –106
1.20 Convert the following decimal numbers to BCD
(a) 298 (b) 25 (c) 56 (d) 86 (e) 99
1.21 Convert the following BCD numbers into decimal numbers
(a) 0011 0111 1001 (b) 1001 0101 0110 1000 (c) 0111 1001 1001 0011 1001
1.22 Add the following BCD numbers
(a) 1001 0111 1001 (b) 1001 0101 0110 0001 (c) 0111 1001 1001 0011 1001
0011 1001 0011 1001 1001 0100 1001 1000 0100 0011 1001 1001
1.23 Subtract the following BCD numbers
(a) 1001 0111 1001 (b) 1001 0101 0110 1001 (c) 0111 1001 1001 0011 1001
– 0011 1001 0011 – 0011 0110 0100 1001 0011 0100 0011 1001 0011
1.24 Determine characters of the following ASCII code
(a) 101 0100 100 1000 100 0101 100 0101 100 0001 101 0010 101 0100 100 1000
(b) 100 1101 100 1111 100 1111 100 1110
(c) 101 0011
(d) 101 0101 100 1110
1.25 Define Parity bit. What are the types of parity bit?. Explain applications of parity bit.
1.26 Explain Hamming Code with an example.
CHAPTER
2
BOOLEAN ALGEBRA
AND LOGIC GATES
2.1 INTRODUCTION
Boolean algebra has been introduced by the mathematician, George Boole in 1854. It is a two state
algebra to solve logic problems and used the logical and arithmetic calculations for digital equipments.
This operates with logic variables, namely ‘0’ and ‘1’. The logic variables can also be represented by
logical TRUE (T) and logical FALSE (F). Any statement can be represented by logic variable. One
example is “The Sun rises in the east” (TRUE). In this way, any statement can be model as logic
variable. In the other way, new statements can be built based on existing statements using logic variables
and logic operators. The new statements may be false or true. Consider X= “The Sun rises in the east”
then NOT X = Y= “The Sun does not rises in the east” (FALSE).
Boolean logic variable “0” or “1” is not used to represent actual numbers but it is used to represent
the state of voltage variable called logic level. Commonly used representation of logic levels are shown
in Table 2.1.
Transistors can be operated at two different states namely saturation and cut-off. Figure 2.1 shows
the saturation operation of transistor. In this circuit, 5 volt is applied through the two-position switch
to operate in saturation. When the transistor is in saturation region, the voltage between collector and
emitter is very small. So, the output voltage is 0 volts. Therefore, this circuit can be used to represent
binary bits. The input signal is a logic ‘1’ and the output signal is a logic ‘0’. These voltage levels can
also be represented by logic level HIGH and LOW respectively as depicted in Table 2.1. Similarly, due
to change the position 0V (logic 0) is used as input and transistor operates in cut-off region and output
voltage will be 5V or logic ‘1’ as shown in Fig. 2.2.
Logic 0 Logic 1
False True
Open Switch Close Switch
Low High
No Yes
Off On
Fig. 2.1 Transistor in saturation
Boolean Algebra and Logic Gates 47
2.2.2 OR Operation
In mathematics, the sum of any number and zero is the same as the original number. This algebraic
identity can be written as X + 0 = X, where X is any number. Similar to ordinary algebra, Boolean algebra
has its individual identities based on the bivalent states of Boolean variables. In Boolean algebra, the
sum of anything (1 or 0) and zero(0) is the same as anything (1 or 0). This logical function is known as
OR operation. The equation for OR operation is
O = A OR B
With given the inputs, we can find the output. If A = 0 and B = 0,then output
O = 0 OR 0 = 0
So, output of an OR gate is zero when both inputs are 0s.
But, when A = 0 and B = 1, the output is 1
O = 0 OR 1 = 1
Therefore, it is clear that output of an OR gate is 1 when either input is 1. Similarly, if A = 1 and B = 0,
output is 1
O = 1 OR 0 = 1
In Boolean algebra, the ‘+’ sign stands for the OR operation and the equation for OR operation is
O = A + B. Figure 2.4 shows the relationship between inputs and output for OR operation.
algebra. Law 1 and Law 2 of Laws of Union are shown in Fig 2.6(a) and (b)
respectively and their operations are explained as follows:
Law 1 A+0=A Fig. 2.6
When A = 0, A + 0 = 0
When A = 1, A + 1 = 1
Law 1 means that the output is always A and depends on the value of A. When A = 1, the output will
be 1. If A = 0, output will be 0.
Law 2 A+1=1
When A = 0, A + 1 = 1, When A = 1, A + 1 = 1
It means that output is independent of A and it will be always the same when A = 1 or A = 0. This identity
is different from any seen in normal algebra. Here, we can see that the sum of anything and ‘1’ is ‘1’.
Law 3 A.0 = 0
When A = 0, A.0 = 1, When A = 1, A.0 = 0
This law states that if one of two inputs AND gate is logic zero (0) and other input is connected with
signal A, the output will be logic zero (0).
Law 4 Α.1 = A
When A = 0, A.1 = 0, When A = 1, A.1 = 1
It is depicted in Fig. 2.7(b) that if one of two inputs AND gate is logic 1 and other input is connected
with signal A, the output will be A.
� Solution
A(A + B) = AA + AB Applying distributive property
= A + AB Applying identity AA = A
= A.1 + AB Factoring out A
= A(1 + B) Apply identity 1 + A = 1
= A.1 Apply identity A.1 = A
=A
� Solution
(A + B) (B + C) = AB + AC + BB + BC Applying distributive property
= AB + AC + B + BC Applying identity AA = A
= B + AB + AC + BC Apply B + AB = B
= B + AC + BC
= B + BC + AC Apply B + AB = B
= B + AC
——
———
— ———
—
—
A +B A ·B
— — — —
A.B A+ B
2.4.1 De Morgan’s First Theorem
According to De Morgan’s first theorem, when a long bar is broken, the operation directly under the
break changes from addition to multiplication as given below
——
———— – –
A +B = A . B
Both sides of Boolean expression can be represented by logic circuits.
Fig. 2.15
54 Digital Electronics: Principles and Applications
For 4 inputs,
———— – – – –
A . B.C. D = A + B + C + D
Boolean Algebra and Logic Gates 55
If multiple layers of bars exist in a Boolean expression, we Table 2.6 Truth table
can only break one bar at a time, and it is usually easier to begin Inputs Output
simplification by breaking the longest bar first. For an example, – –
–— A B O=A+B
consider the Boolean expression is AB + CD . The expression 0 0 1
–—
AB + CD can be reduced using De-Morgan’s Theorems. Firstly, 0 1 1
–— –—
break the longest bar and we get A B .CD. Then we break A B . 1 0 1
– –
So, finally we find A CD + B CD.
1 1 0
� Solution
– – – –
A + B + C + D + ABCD = A + B + C + D + A + B + C + D Breaking long bar in ABCD
– – – – –
=A+A +B+B +C+C +D+D Apply identity A + A = 1
=1+1+1+1=1
Fig. 2.17 Two inputs and one output Fig. 2.18 Three inputs and one output
56 Digital Electronics: Principles and Applications
Table 2.7 Two inputs and one output Table 2.8 Three inputs and one output
Inputs Output Inputs Output
A B O A B C O
0 0 0 0 0 0 0
0 1 0 0 0 1 1
1 0 0 0 1 0 1
1 1 1 0 1 1 1
1 0 0 1
1 0 1 1
1 1 0 1
1 1 1 0
Inputs Output
A B O = A.B
0 0 0
0 1 0
Fig. 2.19 Two inputs AND gate 1 0 0
1 1 1
An example of three inputs AND gate and its truth table are shown in Fig. 2.20 and Table 2.10 respectively.
It is also depicted in truth table that output is ‘1’ when all inputs are ‘1’ and otherwise output is ‘0’.
Table 2.10 Truth table of three inputs AND gate
Inputs Output
A B C O = A.B.C
0 0 0 0
0 0 1 0
0 1 0 0
Fig. 2.20 Three inputs AND gate
0 1 1 0
1 0 0 0
1 0 1 0
1 1 0 0
1 1 1 1
The three inputs and four inputs AND gate using two input AND gates are depicted in Fig. 2.21(a)
and Fig. 2.21(b) repectively.
Boolean Algebra and Logic Gates 57
2.5.3 OR Gate
The expression O = A + B defined as output “O” equals A OR B.
The “+” sign stands for the OR operation and it is not for arithmetic
addition. When any of the inputs of OR gate is ‘1’ the output of the
OR gate will be ‘1’. But, the output of OR gate is ‘0’ only when
all the input variables are ‘0’. The symbol of two inputs OR gate is
shown in Fig. 2.22 and truth table is also given in Table 2.11.
Fig. 2.21
Inputs Output
A B O=A+B
0 0 0
0 1 1
1 0 1 Fig. 2.22 Two input OR gate
1 1 1
Figure 2.23 shows the three inputs OR gate and its truth table is given in Table 2.12. It is depicted in
this table that the output of the OR gate is ‘1’ when any of the inputs of OR gate is ‘1’ and output is ‘0’
only when all the input variables are ‘0’.
Table 2.12 Truth table of three inputs OR gate
Inputs Output
A B C O=A+B+C
0 0 0 0
0 0 1 1
0 1 0 1
0 1 1 1 Fig. 2.23 Three inputs OR gate
1 0 0 1
1 0 1 1
1 1 0 1
1 1 1 1
Three inputs and four inputs OR gate can be designed by using two inputs OR gates as shown in
Fig. 2.24 (a) and (b) respectively.
–
O = A or O = A¢
Here, ‘ – ’ or ( ¢ ) represents the NOT operation. This
expression means output ‘O’ equals NOT A or O equals the
inverse of A or O equals the complement of A. The truth
table of the NOT gate is shown in Table 2. 13. The NOT gate
operations can be referred as inversion or complementation.
Table 2.13 Truth table of NOT gate
Input Output
–
A O = A = A′
0 1
Fig. 2.24 1 0
Inputs Output
A B O = A + B = (A + B)′
0 0 1
0 1 0
1 0 0
Fig. 2.27 Two inputs NOR gate 1 1 0
–—
O = A B = ( AB )¢.
The truth table of two inputs NAND gate is given in Table 2.15.
Table 2.15 Truth table of two inputs NAND gate
Inputs Output
–—
A B O = A B = (AB)¢
0 0 1
0 1 1
1 0 1
1 1 0
Fig. 2.29 Two inputs NAND gate
Digital logic can be described in terms of standard logic symbols and their corresponding truth tables.
The transistor based digital ICs (Integrated chips) have been manufactured by using the function of all
gates. The horizontal lines represent inputs or outputs of the gates and the small circle at the outputs
means inverted operation of output.
A three input NAND gate and four input NAND gate can be designed by using two inputs AND and
NAND gates as shown in Fig. 2.30 (a) and (b).
Fig. 2.30
Inputs Output
A B O=A⊕B
0 0 0
0 1 1
1 0 1
1 1 0
Fig. 2.31 Ex-OR gate
60 Digital Electronics: Principles and Applications
Inputs Output
A B C O = A⊕B⊕C
0 0 0 0
0 0 1 1
0 1 0 1
0 1 1 0
1 0 0 1
1 0 1 0
1 1 0 0
Fig. 2.34
1 1 1 1
Fig. 2.35 Ex-NOR gate Fig. 2.36 Equivalent circuit of Ex-NOR gate
Fig. 2.39 (a) and (b) Buffer using NAND gate Fig. 2.40 (a) and (b) Buffer using NOR gate
Fig. 2.41 AND gate using NAND gate Fig. 2.42 AND gate using NOR gate
Fig. 2.44 OR gate using NAND gate Fig. 2.45 OR gate using NOR gate
Example 2.4 Write the truth table of the logic circuit as shown in Fig. 2.47.
Fig. 2.47
� Solution
Truth table of the logic circuit expression A + B + CD is given below:
Table 2.19 Truth table for A + B + CD
Inputs A+B CD A + B + CD A + B + CD
A B C D
0 0 0 0 1 0 1 0
0 0 0 1 1 0 1 0
0 0 1 0 1 0 1 0
0 0 1 1 1 1 1 0
0 1 0 0 0 0 0 1
0 1 0 1 0 0 0 1
0 1 1 0 0 0 0 1
0 1 1 1 0 1 1 0
1 0 0 0 0 0 0 1
1 0 0 1 0 0 0 1
1 0 1 0 0 0 0 1
1 0 1 1 0 1 1 0
1 1 0 0 0 0 0 1
1 1 0 1 0 0 0 1
1 1 1 0 0 0 0 1
1 1 1 1 0 1 1 0
O = AB + BC + AC + BD
� Solution
Figure 2.49 shows the logic circuit diagram for the logic expression
O = AB + BC + AC + BD. The AND gates, two inverters, one NOR, and two
OR gates are used to implement the above logical equation. Fig. 2.49
64 Digital Electronics: Principles and Applications
Example 2.7 Draw the output of the two input Ex-NOR gate with the given inputs A and B.
Fig. 2.50
� Solution
The A waveform can be read as 10101 and B waveform can be represented as 11011. The digital output of
OR gate will be 10000. The waveform of output is given below:
Fig. 2.51
So, after using Boolean laws in original expression, we get the simplified expression O = B(A + C).
To implement this logic expression, one OR gate and one AND gate are required as shown in Fig. 2.53.
It is very clear from Fig. 2.52 and Fig. 2.53 that the second imple-
mented logic circuit is most simple from the original one. Here,
only two logic gates are used instead of five. As a result, this circuit
has the following advantages: higher operating speed, less power
Fig. 2.53 consumption, less cost, and more reliability.
Another Boolean expression is O = A + B(A + C) + AC. We apply Boolean Laws to reduce this
expression to its simplest form.
O = A + B (A + C) + AC
After distributing terms, we find O = A + AB + BC + AC
Apply Boolean law A + AB = A in first and second terms, we get O = A + BC + AC
Then apply A + AB = A in first and third terms, we obtain O = A + BC
The simplified form of the expression, O = A + B(A + C) + AC is O = A + BC.
Simplification of Boolean expression by using De Morgan’s
laws. Consider the expression A + BC . The digital implementation
of this logic expression is given in Fig. 2.54.
By using the De Morgan’s laws, we break the bar covering the
Fig. 2.54
entire expression as
A + BC = A . BC
= – –
Applying double complements identity, A = A we get A BC
Therefore, the original circuit can be implemented by using a three-
input AND gate and a inverter as shown in Fig. 2.55.
Fig. 2.55
Simplification of logic expression O = A + BC + AB
To represent this logic expression, we apply two NOR, one AND, one NAND and one Inverter as
depicted in Fig. 2.56.
Fig. 2.56
To reduce the above logic expression, Boolean identities and De Morgan’s theorems are used as
follows:
After breaking the longest Bar of logic expression O = A + BC + AB , we get (A + BC) (AB)
66 Digital Electronics: Principles and Applications
= –
Applying double complements A = A, we get (A + BC) (AB )
– –
Then applying distribution law, we obtain AAB + BCAB
– –
Applying Boolean identity AA = A and AA = 0, we get AB + 0
–
After applying identity A + 0 = A, we finally get AB
–
The simplified logic expression AB can be implemented by using logic gates. Figure 2.57 shows the
equivalent circuit of the expression. This figure consists of one inverter
and one AND gate.
Another logic expression is considered for circuit simplification task.
The equation is Fig. 2.57
– – –
O = A BC + AB C + ABC + ABC.
The logic circuit based on this
expression can be designed by using
four three input AND gates, three
Inverters and one four input OR gate
as shown in Fig. 2.58.
The above circuit is quite complex.
The expression can be significantly
simplified by using Boolean laws.
The steps of simplification are given
below: Fig. 2.58
– – –
O = A BC + AB C + ABC + ABC
– – –
Factoring BC of the first and forth terms, we get O = BC(A + A) + AB C + ABC
– – –
Applying identity A +A = 1, we find BC + AB C + ABC
– –
Factoring B from first and third term, B(C + AC ) + AB C
– –
Apply Boolean identity A + A B = A + B, we get B(C + A) + AB C
–
After applying distribution law, we obtain BC + AB + AB C
–
Taking common A from second and third terms, we get BC + A(B + B C)
–
Then apply Boolean identity A + A B = A + B and
we find BC + A(B + C)
After distributing, we finally get BC + AB + AC
Therefore, the simplified logic circuit can be
developed by using logic expression BC + AB + AC.
Figure 2.59 shows the logic circuit for BC + AB + AC
which is consists of three two inputs AND gates and
Fig. 2.59 three inputs OR gate.
Boolean Algebra and Logic Gates 67
– – – – – ––
= A + AB + AC + AB + B + B C + AC + C B + 0) Factoring out A from first to fourth terms
–
and seventh term and B from fifth, sixth
– – – – – –
= A (1 + B + C + B + C ) + B (1 + C + C ) = A + B and eighth terms.
Example 2.9 Simplify the following logic expressions using De-Morgan’s Theorem.
–
(a) O = (A + B + C) (A + B– + C)
(b) O = A + BCD
(c) O = (A + B + CD–)AB
� Solution
– – –– – –
(a) O = (A + B + C) (A + B + C) = A + B + C + A + B + C = A B C + ABC
– – – –
(b) O = A + BCD = A · BCD = A (B + C + D)
–– –– – – – – –– – –
(c) O = (A + B + C D)AB = (A + B + CD) + AB = ABC D + A + B = A B (C + D) + A + B
68 Digital Electronics: Principles and Applications
Inputs Output
A B C D A+B C.D A + B + C.D
0 0 0 0 0 0 0
0 0 0 1 0 0 0
0 0 1 0 0 0 0
0 0 1 1 0 1 1
0 1 0 0 1 0 1
0 1 0 1 1 0 1
0 1 1 0 1 0 1
0 1 1 1 1 1 1
1 0 0 0 1 0 1
1 0 0 1 1 0 1
1 0 1 0 1 0 1
1 0 1 1 1 1 1
1 1 0 0 1 0 1
1 1 0 1 1 0 1
1 1 1 0 1 0 1
1 1 1 1 1 1 1
Example 2.11 Derive the logic expression from the truth table and implements the logic circuit
using NAND gates.
Table 2.21
Inputs Output
A B C O
0 0 0 1
0 0 1 0
0 1 0 1
0 1 1 0
1 0 0 0
1 0 1 0
1 1 0 1
1 1 1 1
Fig. 2.60
� Solution
– – –– – –
The logic expression of the above truth table is O = A BC + A BC + ABC + ABC and it can be simplified by
using Boolean laws as given below. The final result is A.C AB and hardware implementation with the help
of NAND gates is depicted in Fig. 2.60.
– – –– – – –– – –
O = A BC + A B C + ABC + ABC = A C (B + B ) + AB(C + C)
––
= A C + AB = A.C AB
Boolean Algebra and Logic Gates 69
Fig. 2.63 (a) Positive logic AND gate (b) Negative logic AND gate (c) Positive logic OR gate
(d) Negative logic OR gate (e) Truth table of positive logic AND gate
(f) Truth table of negative logic AND gate (g) Truth table of positive logic OR gate
(h) Truth table of negative logic OR gate
Boolean Algebra and Logic Gates 71
SUMMARY
In this chapter, the operation, symbol and truth table of logic gates are conferred. The summary of logic gates is
represented in Table 2.22. The universal gates and their applications to form any gates are incorporated. A brief
introduction to Boolean laws, De Morgan’s theorem, Consensus theorem and positive and negative logic are also
discussed. The simplification of logic expressions using Boolean laws and De Morgan’s theorem explained with
examples. The implementation of logic functions using logic gates is also given.
Inverter
Input Output
–
A O=A
0 1
1 0
AND
Inputs Output
A B O = A.B
0 0 0
0 1 0
1 0 0
1 1 1
NAND
Inputs Output
——
A B O = A.B
0 0 1
0 1 1
1 0 1
1 1 0
OR
Inputs Output
A B O=A+B
0 0 0
0 1 1
1 0 1
1 1 1
(Contd.)
72 Digital Electronics: Principles and Applications
XOR
Inputs Output
A B O=A B
0 0 0
0 1 1
1 0 1
1 1 0
XNOR
Inputs Output
———
A B O=A B
0 0 1
0 1 0
1 0 0
1 1 1
5. A 3 inputs logic gate has its three inputs: A = 1, B = 0 and C = 1. If its output O = 1, the gate is
(a) NOR (b) NAND (c) AND (d) OR
6. When A and B represent the inputs of an Exclusive OR logic gate, its output O will be
– – –—
(a) O = AB + A B (b) O = AB + A + B (c) O = A + B + A B (d) None of these
7. In positive logic, the logic 0 state corresponds to
(a) Zero voltage (c) High voltage level
(b) Any positive voltage (d) Low voltage level
8. A two input OR gate is designed for positive logic. Consider that this gate is operated with negative
logic. Then the logic operation will be
(a) OR (b) AND (c) NOR (d) Ex-OR
9. The following equation corresponds to De Morgan’s theorem in Boolean algebra
–— – –
(a) (A + B)(A + B) = A + AB + B (c) A B = A + B
(b) (A + B)(A + B) = AA + AB + BB + BA (d) None of these
10. A 2 input logic gate has its inputs A = 0, and B = 1. If its output O = 1, the gate would be
(a) NOT (b) OR (c) AND (d) NOR
11. The NOT symbol at the output of an OR gate converts it into-gate
(a) OR (b) NAND (c) AND (d) NOR
12. The Boolean algebra is based on the premise that
(a) Differential equations can be solved by analog circuits
(b) There are two states
(c) Data can be stored and retrieved
(d) None of these
13. Which of the following functions is referred as complementary?
(a) NAND (b) NOR (c) OR (d) NOT
14. What are the values of the inputs for a NAND gate if output is 1?
(a) A = 0, B = 0 (b) A = 1, B = 0 (c) A = 0, B = 1 (d) A = 1, B = 1
15. What is the output function of the circuit shown in Fig. 2.64?
Fig. 2.64
Fig. 2.65
(a) O = ABC (b) O = A + B + C (c) O = AB + C (d) None of these
17. Boolean algebra is different from ordinary algebra in which way?
(a) Boolean algebra can represent more than 1 discrete level between 0 and 1.
74 Digital Electronics: Principles and Applications
REVIEW QUESTIONS
2.1 Draw the logic symbol of four input AND gate and write the truth table of four input AND gate.
2.2 Draw the circuit diagram of Ex-OR gate using NAND and NOR gates.
2.3 Write the truth table of the logic circuit as given below:
Fig. 2.66
2.4 Derive the logic expression of the logic circuit as given below and also write the truth table.
Fig. 2.67
2.5 Draw the output of the two input NAND gate with the given inputs A and B.
Fig. 2.68
2.6 Draw the output of the two input AND gate with the given inputs A and B.
Fig. 2.69
2.7 Draw the output of the three input NAND gate with the given inputs A, B and C.
Fig. 2.70
Boolean Algebra and Logic Gates 75
2.8 Draw the output of the three inputs Ex-OR gate with the given inputs A, B and C.
Fig. 2.71
2.9. Prove the following identities of Boolean algebra
– –
(a) A + A = A (b) A. A = 0 (c) A + A = 1 (d) A.A = A
2. 10 Prove the commutative law
(a) A + B = B + A (b) AB = BA
2.11 Prove the distributive law
(a) A + (BC) = (A + B)(A + C) (b) A(B + C) = (AB) + (AC)
2.12 Prove the following relationship
(a) AB + AC + BC = AB + AC (b) (A + B)(A + C)(B + C) = (A + B)(A + C)
2.13 Simplify the following logic expressions.
–– – – –– – –– – ––
(a) O = A B C D + A B C D + A B CD + A B CD
–– – –
(b) O = A B D + AB D + ABD + B CD
–– – –– –
(c) O = ABC + ABD + A B C + A B D
2.14. Simplify the following logic expressions using De Morgan’s Theorem
––
(a) O = (A + BC) (A B + C) (c) O = AB + CD
––
(b) O = A + B + CD (d) O = (AB + CD)
2.15 Make truth tables for each of the following 1-bit binary expressions.
–
(a) O = A B + C (c) O = ABC + D
– –—
(b) O = A + BC (d) O = AB + CD
–
(e) O = BC + AD
2.16 Derive the logic expression from the truth table as given in Table 2.23 and implements the logic
circuit using NAND or NOR gates.
Table 2.23
Inputs Output
A B C O
0 0 0 0
0 0 1 1
0 1 0 1
0 1 1 0
1 0 0 1
1 0 1 0
1 1 0 1
1 1 1 1
CHAPTER
3
DIGITAL LOGIC FAMILY
3.1 INTRODUCTION
The logic gates are discussed in Chapter 2. Presently, these gates are available in integrated form and
the digital Integrated Circuits (ICs) are most commonly used in complicated digital circuits design. The
logic gates can be designed in different methods. Therefore, there are different types of logic family, but
unipolar and bipolar logic family are the main logic family. Transistors, diodes and resistors are main
elements of bipolar logic family, but MOSFETs are used in unipolar logic family. In this section, bipolar
and unipolar logic families are discussed briefly.
Table 3.1 Classification of logic family based on complexity measured by number of transistors
Name of Group No of Transistors Applications
Small scale integration Less than 100 SSI circuits are used for educational purposes, and inter-
(SSI) face complex digital devices.
Medium scale Above 100 but below 1000 MSI circuits used in multiplexers, demultiplexers, regis-
integration(MSI) ters, and counters, etc.
Large scale Above1000 but below 10000 LSI circuits are used in small memory chips, and pro-
integration(LSI) grammable logic devices.
Very large scale More than 10000 VLSI are applied in large computer memories, micropro-
integration(VLSI) cessors, microcontrollers, and digital signal processors
known as noise margin (NM). There are two types of noise margin such as low noise margin and high
noise margin.
Low noise margin (LNM), VNL: VNL is the largest noise amplitude that is guaranteed for no change
of the output voltage level when the input voltage of the logic gate is in the LOW interval. The low noise
margin is measured by the expression as given below:
VNL =VIL– VOL.
High noise margin (HNM), VNH : VNH is the largest noise amplitude that is guaranteed for no
change of the output voltage level when the input voltage of the logic gate is in the HIGH interval. It is
measured by
VNH = VOH – VIH.
Fan In Fan in is the maximum number of inputs for a logic gate in a particular logic family. This
number is limited due to delay time. For example, a two inputs AND gate has fan-in of two, a three
inputs OR gate as a fan-in of three and a NOT gate or an inverter has a fan-in of one. Generally, delay
of operation of any gate increases with increasing fan-in quadratically. Gate delay is the delay offered
by a gate for the signal applied at input terminals, before it reaches the gate output. Gate delay is also
known as propagation delay.
Fan Out Fan out is defined as the number of similar logic gates driven by a single logic gate. While
a logic gate has high fan out, it is advantageous to design integrated chips, as less number of driving
circuits are required. The fan-out depends on the amount of source or sinks current of a gate while the
gate drives other gates. When a logic gate output with more than its rated fan-out, the logic gate has the
following effects:
∑ The operating temperature of the device will be increased. Hence, reliability of the device will
be reduced and eventually the device may fail.
∑ Propagation delay will be increased and it may be above specified value.
∑ The output rise and fall times may be increased beyond specification.
∑ In the low state, the output voltage VOL may increase above maximum value of VOL .
∑ In the high state, the output voltage VOH may decrease below the minimum value of VOH .
The factors that limit the fan-out of a gate are the output current capacity as specified by the parameters
IOH and IOL, and the input current requirements of the driven gates as specified by their parameters IIH and
IIL. Certainly, the sum of the currents IIH for all the gates driven by a gate must be less than the current IOH
of the driving gate. In the same way, the sum of the IIL current parameters must be less than IOL for these
gates. When all of the gates have the same current parameter values, then the fan-out due to current
considerations can be expressed by a constant integer which is the maximum number of gate inputs that
can be connected to a single gate output. The fan-out can be defined as the largest integer less than or
equal to minimum of (IOH/IIH, IOL/IIL), where IOH/IIH is the number of gates that can be driven by a single
gate when output signal is high, and IOL/IIL is the maximum number if the output signal is low. Figure
3.4 shows a TTL AND gate drives ‘N’ numbers of similar AND gates for high level output and low level
output. Here, N is the fan out of the gate and it can be determined from current driving capability of
output and the current requirement of input. If maximum current driving capability IOH and maximum
current requirement of each input IIH are known, the fan out of the gate will be
80 Digital Electronics: Principles and Applications
I OH
N=
I IH
For example, consider IOH is equal to 500µA
and IIH is 25µA. The fan out is
I 500
N = OH = = 20.
I IH 25
Cost The cost of a digital IC depends on the
quantity manufactured. The designer always tries
to design low cost ICs though the quantity of ICs
Fig. 3.4 (a) Fan out computation for high level output used is large.
(b) Fan out computation for low level output Availability To choose a logic family for
particular applications, availability is an impor-
tant parameter. Availability can be considered in to different ways as given below:
The popularity of the logic family: The popularity of a particular logic family depends upon
the users and digital circuit designers. If application of a logic family is more, a large number of ICs of
that logic family will be manufactured. Therefore, the cost per IC will be very small and easily available
in the market.
The breadth of the logic family: The breadth of the logic family means to the number of different
logic functions, ICs available. The complex functions would have to be constructed using basic ICs. For
example, the TTL logic family has very good popularity and high breadth over other logic families.
Wired logic capability: Due to wired-logic capability, the outputs may be connected jointly to
achieve extra logic without additional hardware. Various flexibilities are available in different IC logic
families and these must be considered while selecting a logic family.
Availability of complement outputs: If the complement of outputs is available in ICs, the ad-
ditional inverter is not required to invert the output.
Example 3.1 Calculate the fan out of a NAND gate which drives NAND gates.
Assume IOH = 0.4 mA, IOL = 16 mA, IIH = 0.1 mA, and IIL = 0.4 mA.
� Solution
I OH 0.4
Fan out at high level output, N = = = 20
I IH 0.02
I OL 16
Fan out at low level output, N = = = 40
I IL 0.4
I OH I OL
The fan-out of the gate is minimum of ( , ) = minimum of (20, 40) = 20
I IH I IL
Digital Logic Family 81
Fig. 3.6 (a) Inverter circuit (b) Base characteristics of npn transistor
(c ) Collector characteristics of npn transistor
The base–emitter characteristic of n-p-n BJT is illustrated in Fig. 3.6(b). This is the plot of base
current variation with respect to VBE. For silicon made transistor, when the base emitter voltage VBE is
less than 0.6V, the transistor is said to be cut-off. Consequently, base current IB = 0 and very small current
flows in the collector. Then collector to emitter circuit behaves as an open circuit. When the base-emitter
junction is forward biased and is greater than 0.6V, the transistors starts to conduct and the base current
IB increases rapidly as shown in Fig. 3.6(b) and the voltage across base-emitter junction is about 0.8V.
The collector emitter characteristics with a typical load line are shown in Fig. 3.6( c). When VBE is
less than 0.6V, the transistor is at cut-off and no base current flows, but negligible current flows in the
collector. The collector to emitter circuit behaves like an open circuit. In active region, the collector
to emitter voltage VCE can be varied from about 0.8V to VCC. The collector current in this region is
approximately hfe IB, where hfe is the dc current gain of the transistor. It should be noted that the maximum
collector current does not depend on the IB, but on the external resistance RC. Therefore, VCE is always
positive and its lowest possible value is 0V. After assuming VCE = 0, the maximum IC current can be
determined from IC = VCC/RC.
82 Digital Electronics: Principles and Applications
Table 3.2 Parameters of the typical n-p-n silicon transistor The relationship between collector
current and base current IC = hfe IB is
Operating VBE (V) VCE (V) Current rela-
region tionship
valid only when the transistor operates
at active region. The parameter hfe
Cut-off <0.6V Open circuit IB = IC = 0
varies widely over the operating range
Active 0.6 to 0.7V >0.2V IC = hfe IB of the transistor, but it is very useful to
Saturation 0.7 to 0.8V 0.2 V I ≥
hfe B CS I consider an average value for the shake
of analysis of transistor. In a typical
operating range, hfe is about 50 and it may be varied up to 20. It can be observed that the base current
may be increased to any desirable value, but the collector current is limited by the external resistance RC.
As a consequence, a situation can be reached when hfe IB is greater than IC. When this condition arises,
the transistor is said to be in saturation region. Thus, the condition for saturation is determined from the
relation hfe IB ≥ ICS, where ICS is the maximum collector current flow during saturation. VCE is not zero in
the saturation region, but it is approximately 0.2V. The typical values
of basic parameters of the transistor characteristics are listed in Table
3.2. The above information will be used for better understanding of
circuits operation and the analysis of basic circuits of all bipolar
logic families which are discussed in this chapter.
If inputs A, B and C are LOW, transistors T1, T2 and T3 are cut-off and the output is HIGH or + VCC. When
any one of the inputs A, B and C is HIGH, the corresponding transistor operates in saturation and the output
will be LOW or 0.2 V approximately. Thus NOR logic is satisfied.
3.7 DIODE TRANSISTOR LOGIC (DTL)
Diode Transistor Logic (DTL) circuit is most commonly
used in logic family. Figure 3.9 shows a DTL logic circuit.
This circuit is actually a NAND gate. To perform logical
operation, inputs are given at the terminals A, B, and C of
the diodes D1, D2 and D3 respectively. Then the signal is
coupled with a diode D and an inverter, which consists of
a transistor and a load resistance.
When all inputs are logical 1 or + VCC, diodes D1, D2,
D3 are reversed biased and no current passes through
diodes. The diode D is forward biased and current will
flow through Resistance RB, Diode D and base of the Fig. 3.9 Diode transistor logic (DTL)
transistor T. Then transistor T operates at saturation. The output voltage of the transistor is logic 0. When
any one input signal is low (A = logical 0, B and C are logical 1), diode D1 is forward bias and current
will flow through RB and D1. Then diode D is not conducting and current will not flow through D and
base of Transistor T. Hence T is in cut-off and output will be high or logic level 1. As the signal passes
through the forward bias diodes to transistor, the switching speed of DTL is faster than RTL. Fan out is
also increased due to high input impedance. The switching delay is approximately 25 ns and fan out is
8. Therefore, DTL integrated circuits are economical.
3.8 TRANSISTOR-TRANSISTOR LOGIC (TTL)
In Transistor Transistor logic (TTL), logic gates are built only around transistors. TTL was developed
in 1965. All TTL families are available in small scale integration (SSI) package and in more complex
forms as MSI and LSI packages. The differences in the TTL series are not in the digital functions that
they perform but rather in the values of resistances and different type transistors which are used to
develop basic gates. There are many versions or families of TTL, such as Standard TTL, High Speed
TTL, Low Power TTL and Schhottky TTL. TTL gates in all the versions come in three different types
of output configuration such as
∑ Totem pole output configuration
∑ Open collector output configuration
∑ Tristate or three states output configuration
TTL circuit is most popular in bipolar logic family as it
is the fastest saturating logic family Figure 3.10 shows the
basic TTL circuit for a two inputs NAND gate. A single
multi-emitter transistor replaces input diodes and the
series diode of DTL. Each emitter-base diode serves
as one input, and the base-collector diode functions as the Fig. 3.10 Transistor-transistor logic
(TTL)
series diode. The multi-emitter transistor is economically
fabricated in monolithic form. In a multi-emitter transistor, a single isolated collector region is dif-
84 Digital Electronics: Principles and Applications
fused, a single base region is diffused and formed in the collector region, and the several emitter regions
are diffused as separate areas into the base region.
An output stage using an active pull-up transistor is added to the basic logic circuit to give current-
gain drive for switching in both directions. This output configuration results in faster switching speed
and higher fan-out capability. The TTL circuit is adaptable to virtually all forms of IC logic and produces
the highest performance-to-cost ratio of all logic types. TTL circuits for all gates have been discussed
later in detail.
The different series of TTL circuits are presently available. All these circuits are based on the same basic
circuit, but some of their properties have been optimised based on special applications. These devices in
the standard TTL series are designated with a number prefixed by a 74. For example, 7400 stands for a
NAND gate, and 7404 stands for an inverter, etc. If the resistor values in the TTL circuit are increased, its
average power dissipation can be reduced. On the other hand, propagation delay will be increased. This low
power TTL series are designated as 74LXX (74L00, 74L04, etc) and the typical power dissipation range
is 1mW to 10mW for any standard gate. Typical propagation delays are 33ns for 74L circuits as compared
to 9ns for 74 series circuits. The high speed TTL series are designated as 74HXX (74H00, 74H04, etc).
The typical power dissipation of a 74H00 NAND gate is 22.5mW, but its propagation delay is about 6ns.
The 74XX, 74LXX, and 74HXX TTL series are the early logic families. In these circuits, some of
their transistors operate into saturation. Therefore, there is an excess of charge in base region and limits
the speed at which the transistor can switch from the saturated to the cut-off mode. Then the standard
TTL circuit is modified by using a special type of diode called a Schottky-barrier diode to prevent the
transistors from going into saturation. This series is known as Schottky TTL and is designated as 74SXX
(74S00, 74S04, etc.). This series has a typical power dissipation of 18.75mW and a typical propagation
delay of about 3ns. Though 74SXX series use a more complicated circuit than the other series, but due
to high speed, the circuit is more susceptible to noise.
The low-power Schottky TTL series is developed
Table 3.3 Comparison of different TTL family by reducing the resistor values in a Schottky circuit
Series Propagation Power in order to minimise power dissipation. This series
Delay Dissipation is designated as 74LSXX (74LS00, 74LS04, etc.).
74XX 10ns 10mW The propagation delay of 74LSXX series is about
9.5ns and power dissipation is approximately 2mW.
74LXX 33ns 1mW
Consequently, 74LSXX series has about the same
74SXX 3ns 19mW
speed as a standard 74XX series, but the power
74LSXX 9.5ns 2mW dissipation is about one fifth power dissipation of
74HXX 6ns 22mW 74XX series.
74ASXX 1.5ns 10mW The other members of TTL family are the Ad-
74ALSXX 4ns 1mW vanced Schottky and Advanced Low Power Schott-
ky series. The Advanced Schottky is represented by
74AS and the Advanced Low Power Schottky series is designated as 74ALS. These TTL series have
significant improvements in speed and power dissipation over Schottky and Low Power Schottky. The
typical power dissipations of 74AS series gates are about 10mW and 1mW for ALS parts. Due to high
speed and low power consumption, the 74ALS and 74AS series are very popular in design of TTL gates.
The comparison of different TTL family based on speed and power consumption is given in Table 3.3.
Digital Logic Family 85
quently, the Schottky diode holds the collector to a voltage, which prevents the transistor to operate in fully
saturation. So, the diffusion capacitance and propagation delay are reduced. Therefore, Schottky transistors
can operate at very high switching speeds and perform consistently up to about 100MHz. A Schottky TTL
NAND is shown
in Fig. 3.13. Tran-
sistors T2 to T6 are
Schottky transistors
and diodes D1 to D5
are Schottky diodes
in Fig. 3.13. All re-
sistances (R1 to R6)
are high value com-
pared to TTL logic
family. Four differ-
ent types Schottky
TTL, namely Schott-
Fig. 3.12 Schottky transistor Fig. 3.13 Schottky TTL NAND gate ky TTL, low power
Schottky TTL, ad-
vanced Schottky TTL and advanced low power Schottky TTL are available. Table 3.5 shows the compari-
son between Schottky TTLs based on power dissipation, propagation delay and fan-out.
Example 3.2 Determine the fan out of the DTL circuit as shown in Fig. 3.14.
Assume R = 5KΩ, R1 = R2 =… RN = 10 KΩ, VCE(sat) = 0.2V, VD = 0.7V and IC = 1.8mA.
Digital Logic Family 87
� Solution
Consider input at terminal A is logic level 1 and other terminals are
in logic level 0. Therefore, transistor T1 operates in saturation.
The current flow through diodes D1, D2 …. DN is IL and it is
calculated by
VCC - VD - VCE (sat) 5 - .7 - .2
IL = = mA = 0.41mA
R1 10
The current flow through the resistance R is I1
VCC - VCE (sat ) 5 - .2
I1 = = mA = 0.96mA
R1 5
Fig. 3.14
The collector current of transistor T1 is
IC1 = N IL + I1 where, N is the fan out
I - I 1.8 - .96
So, the fan out N = C 1 = = 2.04 = 2
IL .41
Example 3.3 Calculate fan out and average power dissipation of DTL circuit as shown in Fig. 3.15.
Assume Vd = 0.7V, VBE = 0.75V, VCE sat = 0.2V, hfe = 50, R1 = 4.7K, R2 = 4.7K, R3 = 3.3K
� Solution
Consider A, B, and C are high and diodes D1, D2 and D3 are reverse
biased. Diode D4 is conducting and transistor T1 is in saturation, the
voltage at P1 is
VP1 = on state voltage of D4 +on state voltage of D5 + VBE sat = 0.7 +
0.7 + 0.75 = 2.15 V
Current flow through D4 is
V - VP1 5 - 2.15
I1 = CC = mA = 0.606 mA
R1 4.7
Current flow through R2 is
V 0.75
I 2 = CE = mA = 0.16 mA
R2 4.7
Applying KCL at P2, the base current of transistor T1
IB = I1 – I2 = (0.606 – 0.16) mA = 0.446 mA
Fig. 3.15
The collector current
V - VCE 5 - 0.2
I C = CC = mA = 1.45 mA
R3 3.3
The hfe IB = 50 ¥ 0.446 mA = 22.3 mA.
As hfe IB is grater than IC, the transistor T1 operates in saturation. The output of the transistor will be low.
To determine the fan out, consider load current IL = 0.9 mA.
88 Digital Electronics: Principles and Applications
IL N + IC £ 22.3 mA
0.9N + 1.45 £ 22.3 mA
22.3 - 1.45
N= = 23.1
.9
The fan out of the transistor T1 is 23.
The power dissipation in transistor T1 when output is Low
P1 = VCC (I1 + IC) = 5(0.606 + 1.45)mW = 10.28 mW
The power dissipation in transistor when output is High
P2 = VCC I1 = 5 ¥ 0.606 = 0.303 mW
Average power dissipation is
P + P2 10.28 + 0.303
Pav = 1 = mW = 5.29 mW
2 2
Example 3.4 Determine the voltages at P1, and P2 of TTL circuit as shown in Fig. 3.16.
Assume VA= 1.1V, VB = 4.5V, VBE = 0.7V, VCC = 5V, R1 = 4.7K,
R2 = 4.7K, R3 = 2.2K
� Solution
The input voltages at A, B are VA = 1.1V, and VB = 4.5V
respectively. As VA is 1.1V, emitter base junction of T1 to input
terminal A is conduction state.
Consequently, the VP1 = VA + VBE = 1.1V + .7V = 1.8V
The base emitter junction of T2 will be saturate when VP1 = 0.7
+ 0.7 + 0.8 = 2.2V.
As VP1 is 1.8 V, T2 will be OFF but transistor T1 conducts to input
terminal A.
Fig. 3.16 Transistor-transistor logic
Therefore, IB2 = 0 and the output voltage is equal to 5V.
(TTL)
So VP2 = 5V.
In the circuit as shown in Fig. 3.18, diode D1 will be reverse-biased. As diode D1 is not conducting,
no current will flow through it. Actually, D1 is used in the circuit to protect transistor when a negative
voltage is impressed on the input. With no voltage between the base and emitter of transistor T1, no
current will flow through transistor. A back-to-back pair of diodes can replace T1 as shown in Fig. 3.19.
Depending on the logic level of the input, the function of diodes is to steer current to or away from
the base of transistor T2. When the input is Vcc, no current will flow through the left steering diode of
T1. But, there will be current through the right steering diode of T1 through resistor R1, as well as through
base-emitter diode junction of T2 and T4. So, transistors T2 and T4 will have base current, and T2 and T4
will be turn on. The voltage between the base of T1 and ground will be approximately 2.1 volts. This
voltage drop is equal to the combined voltage drops of three p-n junctions, namely the right steering
diode of T1, base-emitter diode of T2, and base-emitter diode of T4.
Fig. 3.18 Practical inverter circuit with Fig. 3.19 Practical inverter circuit with input VCC
input Vcc
As base current is flow through transistor T2, it will be turned on and it also be saturated. When T2 is
saturated, the voltage drop across resistor R3 will be enough to forward-bias the base-emitter junction of
transistor T4. Therefore, transistor T4 will operate in saturation.
As T4 is saturated, the output voltage will be almost 0 volts or a binary ‘0’ or logic level low. The
voltage between the base of T3 and its emitter is not enough
to turn on it due to diode D2. So, T3 remains in cut-off.
If input is connected with ground as shown in Fig. 3.20, all
of the current goes through the left steering diode of T1 and
none of it through the right diode. We know that p-n junction
diodes are very non-linear devices. If the forward biased
voltage is more than threshold voltage, it conducts. When
diodes begin to conduct, the voltage drop across diodes are
not more than 0.7 volts. In this circuit, the left diode of the
steering diode pair is fully conducting, and the voltage drop
across it is approximately about 0.7 volts.
This eliminates current through the base of T2, thus turning
it off. When T2 is off, there is no longer a path for T4 base Fig. 3.20 Practical inverter circuit
current. So T4 goes into cut-off. On the other hand, T3 has with input ground
90 Digital Electronics: Principles and Applications
sufficient voltage dropped between its base and ground to forward-bias its base-emitter junction and
saturate it. Accordingly, the output terminal voltage will be logical high. In actuality, the output voltage
will be somewhere around 4 volts depending on the degree of saturation and any load current, but still
high enough to be considered a high logic level.
Now, we can say that the circuit behave as inverter. When input is binary ‘1’ and output is ‘0’. If input
is binary ‘0’ output will be ‘1’. Table 3.6 shows the truth table of inverter.
The advantage of totem-pole output circuits is that there is always one of the totem-pole transistors is
cut-off, except during the transition from one output state to the other output state. Therefore, the required
pull-up resistor R4 should be much smaller than the simple passive pull-up circuit resistance. Since RC
time constant reduces, the time required to charge the input capacitance of gates which is connected to a
totem-pole output decreases. There are some disadvantages of the totem-pole output circuit as follows.
When the circuit output changes from one state to the other, the two transistors (T3 and T4) must both
change modes, and they will not change at exactly the same time, so that there is a very short interval
when both are conducting and the current through R3 will be larger during this interval than when one of
the transistors is cut-off. As a result, a surge of current is generated and a noise voltage “spike” can be
detected on the power supply line. The magnitude of this voltage spike is proportional to the resistance
of the supply line. Accordingly, TTL gates generate noise themselves, and extra precautions should be
taken to eliminate its adverse effect and use by-pass capacitors throughout the system built with TTL
gates to reduce the magnitude of the noise spikes.
Fig. 3.21 (a) The output of connected inverter (b) Equivalent logic diagram
(c) Wired – logic graphic symbol
While two inverter gates are connected together like the output of one inverter is used as the input of
another, the circuit can be worked as a buffer. Due to the two stage inversion, final output of buffer is
same as input. The buffer circuits are used as signal amplifiers. A weak signal source may be boosted by
means of two inverters connected in cascade. The logic level is unchanged, but the full current-sourcing
or current-sinking capability of buffer is available to drive a load. An open-collector type buffer circuit is
shown in Fig. 3.22. This circuit is similar with inverter. Only one difference is that it has one additional
common-emitter transistor, which can re-invert the output signal.
Fig. 3.22 Buffer with open collector output Fig. 3.23 Buffer with open collector output
when input is VCC
When input is high +VCC as depicted in Fig. 3.23, no current flow through the left steering diode of
T1. The current flows through resistance R1 and the base of transistor T2 so that transistor T2 operates in
saturation.
As T2 is saturated, T3 will also be saturated. Therefore, the voltage between the base and emitter of
the transistor T4 is very small. Then transistor T4 operate in cut-off. The output of transistor T4 is high or
+VCC. Thus, in buffer circuit, when the input voltage is high, output will be high. Similarly with a low
input voltage, the output will be low.
When input is low as shown in Fig. 3.24, current flow through switch base emitter junction of
transistor T1 and resistance R1. Consequently, no current will flow through the base of T2 and transistor
T2 operate in cut-off. Hence, no base current goes through T3 and T3 is also in cut-off condition. As T3
in cut-off, a current flow through resistance R4 and base emitter junction of transistor T4. The output of
transistor T4 is low. A buffer circuit with totem pole output transistor is shown in Fig. 3.25. The circuit
operation is same as open collector circuit. Table 3.7 shows the truth table of buffer.
92 Digital Electronics: Principles and Applications
Fig. 3.24 Buffer with open collector output Fig. 3.25 Buffer circuit with totem pole output
when input is ground
3.13.3 TTL NAND and AND Gates with Open Collector Output
Figure 3.26 shows the two inputs inverter circuit. The steering diodes marked as T1 is actually a
transistor. The three p-n junction diodes cannot be replaced by a simple n-p-n transistor. Therefore, a
different transistor is required. This transistor should have two emitters with one base and one collector.
Figure 3.27 shows the multi emitter transistor based NAND gate.
When both inputs are grounded as shown in Fig. 3.28(a), transistor T2 will be operated in cut-off
mode. Then T3 is forced to operate in cut-off. The output of the transistor T3 is high. If one input terminal
is grounded other terminal is connected with +VCC, transistor T2 is in cut-off. Then transistor T3 is also
in cut-off and output will be high. But output is low when all inputs are high. Transistor T2 is turned on
and operate in saturation. Then T3 is forced to operate in saturation. The truth table of two inputs NAND
gate is given in Table 3.8.
Fig. 3.26 The two inputs Fig. 3.27 The multi-emitter transistor
inverter circuit based NAND gate
Digital Logic Family 93
Fig. 3.28 (a) The multi-emitter transistor based NAND gate with both inputs grounded
(b) The multi-emitter transistor based NAND gate with one input high and other grounded
Fig. 3.28 (c) The multi-emitter transistor based NAND gate with one input high and other
grounded (d) The multi-emitter transistor based NAND gate with both inputs high
Fig. 3.30 NOR gate with open collector Fig. 3.31 NOR gate with open collector
In the same way, if both inputs A and B are high, transistor T3 and T4 will be in saturation, and
transistor T5 is also in saturation. Then output will be low. But the output of transistor T5 is only high
when both inputs A and B are low. In this case, left steering diodes of T1 and T2 are conducting through
resistance R1 and R2 respectively. No current goes through base of transistor T3 and T4. So T3 and T4 are
in cut-off. Hence, no voltage is applied across base emitter junction of T5 and T5 is in cut-off. As a result,
output will be high. Therefore, we can say that this circuit behaves as NOR gate. Table 3.10 shows the
truth table of two inputs NOR gate.
Digital Logic Family 95
operation. If the control input is at logic ‘1’, the output of gate becomes tri-state or high impedance
state irrespective of inputs. In high impedance state, the gate is physically disconnected from its output
terminal when C is at logic ‘1’ and the output appears as an open circuit.
Figure 3.34 shows the tri-state two inputs NAND
gate. In this circuit, A and B are the inputs and C
is used as control input. When control input (C) is
HIGH or logic ‘1’, it works like any other NAND
gate. But when control input (C) is LOW or logic
‘0’, T1 conducts, and the diode connecting between
T1 emitter and T2 collector starts to conduct and
driving T3 into cut-off. As T2 is not conducting, T4
is also at cut-off. When both pull-up and pull-down
transistors are not conducting, the output (O) is in
Fig. 3.34 Tri-state NAND gate high-impedance state (Z). The circuit operation is
given in tabular form as depicted in Table 3.12.
The outputs of two or more tri-state gates can be
Table 3.12 Truth table for tri-state NAND gate
directly wired together as illustrated in Fig. 3.35. In
Control Data input Output (O) this circuit, C1 C2 …. CN are control inputs and D1
input C D2….. DN are data inputs and output is O. Assume
A B
0 0 0 1
that during operation at most one of them is not in
0 0 1 1 the high impedance state. Certainly those gates are
0 1 0 1 in the high-impedance state, they are effectively
0 1 1 0 disconnected from the common point and they
1 x x High impedance(Z) cannot affect the operation of any of the others in
any way. Consequently, the activated gate controls
the value of the common output line. Hence,
tri-state gates with their outputs wired together
can be used as a bus. In fact, tri-state gates were
developed and are used almost exclusively for this
application. The advantages of using tri-state gates
instead of open-collector gates are that more gates
outputs can be wired together and bigger busses
can be built. The tri-state gates are faster as they
Fig. 3.35 Bus realisation using tri-state gates have lower propagation delay.
The co-ordinates of BP1 and BP2 are VIN = 0.7V, VOUT = 5.0V and VIN = 1.5V, VOUT = 0.1V respectively.
3.14.4 Fan-Out
Fan-out is the maximum number of TTL loads that can
be connected to the output of a TTL driver circuit. Figure
3.39 shows that only one TTL load gate is connected to the
output of a TTL transistor. Since the fan out of the driver
T0 is one, 1.
If there is no load at output of inverter, VOH of the inverter
is VCC = + 5V and the High noise margin NMH = 3.5V.
Figure 3.39 shows that only one load is present. VOH at
VOUT is due to voltage divider action of R2 and R1.
R1 Fig. 3.39 Fan-out of TTL circuit
VOH = VBE (SAT ) + (VCC - VBE (SAT ) )
R2 + R1
10
= 0.8 + (5.0 - 0.8) = 4.6V
1 + 10
In this way, when one load is connected to the TTL drive; VOH has been reduced from 5.0V to 4.6V.
Therefore, NMH is also reduced and its value is
NMH = VOH – VIH = 4.6 – 1.5 = 3.1V
Subsequently, we can determine the maximum number of TTL
load that can connect to the output of a TTL driver. To find out the
fan out, NMH is equal to 0.
NMH = 0
fiVOH = VIH
While T0 is off and N number of TTL load is connected with
the TTL driver as depicted in Fig. 3.40. There are N base resistors
R1 and all are connected in parallel to VBE(SAT). So we can write the
expression for N number of TTL load. Fig. 3.40 Fan-out of TTL circuit
100 Digital Electronics: Principles and Applications
After solving the above equation, the fan out can be determined. After substituting all know parameters
in the above equation, we get N which may be integer or real number. As fractional loads are unfeasible,
fan-out always will be in round figure. To determine the maximum number of TTL load gates for the
fan-out, we always consider NMH = 0 and NMH is equal to NML.
Fall Time (tf ) Due to the junction capacitance effects, the output voltage decreases as depicted in
Fig. 3.42. At time t2, the transistor is at the edge of saturation and output voltage of transistor is about
VCE(sat) = 0.1V. The fall time can be determined from (t2 – t1).
Fig. 3.41 N TTL load connected to a TTL driver Fig. 3.42 Rise time, fall time, delay time and
circuit saturation time
Digital Logic Family 101
Saturation Time(ts ) It is clear from Fig. 3.42 that there is another step change in the input volt-
age from 5V to 0V at time t3. Though input voltage changes suddenly, output voltage does not change
till t4 due to the removal of the overdrive charge from the base, or the base and collector regions. The
saturation time is computed as (t4 – t3).
Rise Time (tr ) Due to junction capacitance effects output voltage rises similar to fall time, and the
transistor is now turning off. At time t5, the transistor is at the edge of cut-off. Consequently the output
is VCC, 5V. The rise time is the difference between t5 and t4.
The switching times namely delay, fall, saturation and rise time are required for digital circuit designer.
But propagation delay is most important for designers. In a inverter circuit, the turn-on delay time tPHL is
calculated as the output is changing from a high voltage level to a low voltage level.
tf
t PHL = td +
2
The turn-off delay time tPLH is computed as the output is changing from a low voltage level to a high
voltage level.
tr
t PLH = ts +
2
Parameter Value
3.15 METAL OXIDE SEMICONDUCTOR
VIH min 2.0V
FETS (MOSFET) CHARACTERISTICS
VIL max 0.8V
The Field–Effect Transistor (FET) is a three terminal voltage
VOH min 2.4
controlled semiconductor device. The three leads of the FET
VOH max 0.4V are drain (D), source (S) and gate (G). The gate is used as input.
IIH 0.02mA The operation of FET depends on the flow of only one type
IIL 0.4mA of carrier–either holes or electrons. The current flow in the
IOH 4mA FET occurs between the source and drain. The path connection
IOL 8mA between the source and drain is called the channel. The
tPHL 10ns
FETs are classified into two categories: Junction Field-Effect
Transistors (JFETs) and Metal Oxide Semiconductor Field-
tPLH 10ns
Effect Transistors (MOSFETs). The JFETs are used in linear
Pd 10mW circuits but the MOSFETs are employed in digital circuits.
Digital Logic Family 103
There are two types of MOSFETs : n-channel and p-channel. MOSFETs are also classified by the
conducting state: depletion mode and enhancement mode. Actually the mode of operation depends on
bias voltage. When the MOSFET is conducting with zero bias voltage, it is said to be a depletion mode
device. If the device is not conducting with zero bias, the device will be known as enhancement–mode
MOSFET. The name enhancement MOSFET is derived from the fact that a voltage is required on the
gate to enhance or increase the current flow in the channel. Similarly, the depletion MOSFET derives
from the fact that a voltage on the gate is used to deplete or reduce the current flow in the channel.
The basic structure of an n-channel depletion–mode
MOSFET is shown in Fig. 3.45. This device consists of
two n-type regions diffused on a p-type substrate. The two
heavily doped n–type regions are called the source and drain.
The moderately doped n-type channel runs between source
and drain. This channel is insulated from the gate by a layer
of silicon oxide SiO2. Generally, the gate is constructed by a
thin layer of aluminium located in the centre of the channel.
Fig. 3.45 The simplified gate circuit When a positive voltage is applied to the drain and a negative
sinking current
voltage is applied to the gate, the channel will be appeared
as shown in Fig. 3.46. The negative
potential will attract holes from the p-
type substrate and repel or neutralise the
electrons in the moderately doped n-type
channel. As the channel being depleted of
carriers, subsequently the drain current
will decrease.
As the gate of the MOSFET is electri-
cally isolated from the channel, the device
Fig. 3.46 Biasing of n-channel depletion–mode MOSFET can be able to operate with a positive gate
to source voltage. If VGS increases, the
number of free electrons flowing through the
channel increases. Consequently, the current
flow increases with increasing VGS. The drain
curves of a typical n-channel depletion mode
MOSFET are depicted in Fig. 3.47. These
curves are formed by varying VGS to various
positive as well as negative values and observ-
ing the relationship between VDS and ID for each
value of VGS.
The construction of an n-channel
Fig. 3.47 Drain curves of n-channel depletion–
mode MOSFET enhancement type MOSFET is shown in Fig.
3.48(a). The main difference between depletion
and enhancement type MOSFET is that there is no channel in enhancement type MOSFET. The biasing
arrangement of this MOSFET is given in Fig. 3.48(b). When VGS is increased, the conductivity of the
104 Digital Electronics: Principles and Applications
channel is enhanced and electrons are pulled into the substrate just below the layer of insulation under
the gate. Ultimately, a channel is formed between the source and drain as the minority electron carriers
are drawn from the substrate to the positive gate voltage. The amount of gate voltage required to develop
a channel is called the threshold voltage (VTH). When the bias voltage is below the threshold voltage,
current flow stops. A negative bias voltage can generate cut-off in an enhancement–mode MOSFET. The
schematic symbols of all MOS transistors are shown in Fig. 3.49.
Fig. 3.49 Symbols of MOS transistors (a) n-channel depletion type (b) p-channel depletion type (c)
n-channel enhancement type (d) p-channel enhancement type
Metal-Oxide-Semiconductors (MOS) are extensively used in digital electronics circuits due to the
following advantages:
(i) MOS requires less space than BJT for fabrication a silicon chip
(ii) High input resistance
(iii) Very low power consumption
(iv) MOS logic family is compatible with BJT due to matching voltage levels.
(v) Very economical
(vi) Few steps are required for MOS fabrication process
(vii) MOS circuit’s speed is very high due to reduction of internal dimension of devices
(viii) Dynamic circuit techniques are used in MOS technology. Therefore less number of transistors is
required to implement a given circuit.
(ix) Presently local oxidation technique is used to increase circuit density and to improve circuit
performance.
The MOS logic has three categories such as
Digital Logic Family 105
MOSFET, T2 behaves as a resistance and MOSFET, T1 acts as a switch. To provide greater current, the
pull-down devices are first turned off and a capacitive load must be charged as shown in Fig. 3.52(b).
Table 3.15 Truth table for two inputs MOS NOR gate
Inputs Transistors Output
A B T1 T2 O
Low Low Cut-off Cut-off High
Low High Cut-off Saturation Low
High Low Saturation Cut-off Low
High High Saturation Saturation Low
Fig. 3.55 Two Inputs NOR gate
Digital Logic Family 107
NMOS enhancement-mode transistor is the lower T1 and PMOS enhancement-mode transistor is the
upper T2. Gates of both NMOS and PMOS are connected together. Drains are also connected together.
One transistor can be considered as load for the other. Here, T1 will be act as the load for T2 in the PMOS
inverter. Similarly, T2 can be considered as the load on the NMOS inverting transistor. The operation of
T1 and T2 is complementing each other. The output of a CMOS inverter does reduce all the way to 0V.
Since output can range from 0 volts to VDD, output is said to rail-to-rail.
3.17.1 CMOS Inverter
Two complementary MOSFETs, namely, p-channel MOSFET (PMOS) and n-channel MOSFET (NMOS)
are connected in such a way
that the circuit behaves as in-
verter. Figure 3.56 shows the
complementary CMOS in-
verter. The drains are joined
together. Vdd is connected
with source of PMOS and
source of NMOS is also
connected with ground.
Figure 3.57(a) shows the
operation of CMOS invert-
er when input is connected
with low voltage (logic 0).
Fig. 3.56 Complementary Fig. 3.57 (a) Complementary CMOS When input voltage is low,
MOS inverter inverter circuit with input ground the NMOS will be cut-off
and PMOS will be oper-
Table 3.16 The truth table of CMOS
inverter
ating in saturation mode.
Then output will be Vdd. Similarly, when input voltage is
Input Transistor Output high, PMOS will be in cut-off and NMOS operate in satura-
A T1 T2 O tion. Therefore, the output voltage will be almost zero volt. In
Low Cut-off Saturation High this way, this circuit be-
haves as inverter. Table
High Saturation Cut-off low
3.16 shows the truth ta-
ble of CMOS inverter.
The transistor T2 is a P-channel MOSFET. When the channel
is more positive than the gate, the channel is enhanced and
current is allowed between source and drain. Therefore, the
upper transistor T2 is turned on. The transistor T1, having zero
voltage between gate and source, is in its cut-off mode. Thus,
the actions of these two transistors are such that the output
terminal of the gate circuit has a solid connection to Vdd and a
very high resistance connection to ground. This makes the
output high or logic 1 for the low or logic 0 state of the input. Fig. 3.57 (b) Complementary
CMOS inverter
Similarly, when the input is +VCC, the operation of the circuit circuit when input
is depicted in Fig. 3.57(b). The transistor T1 is saturated as it has connected to VCC
Digital Logic Family 109
sufficient voltage of the correct polarity applied between gate and substrate
to turn it on due to positive on gate, and negative on the channel. The
transistor T2, having zero voltage applied between its gate and substrate,
is in its cut-off mode. Thus, the output of this gate circuit is now “low”
or logical ‘0’. Clearly, this circuit exhibits the behaviour of an inverter, or
NOT gate. The multiple-input CMOS gates such as AND, NAND, OR, and
NOR are also explained in the next section.
3.17.2 CMOS NAND and AND GATE
Figure 3.58 shows the two inputs CMOS NAND gate. The two p-channel
MOSFETs namely T1 and T2 are connected in parallel. Two n-channel
MOSFETs T3 and T4 are connected in series. It can be noticed that transistors
T1 and T3 are in series connected complementary pair and form an inverter
circuit. These transistors are controlled by input signal A. When the input Fig. 3.58 CMOS NAND
is high, the transistor T1 is cut-off and transistor T3 is ON. On the other gate
hand, when input is low, T1 is ON and T3 is OFF. Similarly, transistors T2
and T4 are controlled by the same input signal (input B), and they will also exhibit the same ON/OFF
behaviour for the same input logic levels. The following sequence of switching shows the behaviour of
this NAND gate for all four possibilities of input logic levels (00, 01, 10, and 11) in Fig. 3.59 (a), (b),
(c) and (d) respectively. Table 3.17 shows the truth table for two inputs CMOS NAND gate.
Fig. 3.59 (a) CMOS NAND gate with both inputs grounded (b) CMOS NAND gate when one input
grounded and other connected with Vdd (c) CMOS NAND gate when one input grounded and
other connected with Vdd (d ) CMOS NAND gate when both inputs connected with Vdd
110 Digital Electronics: Principles and Applications
Table 3.17 Truth table for two inputs CMOS NAND gate
Inputs Transistors Output
A B T1 T2 T3 T4 O
Low Low Saturation Saturation Cut-off Cut-off High
Low High Saturation Cut-off Cut-off Saturation High
Fig. 3.61 Two inputs CMOS High Low Cut-off Saturation Saturation Cut-off High
NOR gate High High Cut-off Cut-off Saturation Saturation Low
Table 3.18 Truth table for two input CMOS AND gate
Inputs Transistors Output
A B T1 T2 T3 T4 T5 T6 O
Low Low Saturation Saturation Cut-off Cut-off Cut-off Saturation Low
Low High Saturation Cut-off Cut-off Saturation Cut-off Saturation Low
High Low Cut-off Saturation Saturation Cut-off Cut-off Saturation Low
High High Cut-off Cut-off Saturation Saturation Saturation Cut-off High
Table 3.19 Truth table for two inputs CMOS NOR gate
Inputs Transistors Output
A B T1 T2 T3 T4 O
Low Low Cut-off Cut-off Cut-off Cut-off High
Low High Cut-off Saturation Cut-off Saturation Low
High Low Saturation Cut-off Saturation Cut-off Low
High High Saturation Saturation Saturation Saturation Low
The OR function can be built up from the basic NOR gate and an inverter on the output of NOR
gate. Figure 3.62 shows the two inputs CMOS OR gate. The truth table of two inputs CMOS OR gate
is depicted in Table 3.20.
Digital Logic Family 111
When input voltage varies in between the two levels VIL max and VIH min, the CMOS transistor operates
in the active region and output level is not specially determined. In this case, there is no control on the
transistor parameters. The difference between VIH min and VIL max is called the Transition Width (TW).
TW = VIH min – VIL max = 3.5 – 1.5 = 2V
On the other hand, the low output voltage of CMOS, VOL varies in 0 to 0.1V, and the maximum low
state output voltage is VOL max= 0.1 V. VOH represent the high state output voltage and lies between 4.9
V and 5 V. The worst-case high output voltage, VOH min =4.9 V according to data sheet of CMOS. Figure
3.62 shows the input and output voltage profile of CMOS. The worst case input and output voltages
have been listed below:
Maximum low input voltage VILmax 1.5 V
Minimum high input voltage VIH min 3.5 V
Maximum low output voltage VOL max 0.1 V
Minimum high output voltage VOH min 4.9 V
The Logic Swing (LS) of CMOS can be determined from the difference between the two output
voltage levels as given below
LS = VOH min – VOL max = 4.9 – 0.1 = 4.8V
of input signal increases, CMOS gate dissipates more power. However, CMOS gates draw transient
current during every change of output state, from low to high and high to low. Therefore, CMOS ICs
have greater power dissipation at greater fre-
quencies. At 1 MHZ, the power dissipation is
approximately 1mW.
Fig. 3.64 CMOS driver sinks a current Fig. 3.65 CMOS driver source a current
from a CMOS load to a CMOS load
For example a TTL NAND gate output is fetched to a CMOS Inverter as shown in Fig. 3.69. Both
gates are powered by the 5V power supply. When TTL gate
output is low (0 to 0.4V), it will be accurately recognised by the
CMOS gate as a low (0 to 1.5V). If the TTL gate output is high
(2.4 to 5V), it will not be accurately recognised by the CMOS
gate as a high (3.5 to 5V). Due to different voltage levels, there is
some mismatch. Therefore, the output of a TTL falls with in the
unacceptable range of the CMOS input and it will be accepted as
low. The problem can be solved by connecting a pull-up resistance
at output of TTL as shown in Fig. 3.70 and Fig. 3.71. Fig. 3.69 Interfacing a TTL driver
Sometimes, it is required to interface a TTL IC with a CMOS and a CMOS load
IC when CMOS IC is powered by a greater voltage as depicted
Fig. 3.70 Interfacing a TTL driver and Fig. 3.71 (a) Output voltage profile of TTL with
a CMOS load with pull-up pull-up resistance (b) Input voltage
resistance profile of CMOS
in Fig. 3.72. In this case, the CMOS can able to recognise the both low and high output as low because
the high state output voltage level (2.4V to 5V) is less than the high state input voltage of CMOS (7V to
10V). So, a pull-up resistance is connected in between output of TTL and Vdd as shown in Fig. 3.73 to
increase the TTL high state output voltage to full power supply voltage.
Fig. 3.72 Interfacing a TTL driver and Fig. 3.73 Interfacing a TTL driver and
a CMOS load at different a CMOS load with pull-up resistance
power supply at different power supply
116 Digital Electronics: Principles and Applications
The power dissipation of a TTL device remains somewhat constant at different operating conditions.
However, the power dissipation of a CMOS device depends on the operating frequency. If the frequency
of input signal increases, the CMOS devices dissipate more power. When a CMOS operates in a static
condition, it dissipates approximately zero power.
As a CMOS gate also draws much less current from a driving gate output than a TTL gate because
MOSFETs are voltage-controlled, not current-controlled, devices; this means that one gate can drive
many more CMOS inputs than TTL inputs. The measure of how many gate inputs a single gate output
can drive is called fan-out.
Another advantage of CMOS is that CMOS ICs can operate in wide range of power supply voltages
than TTL gate.
The disadvantage of CMOS is slow speed, as compared to TTL. As the input capacitances of a
CMOS gate are greater than the input capacitances of TTL, the RC time constant developed by CMOS
logic circuit resistances will be more. As a result, CMOS ICs are operated in slow speed.
SUMMARY
In this chapter, the classification of digital logic family is explained. The operation of different logic families, namely
DTL, TTL, ECL, and CMOS are discussed with circuit diagrams. The characteristics of digital logic family are
incorporated for better understanding of TTL, MOS and CMOS logic gates. TTL inverter, buffer, NAND, AND,
NOR and OR gates are explained with the help of truth table and circuit diagrams. An inverter is one that output is
the opposite of input. If input is ‘low’ output is ‘high’. When two inverter gates connected in ‘series’, input is inverted
two times, so that buffer output is same as input. Buffer gates are commonly used to amplify weak signal before driving
a load. Taking a TTL inverter circuit and adding another input we could build a TTL NAND gate. An AND gate
may be developed by adding an inverter gate to the output of the NAND gate. An OR gate can also be formed after
addition of an inverter at the output of the NOR gate. The MOS inverter, NAND and NOR gate are explained in this
chapter. CMOS logic gates are made using complementary transistors namely NMOS and PMOS. CMOS inverter,
NAND, AND, NOR and OR gates are also discussed in this chapter. The characteristics of TTL, MOS and CMOS
are explained briefly to understand the applications of TTL, MOS, and CMOS logic families in digital systems. The
interfacing of TTL and CMOS is also enlightened in this chapter.
REVIEW QUESTIONS
3.1 What are the types of digital logic family? Explain briefly any one logic family with circuit dia-
gram.
3.2 Draw the circuit diagram of DCTL to perform logical AND and explain briefly the operation of
circuit.
3.3 Determine fan out of transistor T0 as shown in Fig. 3.76. Consider VCC = 5V, R = 12K, IB = 0.15mA
for saturation.
Fig. 3.76
3.4. Determine IB1, IB2, IC1 and IC2 for the transistor T1 and T2 as depicted in Fig. 3.77.
Consider R1 = R2 = 1.5, R = 4.7K, VCC = 5V, hfe = 50, and VCE = 0.2V.
Fig. 3.77
3.5. Determine the rise time of a RTL circuit as depicted in Fig. 3.78. Consider R1 = 450 ohms , R = 640
ohms, C = 5pF, N = 10.
Fig. 3.78
120 Digital Electronics: Principles and Applications
Fig. 3.79
3.7. Write the truth table of the DTL circuit as depicted in Fig. 3.80.
Fig. 3.80
3.8. Determine the voltage V1 in a HTL NAND gate for the following conditions:
i. T1 begins to come out of cutoff
ii. T2 operates at the edge of saturation
Consider R1 = 3K, R2 = 10K, R3 = 5K, R4 = 10K, VZ = 6.8V, VCC = 12V. Assume all necessary
parameters.
Digital Logic Family 121
3.9. Explain the operation CMOS NAND gate with circuit diagram.
3.10. Give a list for the characteristics of TTL logic family.
3.11. Give a list for the characteristics of CMOS logic family and compare with TTL logic family.
3.12. Draw a circuit diagram of TTL NAND gate and explain its operation.
3.13. Define propagation delay, noise margin and fan-out.
3.14. Draw the circuit diagram CMOS NOR gate and explain with truth table.
3.15. Explain interfacing of two logic families for the following conditions:
i. TTL driving CMOS logic family
ii. CMOS driving TTL logic family
3.16. What is noise margin? Explain the effect of noise Table 3.22
margin in operation of logic family.
Parameter Value
3.17. How a TTL device can interface with CMOS device
VIH min 2.0V
when TTL is connected with 5V and CMOS is con-
nected with 12V? VIL max 0.7V
3.18. The specification of TTL gate is given in Table 3.22. V OH min
2.4V
Determine noise margin and propagation delay. VOH max 0.4V
3.19. Calculate the value of pull-up resistance for an open I IH
0.02mA
collector TTL gate with a fan-out of 10. IIL 0.4mA
Consider VIH min = 2.0V, IOH = 20mA and the leakage IOH 4mA
current flows through the collector of TTL output IOL 8mA
transistor is 40 mA.
tPHL 10ns
3.20. Draw the circuit diagram of Schottky NAND gate
tPLH 10ns
and explain its operation briefly.
CHAPTER
4
COMBINATIONAL LOGIC
4.1 INTRODUCTION
A digital circuit is combinational if its output is depending on inputs. The combinational logic circuit is memory
less. This logic circuit deals with the method of combining basic gates to get desired solution. Combinational
logic circuits can be constructed using logic gates and without feedback from output to input.
A simple mathematical model of combinational logic functions is a unit with inputs and outputs as
shown in Fig. 4.1.
X is the set of input variables X0, X1, X2,
…………. to Xn and Y is the set of output variables
Y0, Y1, Y2 ……………… Yn. The combinational
function operates on the input variables X0, X1, X2,
…………. to Xn and the output variables Y0, Y1, Y2
……………… Yn.
The output Y0 is a function of X0, X1, X2,
Fig. 4.1 Combination logic functions …………. to Xn and it is mathematically written
as Y0 = F(X0, X1, X2, …………. to Xn).
Similarly, Y2, Y3 … Yn are also functions of X0, X1, X2, …………. to Xn. The combination logic circuit
can be designed by the following steps:
Step 1 - Select the problem.
Step 2 - Construct the truth table.
Step 3 - Write switching functions.
Step 4 – Simplify switching functions.
Step 5 - Draw logic diagram.
Step 6 - Develop logic circuit using gates.
–
Sum Term: A sum term is sum of literals or the logical OR of literals. For example, X+Y and X +
–
Y + Z are sum terms, when X, Y, Z are Boolean variables. X(Y + Z) is not a sum term as the logical AND
operation is present.
Sum of Products: Sum of product (SOP) is the logical expression in which OR of multiple product
terms are present. Each product term is the logical AND of literals. The example of SOP expression is
–
Y + X Y + XYZ.
Products of Sums: Product of Sum (POS) is the logical expression in which AND of multiple
– –
OR terms are present. Each sum term is the OR of literals. The expression (X + X Y ) (XY + Z) (Y + Z) is
an example of POS.
Minterms: It is a special type of product (AND) term. It is a product term which contains all the
input variables that make up a Boolean expression.
Maxterm: A maxterm is a special type (OR) term. A maxterm is a sum term that contains all the
input variables that make up a Boolean expression.
Canonical Forms: Canonical is defined as “conforming to a general rule”. The rule for boolean
logic is that each term used in a boolean equation must contain all of the variables.
Canonical Sum of Products: A canonical Sum of Products (SOP) is a complete set of min-
terms that defines when an output variable is a logical ‘1’. Each minterm corresponds to the row in the
truth table when the output function is 1.
Canonical Product of Sums: A canonical Product of Sums (POS) is a complete set of max-
terms that defines when an output variable is a logical ‘0’. Each maxterm corresponds to the row in the
truth table when the output function is 0.
Sum of Minterms: Sum of minterms is the logical expression in which OR of multiple product
terms are present. Each product term is the logical AND of literals.
Product of Maxterms: Product of maxterms is the logical expression in which AND of multiple
product terms are present. Each sum term is the logical OR of literals.
Any logic expression can be implemented by logic gates. Then we use Boolean algebra to simplify
the expressions by eliminating redundancy at low cost logic circuit. In design, it is required to realise
logic expression in one form to another form by converting. There are two useful techniques for reducing
combinational logic equations and logic diagrams to the fewest possible elements, namely mapping and
tabular minimisation.
4.3 BOOLEAN EQUATION
Logic can be described by truth table, logic diagram and boolean equation.
There are sixteen possible logic functions for two inputs variable and one out-
put. Figure 4.2 shows the logic function and all possible outputs, namely F0 to Fig. 4.2 Combinational
F15 are depicted in Table 4.1. The output function, F is a function of X and Y. logic function
–
The output function F0 = 0, F1 = X.Y, F3 = X, F4 = X Y, F5 = Y, F6 = X ≈ Y,
——– — —– – –– – –
F7 = X + Y, F8 = X + Y , F9 = X ≈ Y , F10 = Y , F11 = X Y + XY + XY, F12 = X ,
– – – – –
Fig. 4.3 Logic dia- F13 = X Y + X Y + XY, F14 = X .Y and F15 = 1. These output functions can be
gram of function F1 represented by NOT, AND, NAND, OR, NOR and Ex-OR and Ex-NOR logic
gates. The logic diagram for switching function F1 is shown in Fig. 4.3. Similarly, truth table, logic
diagram and Boolean equations for two, three and four input variables are also explained in this chapter.
4.4 CANONICAL SUM OF PRODUCT (SOP)/MINTERM
REPRESENTATION
A truth table is a table that shows all the input-output possibilities of any logic circuit. A map is visual
display of fundamental products needed for sum of products solution. Two, three and four variables,
truth tables are explained below:
4.4.1 Two Variables
A truth table for two variables A and B is depicted in Table 4.2. It is clear from this truth table that there
are four possible combinations of the variables and corresponding to these four combinations of the
variables there are four possible minterms m0, m1, m2 and m3. Minterm-0 (m0) occurs when the variable A
––
is ‘0’ and the variable B is ‘0’ and then m0 is represented by A B . Assume that the variable A will always
be represented as the most significant bit and the variable B will be represented as the least significant
–
bit. Similarly, Minterm-1(m1) occurs when A is ‘0’ and B is ‘1’ . Consequently, m1 is represented by A B.
In the same way, the other two minterms m2 and m3 can be obtained as given in Table 4.2.
Table 4.2 Truth Table and minterms representation for two-variables
Inputs Output Minterms Numerical Representation
A B O M
––
0 0 0 m0 = A B 0
–
0 1 1 m1 = A B 1
–
1 0 1 m2 = AB 2
1 1 0 m3 = AB 3
It can be seen that each row of the truth table represents a minterm. Below the output (O), 1’s are
placed to indicate that output contains a particular minterm in its sum and 0’s when that term is excluded
from the sum. According to the truth table, the output (O) contains minterm 1 and 2 only. Then the
output can be expressed as – –
O = A B + AB
Another way of representing this relationship is to use the
Greek letters sigma, S and an ‘m’ to represent “the sum of
minterms”. Applying these notations, we can represent Table
4.2 as O = S m(1, 2). The expression O = S m(1,2) should
– – be read as “O is the sum of minterms 1 and 2”. The logic
Fig. 4.4 Logic diagram of O = AB + AB diagram of O = S m(1,2) is shown in Fig. 4.4
4.4.2 Three Variables
Table 4.3 shows the truth table for a three variables function with minterms. According to the truth table
–– – –
the output (O) contains minterm 1, 2, 6 and 7. Consequently the output expression is O = A B C + A BC +
–
ABC + ABC. By using sigma notation, this can be expressed as O = S m(1, 2, 6, 7). The logic diagram
–– – – –
of O = A B C + A BC + ABC + ABC is shown in Fig. 4.5.
Combinational Logic 125
Example 4.1 Determine the boolean function of the truth Table 4.8 in terms of minterms and draw
the logic diagram.
� Solution
The truth Table 4.8 can be represented in terms of minterms 0, 1, 4 & 5 and it can be expressed as
– – – –– –– –
O = ∏ m (0,1, 4, 5) = A B C + A B C + AB C + AB C . Figure 4.10 shows the logic circuit diagram.
Table 4.8
Inputs Output
A B C O
0 0 0 1
0 0 1 1
0 1 0 0
0 1 1 0
1 0 0 1
1 0 1 1
1 1 0 0
Fig. 4.10 Logic diagram of O = S m(0, 1, 4, 5) 1 1 1 0
128 Digital Electronics: Principles and Applications
Example 4.2 Determine the boolean function of the truth Table 4.9 in terms of maxterms and draw
the logic diagram.
Table 4.9
Inputs Output
A B C D O
0 0 0 0 0
0 0 0 1 0
0 0 1 0 0
0 0 1 1 0
0 1 0 0 1
0 1 0 1 1
0 1 1 0 1
0 1 1 1 1
1 0 0 0 1
1 0 0 1 1
1 0 1 0 1
1 0 1 1 1
1 1 0 0 1
1 1 0 1 1
1 1 1 0 1
1 1 1 1 0
� Solution
The Table 4.9 consists of the following maxterms 0, 1, 2, 3 &15 and it can be represented by O = ∏(0,1,2,3,15).
This function can be expressed as
– – – – – – – –
O = (A + B + C + D)(A + B + C + D)(A + B + C + D) (A + B + C + D) (A + B + C + D ) and its logic
diagram is depicted in Fig. 4.11.
–
Fig. 4.11 Logic Diagram of O = (A + B + C + D)(A + B + C + D)
– – – – – – –
(A + B + C + D) (A + B + C + D) (A + B + C + D )
representation. Similarly, in the maxterm expressions, the function is formed by ANDING together the
maxterms for which the function is false (0). This form of the function is called the Canonical Product
of Sums (POS) representation. Minterms and maxterms can be formed for any number of variables.
We can form the minterm for any row of truth table by ANDING together all the variables that are
true (1) in that row and the complements of all the variables that are false (0) in that row. In the same
way, we can also form the maxterm for any row by ORING together all the variables that are false (0)
in that row and the complements of all the variables that are true (1) in that row.
– ◊ m– ◊ m
The complement of the function F¢(A, B, C) = F(A, B, C) = m0 + m3 + m4 + m5 = m – ◊ m–
0 3 4 5
to a maxterm in the function and a ‘1’ in all other rows at output column. To form a truth table for any
function written in maxterms, the process is almost identical. The logic circuit diagram of O = ∏(0, 1,
4, 5, 10, 11, 14, 15) is depicted in Fig. 4.12.
Table 4.11
Inputs Output Maxterms
A B C D O M
0 0 0 0 0 M0 = A + B + C + D –
0 0 0 1 0 M1 = A + B + C– + D
0 0 1 0 1 M2 = A + B + C– + D –
0 0 1 1 1 M3 = A + B– + C + D
0 1 0 0 0 M4 = A + B– + C + D–
0 1 0 1 0 M5 = A + B– + C– + D
0 1 1 0 1 M6 = A + B– + C– + D –
0 1 1 1 1 M7 = A– + B + C + D
1 0 0 0 1 M8 = A– + B + C + D–
1 0 0 1 1 M9 = A– + B + C–+ D
1 0 1 0 0 M10 = A– + B + C– + D –
1 0 1 1 0 M11 = A– + B– + C + D
1 1 0 0 1 M12 = A– + B– + C + D–
1 1 0 1 1 M13 = A– + B– + C– + D
1 1 1 0 0 M14 = A– + B– + C– + D–
1 1 1 1 0 M15 = A + B + C + D
To develop a logic expression written in minterm from the truth Table 4.12, the procedure is same.
Consider the logic function is O =∑ m (1, 3, 5, 7, 8, 9, 12, 13) and it can be expressed as
––– –– – – – ––– –– –– –
O = A B C D + A B CD + A BCD + A BCD + AB C D + AB C D + ABCD + ABC D.
The truth table of the logic function is illustrated in Table 4.12 and the logic circuit diagram is
depicted in Fig. 4.13.
132 Digital Electronics: Principles and Applications
Table 4.12
Inputs Output Minterms
A B C D O M– – – –
0 0 0 0 0 m0 = A– –B C
–D
0 0 0 1 1 m1 = A–B–C D –
0 0 1 0 0 m2 = A–B–CD
0 0 1 1 1 m3 = A– B CD
––
0 1 0 0 0 m4 = A– BC– D
0 1 0 1 1 m5 = A–BC D –
0 1 1 0 0 m6 = A–BCD
0 1 1 1 1 m7 = A BCD
–––
1 0 0 0 1 m8 = AB– C– D
1 0 0 1 1 m9 = AB–C D–
1 0 1 0 0 m10 = AB–CD
1 0 1 1 0 m11 = AB CD––
1 1 0 0 1 m12 = ABC– D
1 1 0 1 1 m13 = ABC D –
1 1 1 0 0 m14 = ABCD
1 1 1 1 0 m15 = ABCD
–
The product of sum expression can be simplified by using logic adjacency D + D = 1
= (A + B + C) (A + B + C)(A– + B + C–)(A– + B– + C–)
– –
= (A + C) (A + C )
– –
Thus, the simplified expression is O = (A + C) (A + C ) and Fig. 4.14 shows the logic circuit diagram.
––– –– – – –
Similarly, we consider that the minterm expression is O = A B C D + A B CD + A BCD + A BCD
––– –– –– –
+ AB C D + AB C D + ABCD + ABC D and apply Boolean algebra to simplify it. Therefore, the simplified
form of minterm expression is given below:
–– – – – –– – – –
= A B D(C + C) + A BD(C + C) + AB C (D + D) + ABC (D + D)
–– – –– – – –
= A B D + A BD + AB C + ABC , where (C + C) = 1 and D + D = 1
– – – – – –
= A D(B + B) + AC (B + B) = A D + AC
Figure 4.12 represents the logic diagram of the Boolean expression O = (A + B + C + D)(A + B + C +
– – – – – – – – – – – – – – – –
D)(A + B + C + D)(A + B + C + D ) (A + B + C + D) (A + B + C + D)(A + B + C + D)(A + B + C + D ) us-
– –
ing gates before simplification. After simplification we get the simplified expression O = (A + C) (A + C )
and the logic diagram of this simplified expression using logic gates is depicted in Fig. 4.14. Similarly,
––– –– – – – ––– ––
the logic diagram of the Boolean expression O = A B C D + A B CD + A BCD + A BCD + AB C D + AB C D
–– –
+ ABCD + ABC D is shown in Fig. 4.13 using gates before simplification. After simplification, we obtain
– –
the simplified expression of O = A D + AC and Fig. 4.15 represents the logic diagram of the simplified
– –
expression of O = A D + AC . Consequently, it is very clear, from the circuit diagrams that we can be able
to represent the same logic function by different circuit diagrams and also in most simplified form. The
simplified representation of a logic function using logic gates has the following advantages: less cost,
reduce number of logic gates, reduce complexity, simple circuit, and reduce delay and first logic output.
– – – –
Fig. 4.14 Logic diagram of O = (A + C) (A + C ) Fig. 4.15 Logic diagram of O = A D + AC
Example 4.3 Develop the truth table of the logic expression O = P(0,1,2,4,5,7).
� Solution
Table 4.13 shows the truth table of the logic function O = P(0,1,2,4,5,7).
Table 4.13
Inputs Output Maxterms Numerical
A B C O M Representation
0 0 0 0 M0 = A + B + C 0
(Contd...)
134 Digital Electronics: Principles and Applications
(Contd...)
–
0 0 1 0 M1 = A + B + C 1
–
0 1 0 0 M2 = A + B + C 2
– –
0 1 1 1 M3 = A + B + C 3
–
1 0 0 0 M4 = A + B + C 4
– –
1 0 1 0 M5 = A + B + C 5
– –
1 1 0 1 M6 = A + B + C 6
– – –
1 1 1 0 M7 = A + B + C 7
Example 4.4 Develop the truth table of the logic expression O =∑m(1,2,3,4,6,7).
� Solution
Table 4.14 shows the truth table of the logic function O = ∑m(1, 2, 3, 4, 6, 7)
Table 4.14
Inputs Output Minterms Numerical
A B C O M Representation
–––
0 0 0 0 m0 = A B C 0
––
0 0 1 1 m1 = A B C 1
– –
0 1 0 1 m 2 = A BC 2
–
0 1 1 1 m 3 = A BC 3
––
1 0 0 1 m 4 = AB C 4
–
1 0 1 0 m 5 = AB C 5
–
1 1 0 1 m 6 = ABC 6
1 1 1 1 m 7 = ABC 7
Example 4.5 Simplify the logic expression using Boolean algebra and draw the logic circuit for
O = Σ(0, 1, 2, 6, 10, 11).
� Solution
The logic function O = Σ(0, 1, 2, 6, 10, 11) contains four
variables. Table 4.15 shows the truth table of the logic
function and this function can be expressed in standard
SOP form as given below:
–––– ––– –– – – – – –
O = A B C D + A B C D + A B CD + A BCD + AB CD +
–
AB CD.
Then Boolean algebra is used to simplify the function.
––– – – – – – –
O = A B C (D + D) + A CD (B + B) + AB C(D + D)
––– – – – –
= A B C + A CD + AB C where, A + A = 1
–––
Therefore, the simplified logic expression is O = A B C +
– – –
A CD + AB C and the logic circuit diagram is shown in Fig. 4.16 Logic diagram of
––– – – –
Fig. 4.16. O = A B C + A CD + AB C
Combinational Logic 135
Table 4.15
Inputs Output Minterms
A B C D O m ––––
0 0 0 0 1 m 0 = AB CD
–––
0 0 0 1 1 m 1 = AB CD
–– –
0 0 1 0 1 m 2 = A B CD
––
0 0 1 1 0 m 3= A B CD
– ––
0 1 0 0 0 m 4= A BC D
– –
0 1 0 1 0 m 5 = A BC D
– –
0 1 1 0 1 m 6 = A BCD
–
0 1 1 1 0 m 7 = A BCD
–––
1 0 0 0 0 m 8 = AB C D
––
1 0 0 1 0 m 9 = AB C D
– –
1 0 1 0 1 m 10 = AB CD
–
1 0 1 1 1 m 11 = AB CD
––
1 1 0 0 0 m 12 = ABC D
–
1 1 0 1 0 m 13 = ABC D
–
1 1 1 0 0 m 14 = ABCD
1 1 1 1 0 m 15 = ABCD
Example 4.6 Simplify the logic expression using Boolean algebra and draw the logic circuit for
O = ∏ (4, 5, 8, 9, 10, 11)
� Solution
Table 4.16 shows the truth table of logic function O = ∏ (4,5, 8, 9, 10,11) and the standard POS representation
of the function is
– – – – – – – – – – –
O = (A + B + C + D) (A + B + C + D ) (A + B + C + D) (A + B + C + D ) (A + B + C + D) (A + B + C + D )
The above expression can also be simplified using logic adjacency of Boolean algebra and the simplified
of the function is given below:
– – – – – –
O = (A + B + C) (A + B + C) (A + B + C ) = (A + B + C) (A + B)
– –
The logic circuit diagram of this simplified logic expression O = (A + B + C) (A + B) is depicted in Fig. 4.17.
Table 4.16
Inputs Output Maxterms
A B C D O M
0 0 0 0 1 M0 = A + B + C + D
–
0 0 0 1 1 M1= A + B + C + D
–
0 0 1 0 1 M2= A + B + C + D
– –
0 0 1 1 1 M3= A + B + C + D
–
0 1 0 0 0 M4 = A + B + C + D
–
0 1 0 1 0 M5= A + B + C + D
– –
0 1 1 0 1 M6= A + B + C + D
– – –
0 1 1 1 1 M7 = A + B + C + D
–
1 0 0 0 0 M8 = A + B + C + D
(Contd...)
136 Digital Electronics: Principles and Applications
(Contd...)
– –
1 0 0 1 0 M9= A + B + C + D
– –
1 0 1 0 0 M10= A + B + C + D
– – –
1 0 1 1 0 M11= A + B + C + D
– –
1 1 0 0 1 M12 = A + B + C + D
– – –
1 1 0 1 1 M13= A + B + C + D
– – –
1 1 1 0 1 M14= A + B + C + D
– – – –
1 1 1 1 1 M15= A + B + C + D
– –
Fig. 4.17 Logic diagram of O = (A + B + C) (A + B)
—– —–
Example 4.7 Simplify the logic expression (AB(C + BD) + A B ) CD.
� Solution
—– —–
(AB(C + BD) + A B ) CD
– – – –
= (AB(C + B + D) + A + B )CD Applying DeMorgan
– – – –
= (ABC + ABB + ABD + A + B )CD After distribute
– – – –
= (ABC + ABD + A + B )CD As ABB = 0
– – –
= ABCD + ABDCD + A CD + B CD After distribute
– – –
= ABCD + A CD + B CD As ABDCD = 0
– –
= CD(AB + A + B ) Distribute
—–
= CD(AB + A B ) Applying DeMorgan
—–
= CD As AB + A B = 1
� Solution
The output Y of the logic diagram as shown in Fig. 4.18 is
Y = AB BC BC CD Applying DeMorgan
= (AB + BC)(BC + CD) After distribute
= (ABBC + ABCD) + (BCBC + BCCD) Remove repeated variables
= ABC + ABCD + BC + BCD Apply absorption
= ABC (1 + D) + BC(1 + D)
—–
= ABC + BC = BC(A + 1) = B C Fig. 4.18
Combinational Logic 137
Figure 4.19 (a), (b) and (c) are alternatively used in Karnaugh map representation. The names of
the variables are listed on both sides of the diagonal line. The ‘A’ above the diagonal indicates that the
–
variable A is assigned to the columns. The ‘0’ is a substitute for A , and the ‘1’ substitutes for A. Below
–
the diagonal ‘B’ is associated with the rows: ‘0’ stands for B , and ‘1’ stands for B.
Table 4.17 shows the truth table of a two variables function. The outputs of the truth table correspond
on an one-to-one basis are entered into Karnaugh map as depicted in Fig. 4.20. For example, enter “0”
––
in cell-0 corresponding to Boolean expression A B . Similarly, enter “1” in cell-1, 2 and 3 corresponding
138 Digital Electronics: Principles and Applications
– –
to Boolean expressions A B, AB and AB respectively. The minterm
relationship of the function as given in the Karnaugh map (K-map)
– –
is O = A B + AB + AB.
This map has two grouping of two minterms because of the
logic adjacency of 2 adjacent cell regions in the K-map. The shaded
Fig. 4.20 Two variable map
rectangle region corresponds to A and another shaded rectangle
encloses the region corresponding to B. So the simplified function
is O = A + B .
Figure 4. 21 (a), (b), and (c ) show the different adjacent 2-cell regions in the 2-variable K-map.
Example 4.9 Figure 4.22 (a) and 4.22(b) are given. Determine the Boolean expression.
� Solution
K-map is used to simplify the boolean expression based on adjacent cells. Actually, cells make one or more
variables common in boolean expression. The procedure of
determining the boolean expression as follows:
Step-1 Group the two 1s in the column of K-map;
Step-2 Determine the variables top and/or side, which are the
same for the group;
Step-3 Write the Boolean expression. Here the Boolean
–
expression of the function of Fig. 4.22(a) is B.
The procedure of determining the Boolean expression for Fig.
4.22 (b) is given below:
Step-1 Group the two 1’s in the row of K-map;
Step-2 Determine the variables top and/or side, which are the
same for the group;
Step-3 Write the Boolean expression. At this time, the boolean
expression of the function of Fig. 4.22 (b) is A.
Example 4.10 Table 4.18 shows the truth table of a function. Transfer the outputs to the Karnaugh
and write the Boolean expression.
� Solution
Transfer the 1s from the locations in the Truth table to the corresponding
Table 4.18
locations in the K-map. Fig. 4. 23 shows the K-map for the truth table 4.18.
A B Output Then the following procedure is done to determine the Boolean function
0 0 0
0 1 1 Step – 1 Group rectangle the two
1 0 1 1’s in the column under B
1 1 1 Step – 2 Group rectangle the two
1’s in the row right of A
Step – 3 The product term for first group is B
Step – 4 The product term for second group is A
Step – 5 The sum-of-products of above two terms is O = A + B
Fig. 4.23
Fig. 4.24
140 Digital Electronics: Principles and Applications
� Solution
The logic diagram as shown in Fig. 4.24 can be simplified in the
following steps as given below:
Step – 1 The Boolean expression for the logic diagram as shown in
Fig. 4.24 can be written as
– –
O = A B + AB + AB
Step – 2 Relocate the product terms to the Karnaugh map as depicted
in Fig. 4.25.
Step – 3 Form groups of adjacent cells.
Fig. 4.25
Step – 4 The Boolean expressions for groups can be written.
Step – 5 The sum-of-products of above two terms is O = A + B.
Step – 6 The simplified logic diagram can be drawn as shown in Fig.
4.26. Fig. 4.26
Fig. 4.27
� Solution
The logic diagram as shown in Fig. 4.26 can be simplified in the
following steps as given below:
Step – 1 The Boolean expression for the logic diagram as shown in Fig.
– –
4.27 can written and it is O = A B + AB
Step – 2 Relocate the product terms to the Karnaugh map as depicted in Fig. 4.28
Fig. 4.28.
Step – 3 The grouping of adjacent cells is not possible as only diagonal
cells are present. Hence simplification is not possible.
Step – 4 The simplified logic diagram can be drawn using Exclusive Fig. 4.29
OR gate as shown in Fig. 4.29.
Table 4.19
Inputs Output Minterms Numerical
A B C O M Representation
–– –
0 0 0 0 m0= A BC 0
––
0 0 1 1 m 1= A B C 1
– –
0 1 0 1 m 2= A BC 2
–
0 1 1 0 m 3= A BC 3
––
1 0 0 0 m 4= AB C 4
–
Fig. 4.31 Three variable Karnaugh map 1 0 1 0 m 5= AB C 5
–
with adjacent cells combinations (a) four 1 1 0 1 m 6= ABC 6
cells (b) four cells (c) four cells (d) eight cells 1 1 1 1 m 7= ABC 7
map. In minimisation of a four variables function, initially, we find out the most distinguished -1 cells, which
lead to essential prime implicants. After that, the rest ‘1’ cells are grouped to provide the minimal form of
the function. The simplification procedure of Boolean function using K-map is explained later in detail.
Table 4.20 Truth table of four variables
we consider the block of the map is stacked on the top of the right block. Therefore, cell 0 is logic
adjacent to cell 16, cell 2 is logic adjacent to cell 18, cell 8 is logic adjacent to cell 24, cell 10 is logic
adjacent to cell 26 and so on. Table 4.21 shows the truth table for a function of five variables and a five
variable map can be accommodated from this table as shown in Fig. 4.33.
The minterm representation of Table 4.21 is
O = Σ(m0, m1, m2, m3, m8, m16, m17, m18, m19, m24)
To simplify this function, we try to make group all entries of K-map cells. When left block lies above
the right block, all cells that are neighbours side-to-side and top to bottom. Cell 2 is logic adjacent to cell
18 and cell 8 is logic adjacent to cell 24 and so on. So cells 0, 1, 2, 3 and cells 16, 17, 18, 19 are logic
adjacent and makes a group of eight cells. Similarly, the group of two cells consists of cell 8 and 24. In
normal minimisation of a five variables, we may not be able to find out the minimum numbers of terms
or literals. The better approach is to find the most distinguished –‘1’ cells which lead to essential prime
implicants. After that the rest 1’s are grouped to provide the minimal from of the function.
Table 4.21 Truth table of five variables
Inputs Output Minterms
A B C D E O M
0 0 0 0 0 1 m0
0 0 0 0 1 1 m1
0 0 0 1 0 1 m2
0 0 0 1 1 1 m3
0 0 1 0 0 0 m4
0 0 1 0 1 0 m5
0 0 1 1 0 0 m6
0 0 1 1 1 0 m7
0 1 0 0 0 1 m8
0 1 0 0 1 0 m9
0 1 0 1 0 0 m10
0 1 0 1 1 0 m11
0 1 1 0 0 0 m12
0 1 1 0 1 0 m13
0 1 1 1 0 0 m14
0 1 1 1 1 0 m15
1 0 0 0 0 1 m16
1 0 0 0 1 1 m17
1 0 0 1 0 1 m18
1 0 0 1 1 1 m19
1 0 1 0 0 0 m20
1 0 1 0 1 0 m21
1 0 1 1 0 0 m22
1 0 1 1 1 0 m23
1 1 0 0 0 1 m24
1 1 0 0 1 0 m25
1 1 0 1 0 0 m26
1 1 0 1 1 0 m27
1 1 1 0 0 0 m28
1 1 1 0 1 0 m 29
1 1 1 1 0 0 m 30
1 1 1 1 1 0 m 31
144 Digital Electronics: Principles and Applications
–
Example 4.13 Construct a Karnaugh Map for the Boolean function O = AB + CD
� Solution
–
The expression O = AB + CD is a four variables function. So the K-map of the said function consists of
2 = 16 cells. The K-map can be represented by 4 ¥ 4 matrix as shown in Fig. 4.35. The first term of the
4
–
expression is AB, we put 1s in all the cells of the map where A = 1 and B = 1. Then the second term is CD,
we also locate 1’s in all the cells, where C = 1and D = 0.
� Solution
The expression O = ABC + BC is a three variables function. So the K-map of the said function consists
of 23 =8 cells. The K-map can be represented by 4 ¥ 2 matrix as shown in Fig. 4.36. The first term of the
expression is ABC, we put 1s in all the cells of the map where A = 1, B = 1 and C = 1. Then the second term
is BC, we also locate 1s in all the cells, where B = 1and C = 1.
– –– –
The K-map for logic expression O = A BC D + A
– – – – –– – –
BC D + A BCD + A BCD + ABC D + ABCD + ABCD +
ABCD is shown in Fig. 4.38 and we can determine its
simplified form using K-map that is O=B.
Fig. 4.38
––– – –
Similarly, the logic expression O = A B C D + A BC D
–– – –– – –
+ AB C D + ABCD + A B CD + A BCD + AB CD + ABCD
can simplified using K-map and it is O = D as depicted
Fig. 4.39
in Fig. 4.39.
When we fold up the corners of the map, it is a napkin
to make the four cells physically adjacent as shown in Fig.
4.40, The four cells of the above K-map are a group of four
– –
as the Boolean variables B and D are in common. The logic
–– – – –– – –– – – –
expression O = A B C D + A B CD + AB C D + ABCD can be
––
represented in the simplified form that is O = B D .
In the K-map as shown in Fig. 4. 41, if we roll the top and bot-
tom edges of K-map,
a cylinder is formed
with eight adjacent
cells. This group of
eight adjacent cells
has one common
Fig. 4.40 Boolean variable D
= 0. Consequently,
the logic expression
–––– – –
O = A B C D + A BC
– –– – ––
D + ABCD + ABC D
–– – – – Fig. 4.41
+ A BCD + A BCD +
– – – –
ABCD + ABCD can be represented by one product term, D. The
–
original eight term Boolean expression simplifies to O = D.
To simplify the Karnaugh map as given in Fig. 4.42,
we can sketch out two groups of eight cells. A group of
–
eight cells can be represented by B and another group
–
Fig. 4.42 of eight cells represents D . Therefore, the simplified
–––– – –– –– – ––
output of O = A B C D + A BC D + AB C D + ABC D
–– – – – – – – –– – –– –– – – –
+ A B CD + A BCD + AB CD + ABCD + A B C D + A B CD + AB C D + AB CD is O = B + D . Similarly,
148 Digital Electronics: Principles and Applications
–– –
Fig. 4.43 can be represented by O = A C + BC + D. Figure 4.44 can also be represent by grouping 2n of
–– –
cells and can be represented by O = A B + AB + A CD.
� Solution
Firstly, transfer the six maxterms to the K-map as 0s. It is very clear from map that the ‘0’ entries in the map
covering minimum area. To find the proper cell location
in the K-map, it is required to complement the input
variables.
Once the cells are in proper place, form groups of
cells as shown in Fig. 4.49. Larger groups will give a
sum-term with fewer inputs. Fewer groups will yield
fewer sum-terms in the result.
We have two groups. Therefore, POS expression has
two sum-terms. The group of 4-cells yields a 2-variable
sum-term. The second group of 2-cells give us two 3-
variable sum-terms. The simplified function of the
Fig. 4.49 – –
Boolean expression is O = (A + C + D) (C + D). The
final result is product of the two sums.
150 Digital Electronics: Principles and Applications
� Solution
The minimal covering for the ‘0’ entries in the K-map is shown in Fig. 4.50(a). After grouping we get the
–
simplified expression is O = (C + D)A .
Fig. 4.51
Combinational Logic 151
Example 4.17 Simplify the logic function F(A, B, C, D) = Sm (0, 1, 2, 5, 6, 8) + d(3, 4, 7, 14) using
K-map in SOP and POS form.
� Solution
(a) SOP Expression
The minimal covering for the 1 entries is shown in Fig. 4.52. We consider the don’t cares in cells 3, 4, 7, 14
as 1s and used in grouping of 1 entries.
– –– – –
The simplified SOP expression is F(A, B, C, D) = F1 + F2 + F3 = O = A + BCD + BCD.
Fig. 4.52
(b) POS Expression
The minimal covering for the 0 entries is shown in Fig. 4.53. We consider the don’t cares in cells 3, 4, 7, 14
as 0’s and used in grouping of 0 entries. The simplified POS expression is F(A, B, C, D) = F1. F2 . F3 . F4 = O
– – – – – – –
= (C + D) (A + C ) (A + D) (B + C + D)
Fig. 4.53
152 Digital Electronics: Principles and Applications
Figure 4.54 and 4.55 show the logic diagram of SOP and POS solution respectively. Now, we can compare
between the product-of-sums solution and the sum-of-products solution. The SOP uses one three inputs OR
gate and two three input AND gate, while the POS uses three two inputs OR gates, one three inputs OR gate,
and one four input AND gate. For minimal cost solution, the SOP solution is simpler.
Fig. 4.54
Fig. 4.55
Example 4.18 Simplify the logic function F(A, B, C, D) = P (3, 5, 6, 11, 13, 14, 15) + d(4, 9, 10)
using K-Map in SOP and POS form.
� Solution
(a) SOP Expression
The minimal covering for the ‘1’ entries is shown in Fig. 4.56. We consider the don’t cares in cells 4,9,10 as
1s and used in grouping of ‘1’ entries. The simplified SOP expression is F(A, B, C, D) = F1 + F2 + F3 + F4 =
–– –– – ––– –
O = CD + A B C + A B D + A BCD.
Combinational Logic 153
Fig. 4.56
(b) POS Expression
The minimal covering for the ‘0’ entries is shown
in Fig. 4.57. We consider the don’t cares in cells
4,9,10 as 0s and used in grouping of ‘0’ entries.
The simplified POS expression is F(A, B, C, D)
– –
= F1. F2 . F3 . F4 . F5 = O = (A + B + C)(B +
– – – – – – –
C + D) (B + C + D) (A + D) (A + C ). Three
– – –
different group expressions, (A + B + C), (A + D)
– –
and (A + C ) are depicted in Fig. 4.57. When two
–
adjacent cells 6 and 14 are grouped, we get (B +
–
C + D). Similarly, if two adjacent cells 3 and 11
– –
are grouped, we find (B + C + D).
Figure 4.58 and 4.59 show the logic diagram
Fig. 4.57
of SOP and POS solution respectively. Now, we
Fig. 4.58
154 Digital Electronics: Principles and Applications
can compare between the product-of-sums solution and the sum-of-products solution. The SOP uses one four
inputs OR gate, one four inputs AND gate, two three inputs AND gate and one two inputs AND gate, while
the POS uses three three inputs OR gates, two two inputs OR gate, and one five input AND gate. Therefore,
the SOP solution becomes simpler.
Fig. 4.59
Fig. 4.61 Karnaugh map for F1 Fig. 4.62 Karnaugh map for F2
� Solution
The K-maps for F1, F2 and F1.F2 are depicted in Fig. 4.63(a), (b) and (c) respectively.
Fig. 4.63 (a) Karnaugh map for F1 Fig. 4.63 (b) Karnaugh map for F2
� Solution
The K-maps for F1, F2 and F1.F2 are depicted in Fig. 4.64(a), (b) and (c) respectively.
Fig. 4.64 (a) Karnaugh map for F1 Fig. 4.64 (b) Karnaugh map for F2
Table 4.24 The shared term
F1 F2 F1.F2
0 0 0
1 1 1
1 1 1
1 1 1
1 0 0
0 0 0
0 0 0
0 1 0
0 X 0
Fig. 4.64 (c) Karnaugh map for F1.F2
0 X 0
X X X
The K-map for F1.F2 is drawn based on the Table X 0 0
4.24 with shared terms. From the shared K-map of X 0 0
–– ––
F1.F2, the following common terms: A B D and A B C
0 0 0
are obtained. When we write the function for F1 and
F2, we have to keep in mind to include all common 0 0 0
terms. The output functions are written as 0 0 0
–– –– ––
F1= A B D + A B C + BCD
–– –– –
F2= A B D + A B C + A CD
–– – –– – – –
F(ABCK) = A B C + A B C + A BC + A BC + ABCK.
The above Boolean expression is a function of four variables A, B, C, and K. Hence a four variables
K-map can be used for reducing the function. But we interested to represent the said function using three
variables K-map. Therefore the above function can be mapped into three variables K-map as shown in
Fig. 4.65 which is based on Table 4.25.
From the K-map as shown in Fig. 4.65, we find a 2 cell sub cube F1 and a 4 cell sub cube F2. Then
the minimal expression is
–
F(ABCD) = K. F1 + F2 where F1 = BC and F2 = A
– –
= K. BC + A = A + K. BC
� Solution
The three variables K-Map of the Boolean function
–– – – – – ––
ABC D + ABC D + ABCD + A BCD + A B CD +
ABCD is shown in Fig. 4.66 and selection of the
subcubes are also indicated in the same figure.
The simplified from of this Boolean function is as
follows
–– – – – – ––
ABC D + ABC D + ABCD + A BCD + A B CD +
ABCD
– – – – ––
= ABC (D + D) + ABC(D + D) + A (B Fig. 4.66 Three variable K-map of ABC D +
– – – – – – – – –
+ B )CD (As D + D = B + B = 1) ABC D + ABCD + A BCD + A B CD + ABCD
– – – – – –
= ABC + ABC + A CD = AB(C + C) + A CD = AB + A CD ( As C + C = 1)
The minimal expression from K-map is
– –
F(ABCD) = F1 + F2 = AB + A CD where F1 = AB and F2 = A CD
Combinational Logic 159
Implicant
An implicant is a simplified expression and can be obtained after combining the adjacent minterms
of the set of minterms. There are two types implicants, namely, Prime implicants and Essential prime
implicants. Prime implicant is an implicant when it is not a subset of another implicant of the function.
A Prime implicants is called as essential prime implicants if it includes a cell, which is not incorporated
in any other prime implicant.
The logical function is
––– –– – – – – – – –
F(ABCD) = AB C D + AB C D + AB CD + AB CD + A BC D + A BCD + ABCD + ABCD and the K-map
for this function is shown in Fig. 4.67. The logical expression of the said function is F (A, B, C, D) = F1
– –
+ F2 + F3 + F4 , where F1 = AB , F2 = A BD, F3 = BCD and F4 = AC. Here F1, F2, F3, and F4 are the prime
implicants of the function F(ABCD). In this example, prime implicant F3 is not essential.
Step 1
i. Represent each minterms of the Standard SOP form of logic function by a binary code and its
decimal equivalent.
ii. Form the groups containing the number of 1s in the binary code. Each group should have specified
group number known as index number. In group-0 of minterms, number of 1’s is zero; in group
1 minterms have a single 1; in group-2, minterms have two 1’s; in group-3, minterms have three
1s; and in group-4, minterms have four 1s. Arrange all the minterms according to groups with
ascending order of decimal number. For example, Table 4.26 shows the minterms with number
of 1’s in binary code, group and variables.
Step 2
–
iii. Apply the theorem, A + A = 1 in two minterms from adjacent groups. Here, two minterms are
combined together if their binary representations differ by just a single bit. The combined term
consists of the original binary representation, with the difference bit replaced by (–). Table 4.27
shows the combination of two minterms. The check mark (÷) is placed just after the each minterm,
which has been combined with at least one term as depicted in Table 4.26.
Step 3
iv. Four minterms of adjacent groups are combined if possibilities exist. In this case, dashes (–) ex-
ist in same position of two groups and only one position will be different. Table 4.28 shows the
combination of four minterms.
v. Combine eight minterms of adjacent groups if possibilities exist. For this case, position of two
dashes (–) will be same and only one position will be different.
Step 4
vi. Construct the table of prime implicants in which each column has a decimal number at the top
in ascending order which corresponds to the minterms in the standard SOP form and each row
represents the prime implicant.
vii. Use a trick mark (÷) under each decimal number, which means the particular minterm is contained
in the prime implicants represented by the row.
viii. Find out all the columns, which contain a single trick mark (÷) and give a star mark (*) at the left
of the rows. The star marked rows are called essential prime implicants.
ix. Derive the minimal SOP logic function incorporating all essential prime implicants.
x. Find out all prime implicants, which covers the maximum number of minterms and also include
the prime implicants in the minimal SOP logic function.
Example 4.22 Simplify the Boolean function F = Sm (0, 1, 2, 7, 8, 9, 10, 11, 14, 15)
using Quine McClusky method.
Combinational Logic 161
� Solution
Step-1
The highest minterm is 15; therefore the function is a four variables function. Initially, the table is created
representing all minterms, group and variables of the function. All the minterms are arranged ascending
order considering numbers of 1’s in binary representation of minterms as shown in Table 4.26.
Table 4.26
Step-2
The combinations of two minterms are shown in Table 4.27. The minterms, which are combined with other
minterms, are tick (÷) marked in the Table 4.26. After the combinations of two minterms, the results consist
of the original binary representation with different bit placed by ‘–’ as depicted in Table 4.27.
Step-3
Table 4.28 shows the possible combinations of four minterms. In four minterms, combination, two different
combinations of two minterms are combined. Give the tick marked in Table 4.27 for two combinational
minterms that are covered in combinations of four minterms. Some terms of Table 4.27 are not tick marked
and these non-tick marked terms are known as prime implicants.
Step-4
The table of prime implicants is constructed for finding out the essential implicants. Table 4.29 shows the
table of prime implicants.
To select the essential prime implicants, Table 4.29 is scanned all minterms in column wise. All the minterms,
which have only one tick mark, contribute one essential prime implicants. In this table minterms 2, and 7
are essential prime implicants and put star (*) on these prime implicants. Then prime implicants are to be
selected for the remaining minterms. The procedure is that select prime minterms, which cover maximum
number of unaccounted minterms. There are three prime implicants which take care of these minterms are
(0, 1, 8, 9); (8, 9, 10, 11) and (10, 11, 14, 15). Again put star marks at the proper places. The essential prime
implicants are selected the star marked terms from Table. Hence the minimal form of the logic function is
–– – – –
F = B C + AB + AC + BCD + B CD
Combinational Logic 163
Step-5
The result can be verified by the help of Karnaugh map, Fig. 4.68. The simplified expression is F = F1 + F2 +
–– – – – –– – – –
F3 + F4 + F5 = B C + AB + AC + BCD + B CD, where F1 = B C, F2 = AB , F3 = AC, F4 = BCD and F5 = B CD.
Example 4.23 Simplify the function F = S(0, 1, 2, 3, 5, 9, 11) +d (4, 7, 15) using Quine Mclusky
method and verify the result by Karnaugh map.
� Solution
It is clear from the logic function that the highest minterm is 15. So, the function is a four variable function.
This logic function has three don’t care entries. To derive the logic expression the procedure is same, but the
last step is different one. In the last step the essential prime implicants are selected for compulsory terms.
Step-1
Initially, the table is created representing all minterms and variables of the function. All the minterms are arranged
increasing order considering numbers of 1’s in binary representation of minterms as given in Table 4.30.
Table 4.30
No. of 1’s Group Minterms Variables
A B C D
0 0 0 ÷ 0 0 0 0
1 I 1 ÷ 0 0 0 1
2 ÷ 0 0 1 0
4 ÷ 0 1 0 0
2 II 3 ÷ 0 0 1 1
5 ÷ 0 1 0 1
9 ÷ 1 0 0 1
3 III 7 ÷ 0 1 1 1
11 ÷ 1 0 1 1
4 IV 15 ÷ 1 1 1 1
164 Digital Electronics: Principles and Applications
Step-2
Table 4.31 shows the all-possible two minterms combinations. The result of combinations of two minterms
consists of the original binary representation with different bit placed by ‘–’ as depicted in the same table.
The minterms, which are combined with other minterms, are tick marked in the Table 4.30.
Step-3
Table 4.32 gives possible combinations of four minterms. There is no possibility of combinations of eight
minterms.
Step-4
Table 4.33 is constructed to find out the essential implicants.
Combinational Logic 165
Prime Minterms
Implicants 0 1 2 3 5 9 11
0,1, 2,3* ÷ ÷ ÷ ÷
0,1,4,5* ÷ ÷ ÷
0,1,5,7 ÷ ÷ ÷
1,3,9,11* ÷ ÷ ÷ ÷
3,7,11,15 ÷ ÷
9,11 ÷ ÷
11,15 ÷
The procedure of selection prime minterms is to cover maximum number of minterms. There are three prime
implicants (1, 3, 9, 11); (0, 1, 2, 3) and (0, 1, 4, 5) which cover all compulsory minterms (0, 1, 2, 3, 5, 9, 11).
Then put star marks at the proper places of the three prime implicants. Hence the minimal form of the logic
function is
–– – ––
F = AB + BD + A C
Step - 5
The result can be verified by the help of Karnaugh map, Fig. 4.69. The simplified expression is F = F1 + F2
–– – –– –– – ––
+ F3 = A B + B D + A C , where F1 = A B , F2 = B D and = F3 = A C .
Example 4.24 Simplify the function F = S(1, 2, 3, 6, 7, 8, 10, 11, 12, 14, 17, 18, 20, 21, 22, 24, 28,
29, 31) using Quine Mclusky method
� Solution
In the logic function, the highest minterm is 31. Therefore, the logic function is a five variables function. To
derive the logic expression, the procedure is same as given below:
Step-1
Initially, the table is created representing all minterms and variables of the function. All the minterms are
arranged increasing order considering numbers of 1’s in binary representation of minterms as illustrated in
Table 4.34.
Table 4.34
Step-2
Table 4.35 shows the combinations of two minterms. The minterms, which are combined with other minterms,
are tick marked in the Table 4.34.
Combinational Logic 167
Step-3
All possible combinations of four minterms are shown in Table 4.36. There is no possibility of an eight-cell
combination.
Step-4
To choose the essential implicant Table 4.37 is constructed
168 Digital Electronics: Principles and Applications
2,6,10,14* ÷ ÷ ÷
÷
8,10,12,14 ÷ ÷ ÷ ÷
20,21,28,29* ÷ ÷ ÷ ÷
8,12,24,28* ÷ ÷ ÷ ÷
2,6,18,22* ÷ ÷ ÷ ÷
1,17* ÷ ÷
10,11* ÷ ÷
29,31* ÷ ÷
In this table, minterms 1, 11, 17, and 31 are essential prime implicants and put star (*) on these prime
implicants. Then prime implicants are also be selected for the remaining minterms. The procedure is that
select prime minterms, which cover maximum number of unaccounted minterms. There are five prime
implicants which take care of these minterms are (2, 3, 6, 7), (2, 6, 18, 22), (2, 6, 10, 14), (8, 12, 24, 28) and
(20, 21, 28, 29). Then put star marks at the proper places. The essential prime implicants are selected from
the star marked terms of the Table 4.37. Hence, the minimal form of the logic function is
––– – – –– – – – – – ––
F = B C DE + A BC D + ABCE + A B D + B DE + A DE + ACD + BD E
SUMMARY
In this chapter, the basic combinational logic function and its element are discussed. The circuit development of
combinational logic function is explained. The logic circuit can be designed by the Canonical sum of product (SOP)
and Canonical product of sum (POS) methods. The Canonical sum of products (SOP) represent in AND – OR circuit
but Canonical product of sums (POS) can be represented in OR – AND circuit. The sum of product and product of
sum expressions of any truth table have been explained. These SOP and POS expressions can be simplified by using
Boolean algebra as designer select the simplest circuit for low cost and high reliability. To design a most simplified
logic circuit using Boolean algebra is a tedious work. The Karnaugh method is substitute of logic simplification by
converting a truth table into a Karnaugh map. The greatest simplified Boolean expression of a truth table is possible
in this case. Sum of product form and product of sum expressions of a truth able using Karnaugh map are possible.
Three, four, five and six variables Karnaugh maps are illustrated in this chapter. It is very inconvenient to use Karnaugh
map to simplify logic function if number of variables are more than six. Then Quine-McCluskey method used for
large number of variables and this method has been explained with examples. The simultaneous functions are also
incorporated in this chapter.
3. In addition to minimising logic expressions, a Karnaugh map can also be used for
(a) Static hazard detection (c) Synchronous circuit design
(b) Sequential logic circuit design (d) None of these
4. A four variables Karnaugh map contains
(a) 4 cells (b) 8 cells (c) 16 cells (d) 32 cells
5. A five variable Karnaugh map contains
(a) 4 cells (b) 8 cells (c) 16 cells (d) 32 cells
6. Quine McCluskey method uses
(a) Tabular Method (b) Karnaugh map (c) Boolean Algebra (d) None of these
7. AND –OR realisation is equivalent to
(a) SOP (b) POS (c) K-map (d) None of these
8. OR - AND realisation is equivalent to
(a) SOP (b) POS (c) K-map (d) None of these
9. What is the simplified Boolean expression for K-map (Fig.4.70) in SOP?
Fig. 4.70
–
(a) AB (b) BC (c) A C (d) None of these
10. What is the simplified Boolean expression for K-map (Fig.4.70) in POS?
– –
(a) B + C (b) A + C (c) C(A + B) (d) None of these
11. The minimisation of logic expression is done due to
(a) Reduce space (c) Reduce number of gates
(b) Reduce cost (d) All of these
– –– –
12. The simplified form of logic expression AB + A B + A B + AB is
(a) 1 (b) A (c) AB (d) None of these
– – – –
13. The simplified form of logic expression A BC + ABC + A BC + ABC is
(a) B (b) A + BC (c) C (d) None of these
REVIEW QUESTIONS
4.1. Define SOP and POS. What is the difference between SOP and POS?
4.2. Write the standard SOP form for the following logic functions given below:
–– – ––– –– – –
a) AB + BC b) C D + A B c) A B C + ABCD + BC d) A B D + A D + B D
4.3. Write the standard POS form for the following logic functions given below:
– – – –
a) (A + B) (B + C) (c) (A + B + C) (B + C + D) (B + C )
– – – – – – – – – –
b) (A + B+ C) (A + B + D) (B + C) d) (A + C + D) (B + C + D) (A + C )
170 Digital Electronics: Principles and Applications
4.4 Determine Boolean function of the truth table 4.38 in terms of minterms and draw logic diagram
using NAND gate.
Table 4.38
Inputs Output
A B C D O
0 0 0 0 1
0 0 0 1 1
0 0 1 0 1
0 0 1 1 1
0 1 0 0 0
0 1 0 1 0
0 1 1 0 0
0 1 1 1 0
1 0 0 0 0
1 0 0 1 0
1 0 1 0 0
1 0 1 1 0
1 1 0 0 0
1 1 0 1 0
1 1 1 0 0
1 1 1 1 1
4.5. Determine Boolean function of Table 4.39 in terms of maxterms and draw logic diagram using
NOR gate.
Table 4.39
Inputs Output
A B C O
0 0 0 1
0 0 1 1
0 1 0 0
0 1 1 0
1 0 0 1
1 0 1 1
1 1 0 0
1 1 1 0
5
COMBINATIONAL
LOGIC DESIGN
5.1 INTRODUCTION
The general logic gates AND, OR, NAND, NOR and NOT are commonly used in combinational logic
circuit design using Karnaugh map and Quine-Mc Cluskey minimisation method. But practically, NOR
and NAND universal gates are used to implement combinational logic circuits. Small-Scale Integration
(SSI) circuits are available to implement logic circuits. As medium and large-scale integrated circuits
are introduced, the conventional logic circuits designs have been changed. Traditionally, the design
engineer has developed a Boolean equation to solve a particular problem. Then this function has been
minimised and implemented using SSI ICs. If combinational logic circuits may have a large number of
inputs and outputs, the use of truth tables in the design of such circuits is impractical. Furthermore, it is
not economical to provide sufficient pins on an IC package to allow access to each of the gates. Many
functions, such as counting, addition, parity checking are common in a large number of designs and a
useful library of digital circuits for implementing these functions has been developed. As a fabrication
techniques improved day-by-day, it became possible to implement these functions on a single chip. There
is an array of devices, such as multiplexers, demultiplexers, adders, parity generators and checkers,
decoders, and comparators. These devices significantly reduce the number of ICs and the system cost.
Therefore, the system design becomes simplified. This improves the reliability of the system by reducing
of external wired connections.
The development of MSI circuits has led to the technique of splitting complex design into a number
of sub-systems. The designer has the task of interconnecting available MSI circuits in such a way that
satisfies the design specification.
5.2 COMBINATIONAL LOGIC DESIGN
In the combinational logic circuit design process, the logic designer
initially defines the input variables for representing all conditions.
The system may be single output or multi-outputs. Consequently, the
designer must assign the output variables. After assigning the input
variables and output variables, the designer writes the truth table to
represent all combinations of input and output variables. The designer
builds up the Boolean expressions in canonical sum of product (SOP) or
Fig. 5.1 Block diagram of a canonical product of sum (POS) form. The written Boolean expression
combinational logic circuit may be or may not be minimised form. Therefore, the equations should
Combinational Logic Design 173
be expressed in the minimum SOP and POS form. Finally, the designer implement the logic expressions
by electronics circuits, namely AND, NAND, OR, NOR and NOT gates; MSI chips explicitly decoders,
encoders, multiplexers and demultiplexers. Figure 5.1 shows the block diagram of a typical combinational
logic circuit with three inputs A0 , A1 , A2 and one output O.
� Solution
Step - 1: The block diagram of full-adder is shown in Fig. 5.2.
The two inputs A and B will be added with the carry from
previous stage CIN. Therefore, three input variables A, B and CIN
are considered for combinational logic circuit. There are two
outputs sum(S) and carry output (COUT).
Step - 2: The truth table of full adder is shown in Table 5.1 Fig. 5.2 Block diagram of full
adder circuit design
Table 5.1 Truth table of full adder
Inputs Outputs
CIN B A S COUT
0 0 0 0 0
0 0 1 1 0
0 1 0 1 0
0 1 1 0 1
1 0 0 1 0
1 0 1 0 1
1 1 0 0 1
1 1 1 1 1
Step - 3: The outputs S and COUT can be expressed in SOP and POS form respectively as given below:
S = F(A, B, CIN) = S(1, 2, 4, 7) = ’(0, 3, 5, 6)
COUT = F(A, B, CIN)=Σ(3, 5, 6, 7) = ’(0, 1, 2, 4)
The above Boolean expressions can be minimised by using K-map. Figure 5.3 shows the K-map for sum(S)
COUT).
Fig. 5.3 K-map for sum (S) Fig. 5.4 K-map for carry output (COUT)
– – —— – –
S = F(A, B, CIN) = CIN A B + CIN AB + CIN AB + CIN AB
–– – – –
= CIN (AB + A B ) + CIN (A B + AB )
——— –
= CIN (A ≈ B ) + CIN (A ≈ B) = C ≈ B ≈ A
COUT = F(A, B, CIN) = AB + CINB + CINA
Step - 4 : Implementation of the circuit using logic gates. Figure 5.5 shows the implementation of full adder
using EX-OR, AND and OR gates.
174 Digital Electronics: Principles and Applications
Fig. 5.8 3 line to 8 line decoder Fig. 5.9 3 line to 8 line decod-
using NAND gates er using AND gates
Fig. 5.13 3 line to 8 line decoder using two Fig. 5.14 4 line to 16 line decoder using
2 line to 4 line decoders. five 2 line to 4 line decoders
178 Digital Electronics: Principles and Applications
Example 5.2 Design a 4 line to 16 line decoder using 3 line to 8 line decoder.
� Solution
Figure 5.15 shows the implementation of a 4 line to
16 line decoder using 3 line to 8 line decoder where
four inputs are A,B, C and Enable(E) and 16 outputs
D0 to D15.
The IC74154 can be used to implement the above logic using a NAND gate as shown in Fig. 5.16.
Example 5.3 Design combinational logic circuits for the logic functions F1, F2 and F3 as given
below using 4:16 decoder IC 74514.
F1=Sm(1,2,3,4,5,7); F2=Sm(2,4,7,9,11); F3=Sm(10,12,14,15)
� Solution
The IC 74514 has an enable terminal, E. When E is
low logic level, the IC is active and A, B, C and D
input variables are used for addressing the output
terminal. The logic function F1=Sm(1,2,3,4,5,7)
can be written in minterm representation as
F1= m1 + m2 + m3 + m4 + m5 + m7 and its complement
F1¢= m– m– m– m– m – m–.
1 2 3 4 5 7
This logic function can be implemented using
an IC74154 and a six inputs NAND gate as
depicted in Fig. 5.17. Similarly, F2 and F3 are
also represented by minterm equations and
implementation circuits are also illustrated in Fig. 5.17 Implementation of combinational
Fig. 5.17. logic circuits of F1=Σm(1,2,3,4,5,7),
F2=Σm(2,4,7,9,11) and F3=Σm(10,12,14,15)
CIN A B COUT S
0 0 0 0 0
0 0 1 0 1
0 1 0 0 1
0 1 1 1 0
1 0 0 0 1
1 0 1 1 0
1 1 0 1 0
1 1 1 1 1 Fig. 5.19 Binary adder using decoder
180 Digital Electronics: Principles and Applications
a=F1(A,B,C.D)=Sm(0,2,3,5,7,8,9)
b=F2(A,B,C.D)=Sm(0,1,2,3,4,7,8,9)
c=F3(A,B,C.D)=Sm(0,1,3,4,5,6,7,8,9)
d=F4(A,B,C.D)=Sm(0,2,3,5,6,8)
e=F5(A,B,C.D)=Sm(0,2,6,8)
f=F6(A,B,C.D)=Sm(0,4,5,6,8,9)
g=F7(A,B,C.D)=Sm(2,3,4,5,6,8,9)
Figure 5.22 shows the pin configuration of IC 7447 and logic
diagram of IC 7447 is depicted in Fig. 5.23. The pin description of IC Fig. 5.22 Pin configuration of
7447 is given below: IC 7447
A0 – A3 BCD inputs
—
RB 1 Ripple blanking
—
LT Lamp test input
— ——
BI /RBO Blanking input/Ripple
blanking output
a– – – Segment outputs
The IC 7447 decodes the input data
given in the truth Table 5.9. IC 7447 is
BCD to 7-Segment Decoder with open-
collector outputs. The 74LS47 has four
input lines of BCD(8421) data, and it
generates their complements internally.
Then decoder decodes the data with seven
AND/OR gates having open-collector
outputs to drive indicator segments di-
rectly. Each segment output sinks about
24 mA in the ON/LOW state and can
withstand up to 15V in the OFF/HIGH
state. Some auxiliary inputs namely ripple
blanking, lamp test and cascadable zero- Fig. 5.23 Logic diagram of IC 7447
suppression functions are also provided in
IC 7447. Zero suppression logic is very
useful in multi seven segment decoders.
Zero suppression is possible in different
ways, namely leading zero suppression
and trailing zero suppression. Leading
zero suppression is blanking of zeros on
the front of the number and trailing zero
suppression is blanking of the zeros after
the number.
Figure 5.24 shows the block diagram Fig. 5.24 Block diagram of 4-digit display of
of four-digit display. The most significant leading zero suppression
182 Digital Electronics: Principles and Applications
digit (MSD) is always blank if BCD inputs are zero and the blanking input is HIGH. The next higher order digit
is also blank as blanking output is HIGH.
The ripple blanking output indicates that it
has BCD inputs 0 and higher order digits
are 0. The blanking output is connected
to the blanking input of the next decoder.
Then other two digits are displayed.
To display the digits of the right
side of decimal point, trailing zero
suppression is used. The lowest order
digit will be blank when BCD input 0.
Figure 5.25 shows the block diagram
Fig. 5.25 Block diagram of 4-digit display of trailing
zero suppression of 4 digit display for trailing zero
suppression. The blanking output of one
decoder is connected to the blanking input of the next decoder. Here, the lowest order digit is blanked,
as its BCD input is 0. The next digit is also blanked, as blanking input is HIGH and BCD input is 0.
Subsequently remaining two bits are displayed.
Fig. 5.26 (a) Pin configuration of IC 7442, and Fig. 5.27 Logic diagram of BCD to
(b) logic symbol of IC 7442 decimal converter
5.4 ENCODERS
The operation of encoders is the opposite of decoders. Encoders have 2n inputs and encode them into
‘n’ outputs. When ‘n’ is equal to two, there are four input lines and two output lines. The operation of
4:2, 8:3 and 16:4 encoders are explained in article 5.4.1, 5.4.2 and
5.4.3 respectively.
5.4.1 4:2 Encoder
The block diagram of a four inputs encoder is depicted in Fig.
5.28. Table 5.11 shows the truth table of 4 line to 2-line decoder. If
the line 0 is selected, output will be 00; if line 2 is selected, output Fig. 5.28 Block diagram of 4
will be 10 and so on. The encoder truth table allocates one of the line to 2 line encoder
184 Digital Electronics: Principles and Applications
four combinations of the address variables A and B to each of the inputs. The outputs of encoder can be
expressed by Boolean expression as given below:
A=F2 +F3
B=F1 + F3
Implementation of 4 line to 2 line encoder is shown in Fig. 5.29.
5.4.2 8:3 Encoder
The block diagram of a eight inputs and three
outputs encoder is depicted in Fig. 5.30. Table
5.12 shows the truth table of 8 lines to 3-line
decoder. The outputs of encoder can be expressed
by Boolean expression as given below:
A=D4+D5+ D 6+ D 7; B= D 2+ D 3+ D 6+ D 7
C= D 1+ D 3+ D 5+ D 7
Fig. 5.30 Block diagram of 8 line to 3 line encoder
The limitation of above decoder is that if all inputs D 0 to D 7 are 0, all outputs will be equal to 0.
Therefore, one additional output is sometimes incorporated to point out this state. Another limitation is
that only one of the encoder’s inputs must be asserted at a time; otherwise the output will be illogical.
Inputs Outputs
D15 D14 D13 D12 D11 D10 D9 D8 D7 D6 D5 D4 D3 D2 D1 D0 A B C D
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1
0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0
0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 1
0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0
0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 1
0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 1 0
0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 1 1
0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0
0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 1
0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 1 0
0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1
0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0
0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1
0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1
186 Digital Electronics: Principles and Applications
Example 5.4 Design an encoder for the truth table 5.14 given below:
� Solution
The outputs of encoder can be expressed by Boolean expressions as given below:
B0= I1+I3+I5+I7
–
A = F3 + F 3F2 = F3 + F2
– – –
B = F3 + F 3F 2F1 = F3 + F 2F1
The implementation of above equations is shown in Fig. 5.33
To create a priority encoder it is first useful to create functions that are true only if their corresponding
input lines are true. For a 8 to 3 encoder these functions will be:
H7=I7
–
H6 = I6 I 7
– –
H5= I5 I 6 I 7
– – –
H4= I4 I 5 I 6 I 7
– – – –
H3= I3 I 4 I 5 I 6 I 7
– – – – –
H2= I2 I 3 I 4 I 5 I 6 I 7
– – – – – –
H1= I1 I 2 I 3 I 4 I 5 I 6 I 7
– – – – – – –
H0= I0 I 1 I 2 I 3 I 4 I 5 I 6 I 7
where, H stands for highest priority, and I stands for inputs.
Then H0, H1 …… H7 functions are used to create the outputs A0 to A2 as follows
188 Digital Electronics: Principles and Applications
A0= H1 + H3 + H5 + H7
A1= H2+ H3+ H6+ H7
A2= H4+ H5+ H6+ H7
IC74148 is an MSI encoding circuit for the 8 to 3 line priority encoder.
The features of IC 74148 are code conversions, decimal-to-BCD converter,
cascading for priority encoding of ‘n’ bits, input enable capability, priority
encoding of highest priority input line, output enable-active Low when all
inputs are high, group signal output-active when any input is Low.
The 8-input priority encoder IC 74148 acknowledges data from eight
active-low inputs and provides a binary representation on the three active
Fig. 5.34 Pin diagram low outputs. A priority is assigned to each input so that when two or more
of IC 74148 inputs are simultaneously active. The input with the highest priority is
represented on the output, with input line I7 having the highest priority.
The pin diagram of IC74148 is given in Fig. 5.34 and the pin description as follows:
I 1 – I7 Priority inputs (active Low)
I0 Priority input (active Low)
EI Enable input (active Low)
EO Enable output (active Low)
GS Group select output (active Low)
A0 – A2 Address outputs (active Low)
The logic circuit diagram of IC74148 is shown in Fig. 5.35. When enable input signal EI is active
low, the IC will be enable. The high EI signal will force all outputs to the inactive or high state and
allow new data to settle without producing erroneous
information at the outputs. When the numbers of
input signals to be encoded are more than eight,
two or more encoders are connected in cascade.
To operate in combination with other encoders, the
group select signal (GS) and enable output signal
(EO) are provided in encoder. The GS is active-low
when any input is low. The EO is active-low when all
inputs are high. If EO and GS are active-high, when
the enable input is high. The enable output and group
select signals can be expressed as
—
EO = EI I0I1I2I3I4I5I6I7
—
GS = EI + I0I1I2I3I4I5I6I7EI
Priority encoders are commonly used in micro-
processor, micro-controller and computer to handle
interrupt signals and the processor should response
Fig. 5.35 Logic diagram of IC 74148 to the highest priority pending interrupt request.
Combinational Logic Design 189
5.6 MULTIPLEXERS
The multiplexer is a combinational logic circuit, which operates as controlled switch with ‘n’ inputs
and one single data output. It selects one of the inputs according to
binary signals applied on select pins of combinational circuit and Table 5.18 Multiplexer ICs
passes the information of the selected line to the common output. IC NO. Description
Therefore multiplexer is also called as data selector. Generally 74157 Quad 2:1 Multiplexer
the number of data inputs is a power of two (2, 4, 8, 16 etc). The 74158 Quad 2:1 Multiplexer
operation of 2:1, 4:1, 8:1 and 16:1 multiplexers are explained in 74153 Dual 4:1 Multiplexer
74352 Dual 4:1 Multiplexer
article 5.6.1, 5.6.2, 5.6.3 and 5.6.4 respectively. Table 5.18 shows the
74152 8:1 Multiplexer
available multiplexer ICs. 74150 16:1 Multiplexer
Combinational Logic Design 191
Fig. 5.42 (a) Connection diagram of IC 74157 and (b) Logic diagram of quad
2 line to 1 line multiplexers IC 74157
Fig. 5.43 (a) Connection diagram of IC 74158 and (b) Logic diagram of
quad 2 line to 1 line multiplexer IC 74158
– — – –
Y = DO S 1 S 0 + D1S 1S0 + D2S1S 0 + D3S1S0
Figure 5.45 shows the implementation of 4 line to single line multiplexer using gates. The inputs of
the multiplexer are D0, D1, D2 and D3 and two select lines S0 and S1. Four 3 inputs AND gates and one
four inputs OR gate are used for implementation of a 4:1 multiplexer.
Table 5.20 Truth table for 4:1 Muxtiplexer
Selects Data Inputs Output
S1 S0 Y
0 0 D0
0 1 D1
1 0 D2
1 1 D3
Generally, dual 4 line to 1 line multiplexers ICs are available. IC74153 is a dual 4 line to 1 line
multiplexer and its logic symbol and circuit diagram are shown in Fig. 5.46 (a) and (b) respectively. This
multiplexer has two select input lines (A and B). When AB = 00, the D0 input line is selected. If AB =
11 the D3 input line is selected. Like quad 2 line to 1 line multiplexer, dual 4 line to 1 line multiplexers
have two strobe which are used to switch on and off the multiplexers. The functional table of IC74153
is given in Table 5.21.
Fig. 5.46 (a) Logic symbol of dual 4:1 multiplexers and (b) Logic diagram
of dual 4 line to 1 line multiplexer IC 74153
194 Digital Electronics: Principles and Applications
lines and send the data of the selected line to output line.
In this multiplexer, strobe signal is used as a switch to
turn on and off the multiplexer. Table 5.23 shows the
functional table of 8 lines to 1 line multiplexer.
Table 5.23 Functional table of 8 lines to
1 line multiplexer
Inputs Outputs
Select inputs Store
– Y W
C B A G
X X X 1 0 1
–
0 0 0 0 D0 D0
–
0 0 1 0 D1 D1
–
0 1 0 0 D2 D2
–
0 1 1 0 D3 D3
–
1 0 0 0 D4 D4
–
1 0 1 0 D5 D5
–
1 1 0 0 D6 D6 Fig. 5.49 Logic diagram for
– multiplexer 1C 74151
1 1 1 0 D7 D7
Fig. 5.51 (a) Pin diagram of 74150 and (b) Logic symbol of 74150
Combinational Logic Design 197
� Solution
The 16:1 multiplexers are the largest available ICs. Therefore, 32:1 multiplexer can be designed by using two
16:1 multiplexers with the help of enable/strobe inputs. Figure 5.54 shows the 32 line to 1 line multiplexer
using two 16:1 multiplexers and an OR gate.
� Solution
As there are four variables, a four select lines multiplexer is required to implement the Boolean function
F(A,B,C,D)=Sm(1,2,4,5,7,9,11,12) . So, 16:1 multiplexer IC74150 will be selected. The circuit diagram for
implementation of above Boolean function is shown in Fig. 5.55.
Fig. 5.55
Example 5.7 Implement the Boolean function F(X,Y,Z)=Σm(1,2,6,7) using 4:1 multiplexer.
� Solution
As 4:1 multiplexer is used to implement the Boolean function F(X,Y,Z)=Σm(1,2,6,7) , two select inputs can
be used for selecting the 4 input address lines. Since the output is depends on the value Z, the output F will
Table 5.25 Truth table of 4: 1 multiplexer
Inputs Output
X Y Z F
0 0 0 0 F=Z
0 0 1 1 F=Z
–
0 1 0 1 F=Z
–
0 1 1 0 F=
1 0 0 0 F=0
1 0 1 0 F=0
1 1 0 1 F=1 Fig. 5.56
1 1 1 1 F=1
200 Digital Electronics: Principles and Applications
–
be derived from Z, Z , 1, and 0. The relation between Z and F is depicted in Table 5.25. Figure 5.56 shows the
implementation of Boolean function F(X,Y,Z)=Σm(1,2,6,7) using 4:1 multiplexer.
Example 5.8 Implement the Boolean function F(A,B,C,D) =Σm(1,3,4,11,12,13,14,15) using 8:1
multiplexer.
� Solution
Create truth table for F as shown in Table 5.26. A, B, and C are used as variables to the selection inputs. The
last input variable D can be considered as input data and the values of F to select the inputs for each of the
–
multiplexer’s data input lines are D, D , 0 or 1. Figure 5.57 shows the implementation of Table 5.26, which
represents the Boolean function F(A,B,C,D) = Sm(1,3,4,11,12,13,14,15).
1 1 1 0 1 F=1
1 1 1 1 1 F=1
Example 5.9 Design a circuit for a pulse train 10101011 using a multiplexer.
� Solution
As the length of the pulse train is 8 bits, 8:1 multiplexer and MOD 8 counter will be used to generate the
pulse 10101011. Figure. 5.58 shows the implementation of pulse train.
Combinational Logic Design 201
Fig. 5.58
Inputs Output
E S1 S0 D0 D1 D2 D3
0 0 0 0 1 1 1
0 0 1 1 0 1 1
0 1 0 1 1 0 1
0 1 1 1 1 1 0
1 x x 1 1 1 1
The IC74139 is a dual 1-of-4 demultiplexer. The pin configuration of 1:4 demultiplexer is shown in
Fig. 5.62 and pins description of IC 74139 is given below:
A0n, A1n Address inputs
Ea, Eb Enable inputs (active-Low)
Q0n, Q3n Data outputs
This IC has two independent demultiplexers. Each demultiplexer can accept two binary weighted
inputs (A0n, A1n) and provides four mutually exclusive active-low outputs (Q0n – Q3n). Each demultiplexer
has an active-low enable (E). When E is high, all outputs are high. The enable can be used as the data
input for a 1-of-4 demultiplexer application. The functional table for one of demultiplexer is given in
Table 5.30. Logic diagram of dual 1 line to 4 line demultiplexer is depicted in Fig. 5.63.
Combinational Logic Design 203
Fig. 5.62 (a) Pin configuration of 1:4 demultiplexer, (b)Logic symbol of dual 1:4 line demultiplexer
Inputs Output
Enable Select – – – –
Q0 Q1 Q2 Q3
E A0 A1
1 x x 1 1 1 1
0 0 0 0 1 1 1
0 1 0 1 0 1 1
0 0 1 1 1 0
0 1 1 1 1 1 0
204 Digital Electronics: Principles and Applications
Inputs Output
Enable Select Y0 Y1 Y2 Y3 Y4 Y5 Y6 Y7
–— – –
LE E1 E2 A0 A1 A2
x 1 x x x x 0 0 0 0 0 0 0 0
x x 0 x x x 0 0 0 0 0 0 0 0
0 0 1 0 0 0 1 0 0 0 0 0 0 0
0 0 1 1 0 0 0 1 0 0 0 0 0 0
0 0 1 0 1 0 0 0 1 0 0 0 0 0
0 0 1 1 1 0 0 0 0 1 0 0 0 0
0 0 1 0 0 1 0 0 0 0 1 0 0 0 Fig. 5.65 Functional diagram of 1:8
demultiplexer
0 0 1 1 0 1 0 0 0 0 0 1 0 0
0 0 1 0 1 1 0 0 0 0 0 0 1 0
0 0 1 1 1 1 0 0 0 0 0 0 0 1
Combinational Logic Design 205
Inputs Outputs
–
E A0 A1 A2 A3 Q0 Q1 Q2 Q3 Q 4 Q5 Q6 Q7 Q8 Q9 Q10 Q11 Q12 Q13 Q14 Q15
1 x x x x 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0
0 1 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0
0 1 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0
0 0 1 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0
0 1 1 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0
0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0
0 1 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0
0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0
0 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0
0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0
0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0
0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0
0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
Combinational Logic Design 207
Example 5.10 Design a circuit using multiplexer for the following Boolean functions:
F1(A,B,C,D)=S (1,2,3,4,5,7)
F2(A,B,C,D)=S (2,4,7,9,11)
F3(A,B,C,D)=S (10,12,14,15)
� Solution
As there are four variables, 1: 16 demultiplexer can be used with four select lines. Figure 5.71 shows the
implementations of above Boolean functions using demultiplexer and OR gates.
Fig. 5.71
O0=Σm(0,2,4,6,8)
O1=Σm(0,3,4,7,8)
O2=Σm(1,2,3,4,9)
O3=Σm(5,6,7,8,9)
The implementation of O0, O1, O2 and O3 using 4 line to 16 line decoder IC is given in Fig. 5.74.
Combinational Logic Design 211
Fig. 5.72 (a) K-map for O3; (b) K-map for O2; (c) K-map for O1; (d) K-map for O0
Fig. 5.75 (a) K-map for A; (b) K-map for B; (c) K-map for C; (d) K-map for D
The minimal SOP functions for the outputs are given below.
A=G3
B=G3≈G2
C=G3≈G2≈G1
D=G3≈G2≈G1≈G0
214 Digital Electronics: Principles and Applications
The binary to Gray converter can also implemented by X-OR gates. It is depicted from the Table 5.35
that the most significant bits of binary and Gray codes are the same. Consequently, the most significant
bits does not require any conversion. Figure 5.77 shows the circuit of binary to Gray code conversion.
The Boolean expressions of binary to Gray code are given below:
Combinational Logic Design 215
G3=A
G2=A≈B
G1=A≈B≈C
G0=A≈B≈C≈D
Fig. 5.80 Logic symbol of BCD binary Fig. 5.81 Six bit BCD to binary
converter IC 74184 converter using IC 74184
Fig. 5.82 Eight bit BCD to to binary converter Fig. 5.83 BCD to to binary converter for three
for two decades using IC 74184 decades using IC 74184
5.9 HAZARDS
When the designer designs any combinational and sequential logic circuits, the designer should take
certain restrictions and precautions to ensure proper operation of the circuits and to get proper result.
Consequently, the designer should have a clear understanding of the mechanism, which produces any
malfunction in combinational and sequential circuits, called as hazards. When an input changes from ‘0’
to ‘1’ or ‘1’ to ‘0’, there is a momentary unexpected transient output change due to propagation delay
of logic gates. This momentary unexpected transient output change is known as output glitch. A hazard
always exists in a combinational circuit when it produces an output glitch while one or more inputs
change. There are two types of hazard which generally occur in digital systems:
∑ Static hazards
∑ Dynamic hazards
A Static hazard is a momentary change in output when an input signal undergoes a momentary transition,
but there will be no effect on steady state output. This type of hazard is present in combinational circuits
as well as gate-implemented asynchronous circuits. There are two types of static hazard namely static -0
hazard and static - 1 hazard. In static -0 hazard, the output should
be ‘0’ but goes momentary to ‘1’ as a result of an input change as
shown in Fig. 5.86(a). But in static - 1 hazard, the output should
be ‘1’ but goes momentary to ‘0’ as a result of an input change
as illustrated in Fig. 5.86(b). The Static -1 hazard present in 2-
level AND-OR circuits and the static -0 hazard present in 2-level Fig. 5.86 (a) Static 0-hazard and
OR-AND circuits. These hazards can be detected and eliminated (b) Static 1-hazard
Combinational Logic Design 221
for 2-level circuits using K-maps. Dynamic hazards occur when the
output changes several times before reaching its steady state value
as a result of a single change in input as depicted in Fig. 5.87.
Fig. 5.87 Dynamic hazards
5.9.1 Propagation Delay
When a two-inputs NAND gate or a NOT gate acts as an inverter, there will be a finite time delay
between an input change and the corresponding change of the output. This time delay is called as
propagation delay of gate, which is depicted in the timing diagram. In Fig. 5.88, the change in A from
–
‘0’ to ‘1’ is followed by a change in A from ‘1’ to ‘0’ with a propagation delay, Dt1 seconds. Similarly
–
while A changes from ‘1’ to ‘0’ followed by a change in A from ‘0’ to ‘1’ with a propagation delay, Dt2
seconds. So far the combinational circuit analyses have discussed in this chapter ignoring propagation
delays and consider only steady-state output. To study the hazard of any combinational and sequential
logic circuits, we should consider the propagation delays of all circuit gates.
Fig. 5.89 (a) Logic diagram of O = AC + BC and (b) Three variables K-map
product term is shown in Fig. 5.91(a). The comparison of the two K-map plots is that before the addition
of the consensus product, there are two l’s in adjacent cells not covered by the same prime implicant. On
covering these two adjacent l’s by the same prime implicant, as in Fig. 5.91(b), the hazard is removed
–
from the circuit. The hazard-free circuit for the Boolean function O =AC + BC + AB is shown in Fig.
5.91(b), and it will be observed that an additional AND gate has been introduced for generating the
required consensus product term AB.
–
Fig. 5.91 (a) Three variables K-map; (b) Implementation of hazard-free function O = AC + BC + AB
Fig. 5.92 (a) Three variables K-map and (b) Three variables K-map hazard free
– – –
Fig. 5.94 Logic diagram of O = (B + C)( A + C )(A + B ) hazard-free
– – – – –
When A = 0 B = 0, then the Boolean function O = (B + C)( A + C )(A + B) becomes O = C.C .0 = 0.
With the inclusion of the consensus term, the value of the function is always ‘0’ irrespective of whether
–
C and C are simultaneously equal to ‘1’.
–
The static-0 hazard can be eliminated by the inclusion of the consensus term (A + B). The consequential
hazard-free circuit is shown in Fig. 5.94. Elimination of the hazard requires the inclusion of an additional
gate which generates the required consensus term.
When we want to find a static-0 hazard, we use the K-map plot of the function which identifies those
combinations of the variables that cause the function value to be ‘0’. To obtain a plot of the 0-terms,
the inverse of the original function O must be plotted.Consider the equation of the original Boolean
function is:
– –
O = (B + C)( A + C )
– –
After inverting of O = (B + C)( A + C ), we find
– – –
O = BC + A C
Then inverse function is plotted as shown in Fig. 5.92(a). It is clear from this figure that the two 0’s in
the adjacent cells 010 and 011 are not covered by the same prime implicant. Subsequently the additional
–
prime implicant A B must be added with the original function, we get
– – – –
O = BC + A C + A B.
– – – –
Again inverting O = BC + A C + A B , we obtain the hazard-free function after incorporating the
consensus term to the function equation. Therefore the static -0 hazard-free function is
– – –
O = (B + C)( A + C )(A + B).
The algorithm for finding static 0-hazards are given below:
Step-1: Plot K-map of the inverse function as shown in Fig. 5.95 after 0s are replaced by 1s and 1s
are replaced by 0s in Fig. 5.92.
Step-2: Look for adjacent 1s not covered by the same prime implicant.
Step-3: Introduce additional prime implicants to cover all adjacent 1’s that are not covered by the
same prime implicant.
Step-4: Alter the inverse equation by incorporating the additional prime implicants.
Step-5: Invert the modified equation to get the hazard-free structure of the function.
Combinational Logic Design 225
In the above cases, there is a minimum of three changes which is appeared at the output as shown
in Fig. 5.87. The dynamic hazard occurs due to the factorisation of a Boolean function. If the function
has different fan-in, there will be different path lengths through a circuit to obtain a output for specified
inputs. On the other hand, the gates which are used in the circuit may have different time delays. Due
to different path lengths and different time delays, there is some possibility to exist a dynamic hazard in
the combinational logic circuit. Consider the typical Boolean function:
– –
O = (AC + BC )(A + C )
Figure 5.96 shows the implementa-
– –
tion of function O = (AC + BC )(A +
C) with AND and OR gates. There are
three different paths through this cir-
cuit for the variable C and consequent-
ly, there is a possibility that a dynamic
hazard exists in the circuit. The three
paths of the circuit are as follows:
1. Through gates G4, G7 and G8 Fig. 5.96 Logic circuit of dynamic hazard
2. Through gates G3, G5, G7 and G8,
and
3. Through gates G1, G6 and G8.
As there three variables A, B, and C, there are eight possible combinations of A, B, and C. Because
of multiple paths taken by the signal variable C in this circuit, the dynamic hazard is preset. Fig. 5.97
shows the timing diagram of the circuit when A=1, B=1, and C changes from 0 to 1. It is depicted in this
figure that the output of G3 gate has a time delay Dt1 and the output of G6 gate has a time delay Dt2 . The
output of G5 and G4 gates have a time delay Dt3 and Dt4 respectively. As ∆t4 > ∆t3 , a static 1 -hazard will
be present at the output of G7 gate. In case Dt4> Dt3> Dt2 there will be a dynamic hazard at the output of
G8 gate as shown in Fig. 5.97.
If the designer is designed the circuit either sum of products form (AND OR) or product of sum
form (OR AND), in such a way that there are no static hazards present in the circuit. When there will be
no static hazards, then the circuit will also be dynamic hazards free. To design a dynamic hazards free
circuit of four or more variable Boolean functions, the same procedure can also be followed.
226 Digital Electronics: Principles and Applications
Fig. 5.97 Timing diagram of dynamic hazard when A = 1 and B = 1 and C changes from 1 to 0
Table 5.40
Inputs
Response Response
without fault without fault
A B C F1 F2
0 0 0 1 0
0 0 1 0 0
0 1 0 1 1 ––
Fig. 5.98 Logic diagram of F = AB + A C
0 1 1 0 0
Generally, unskilled instructors and engineers always
1 0 0 0 0 faced problems with a combinational logic circuit which
1 0 1 0 0 contains a unknown fault. To find the fault, they often
1 1 0 1 1 resort to remove semiconductor components at random
and attempting to test them. Sometimes, they replace
1 1 1 1 1
the components with new components without testing
the old one. This is not a right method of fault detection
and location for the following reasons:
1. When a typical digital system has many components, any fault component will be chosen at
random for removal.
2. Due to remove components by inexperienced engineers and their replacement can damage abso-
lutely good components and the circuit board.
3. In digital systems, the most common faults are mechanical failure of switches and faults in sol-
dering connection such as open circuit resistors and open circuit capacitors. Sometimes ICs and
other devices are also unlikely malfunction.
In good practice that no component should be removed or replaced until it has been proven faulty. To
prove that a component in the combinational logic circuit is faulty, it requires that voltage and continuity
checks should be performed upon the circuit while it is powered and the component should be subjected
to typical signals. The output is examined for the correct output signals.
Suppose a typical system consists of ‘n’ components connected in sequence, we want to locate a
fault in the circuit. Then signal tracing will be employed in situations where the intermediate signals are
accessible at each point in the chain. Using this technique, the signals at the outputs of the components
are examined and compared with the expected response. When correct signals are observed at the input
to a certain component but not at its output, then it is clear that the fault must be associated closely with
the component. This does not mean that this particular component is faulty. It is also possible that the
power supply to this component may be failed.
Generally, there are two types of test which are carried out on any combinational logic circuits.
1. Fault detection test, that is used to detect if there any fault in the system.
2. Fault location test, which is used to locate and identify faults.
To locate the fault as well as faulty component, assume that the fault is equally likely to occur in
any of the ‘n’ links of the chain. The correct procedure is not to trace the signal in turn through each
component in the signal chain, for this method requires, on average n/2 tests before the faulty stage
228 Digital Electronics: Principles and Applications
is located. The more efficient method is binary division, where firstly the presence or absence of the
correct signal is established halfway through the chain of ‘n’ stages. Depending upon the result of the
single test, either the entire first half or the entire last half of the circuit can therefore be eliminated
from further attention and subsequent tests confined to the faulty half. The same principle can then be
applied to this half of the circuit and so on. By successive binary divisions, the fault can be isolated to
one single stage. With a large number of stages, this procedure requires only log2(n) tests to locate the
faulty stage. Therefore, significantly less than the average of n/2 tests are required for tracing the signal
in turn through each stage. For example, if n = 64 sequential signal tracing requires 32 tests on average,
where as binary division signal tracing require 8 tests.
All faults are either stuck-at 0 (s-a-0) or stuck-at-1 (s-a-1) in any combination logic circuit. Stuck-at-
0 means that the line is permanently at logic level ‘0’ and stuck-at-1 means that the line is permanently at
logic level ‘1’ irrespective of logic level that is actually supposed to be present on that line. This widely
used fault model does not cover all possible faults. For example, a short circuit of any line to ground
fault can be represented by a s-a-0 fault. While an open circuit on an input line to a TTL gate will cause
that input to float at a voltage corresponding to an unreliable and noise logic level ‘1’, causing an s-
a-1 fault. When any two paths of combinational logic circuit are inadvertently connected together, the
bridging or short circuit fault occurs. In this section, different faults of a 2-inputs AND gate and a typical
combinational logic circuit are discussed.
Table 5.41(a)
Table 5.41(b)
Table 5.41(c)
Table 5.41(d)
at output F. Therefore, the sensitisation of G1 and G2 gates are required. A sensitised path from A to F is
shown in Fig. 5.100. When B = 0 and C = 0, point D must be set at 0. The sensitivity of gate G2, point
E must be set at A and the normal output F = A. Consequently, there is no difference between normal
output and fault output at B = 0 and C = 0. Similarly, the fault can not be detected at B = 0 and C = 1.
When B = 1, C = 0 and A = 1, the normal output is 1, but the response of the circuit is 0 due to s-a-0
fault at m. In the same way, if B = 1, C = 1 and A = 1, the normal output is ‘1’, but the response of the
circuit is ‘0’. The results of combinational logic circuit are summarised in Table 5.42. Some times faults
are undetectable, when circuit malfunction s-a-0 and s-a-1 faults. During design of combinational logic
circuit, the design will develop the hazard free circuit to avoid undetectable fault.
Table 5.42
Table 5.43
Path m-p-o path n-q-o path
Input signals A = 0, B = 0, C = 0 A = 1, B = 1,C = 1
Normal path signals p = 0, q = 1, and o = 1 p = 1, q = 0 and o = 1
Fault m-n bridge fault m-n bridge fault
– –
Test signals (A , B) = (1,0), p = 0, q = 0 and o = 0 ( A , B ) = (0,1), p = 0, q = 0 and o = 0
Normal output 1 1
Faulty output 0 0
SUMMARY
Combinational logic circuits can be used to design any type of logic operations. Some of these logic operations are
multiplexing, demultiplexing, encoding, decoding and arithmetic operations of binary numbers. In this chapter, the
working principle of multiplexers, demultiplexers, decoders and encoders are explained and their applications are also
incorporated. Commonly used MSI ICs –7447 BCD to seven segment decoder, 7442 BCD to Decimal decoder, 74154,
74148, 74147, 74157, 74158, 74150, 74151A, 74237 are discussed. When MSI ICs are used to design combinational
logic circuits, digital system design will be simplified and efficient. In this chapter, hazards and fault detection of
combinational logic circuits are explained.
7. The output of a 2-inputs gate is ‘1’ and its inputs are unequal. This is a
(a) EX-OR gate (b) AND gate (c) NOR gate (d) AND-gate
8. The ————— gate is used as two bits comparator.
(a) AND ( b) OR (c) NAND (d) EX-OR
9. Multi channel signals can be transmitted through a single channel by using _________.
(a) Demultiplexers (b) Encoder (c) Decoder (d) Multiplexer
10. Minimisation of Boolean logical expressions helps to reduce
(a) Space (b) Number of gates
(c) Cost (d) Space, number of gates and cost
11. The number of 2-line-to-4-line decoders are used to design a 4-line to 16-line decoder is
(a) 2 (b) 4 (c) 5 (d) 6
12. In 7-segment display system, zero blanking is used to blank-out
(a) All the leading zeros ( b) All the trailing zero
(c) The zero in the MSB (location) (d) a and b
13. In 8:3 priority encoder, highest priority is given on
(a) 7 (b) 0 (c) 9 (d) F
14. In 16:4 priority encoder, lowest priority is given on
(a) 7 (b) 0 (c) 9 (d) F
15. In binary to Gray converter, _______ gate is used
(a) AND ( b) OR (c) NAND (d) EX-OR
REVIEW QUESTIONS
5.1. (a) Define decoder.
(b) Design a decoder circuit to convert binary numbers to decimal.
5.2. (a) Explain cascade decoder with example
(b) Design a 5-to-32 line decoder using 2-to-4 line decoder and 3-to-8 line decoder.
5.3. A combinational circuit is defined by the following equations
F1 = AB+ABC; F2 = A+B+C; F3 = AB
Design a circuit that can implement the above equations using a decoder and NAND gates.
5.4. A combinational circuit is defined by the following equations
– – –
F1=ABC+ABC ; F2=A+B+C+D; F3=A+B+CD+AD; F4=ACD+A CD+BCD+BCD
Design a circuit that can implement the above equations using a decoder with NAND gates.
5.5. Implement the following 4 variables functions using a decoder having active low outputs and NAND
gates.
F1=S (0,1,3,9,12,14); F2=S(5,9,10,12,13,15)
F3=P (0,3,8,11,12,15); F4=P(1,2,7,8,11,12,14)
5.6. Design a 3 to 8 line decoder using NOR gates only and draw its circuit.
5.7. What will be the output of decoder 74154, if the enable is low, the data input low and the select
inputs are as follows?
(a) 1110 (b) 1001 (c) 0101 (d) 0000
Combinational Logic Design 233
5.8. Draw a diagram for 7-segment LED display driver and explain its operating principle.
5.9. (a) Define encoder. Distinguish between encoder and decoder.
(b) Design a encoder circuit for 10 line to 4 line priority encoder.
5.10. (a) Describe the operation of a multiplexer using functional block diagram.
(b) Enumerate some of the applications of multiplexers.
(c) Explain how Boolean functions will be implemented using multiplexers.
5.11. (a) What is demultiplexers? Distinguish between
(i) A multiplexer and demultiplexer
(ii) Decoder and demultiplexer
(b) Draw the logic diagram of a one line to four line demultiplexers.
5.12. Implement the following 3-variable Boolean functions using 4:1 multiplexers:
(a) F1= Sm(0,2,3,5,7)
(b) F2=Sm( 1,3,4,6,7)
(c) F3=Sm( 0,2,4,5,6,7).
5.13. Implement the following 4-variable Boolean functions using 8:1 multiplexers
(a) F1=Sm(0,1,3,5,6,8,9,11,12,13)
(b) F2=Sm( 0,7,8,9,10,11,15)
(d) F3=Sm(0,1,3,5,9,10,11,13,14,15)
5.14. Implement the 6-variables Boolean functions
f = Sm( 0,1,3,5,7,12,14,16,18,20,22,26,28,30,32,34,37,39,41,43,45,50,51,53,60,61,62,63) using
eight-input multiplexers and 4-input multiplexers
5.15. Design a BCD to 7 segment decoder using
(a) Dual 4:1 multiplexers
(b) 1;16 demultiplexer
(c) BCD to decimal decoder
5.16. Design a 32:1 multiplexers using two 16:1 multiplexers.
5.17. Design a 1:32 demultiplexer using 1:8 and 1:16 demultiplexer.
5.18. Design a logic circuit for converting Excess-3 to 8421 code.
5.19. Design a GREY to BCD-code converter using MSI ICs and logic gates.
5.20. Design a pulse train 11011001 using MSI ICs.
5.21. Draw a connection diagram to show how multiplexer 74151 should be used to implement the Boolean
– – –
function F = A BC + AB C + ABC + ABC
5.22. Draw a diagram to show how IC 74237 can be used as an 8-output data distributor.
5.23. Design a four digit 7 segment display system.
5.24. Design a 5¥3 dot matrix display system to display alphanumeric character E.
5.25. Design a 64:1 multiplexer using 8:1 and 16:1 multiplexers.
CHAPTER
6
ARITHMETIC
LOGIC CIRCUITS
6.1 INTRODUCTION
The arithmetic and logical operation of digital circuits are already explained in combinational logic
chapter. The design and implementation of arithmetic and logic circuits using gates are also explained
in that chapter. Now-a days, Medium Scale Integrated (MSI) circuits are used in multibit addition,
multibit subtraction, and all arithmetic logic operations. Presently, MSI ICs are available in market. But
all arithmetic functions are not available in a standard MSI IC. The designer should select a particular
ALU IC and can modify its operation as per requirement. In this chapter, arithmetic and logic operations
such as addition, subtraction, multiplication and division are explained with the help of logic gates and
integrated circuits.
6.2 BINARY ADDITION
To design binary adder circuits, the basic knowledge
of arithmetical operations in base 2 is required. Figure
6.1 shows the governing rules of addition of two binary
numbers. When two ones are added, then sum is zero and
a carry bit is generated. Then the carry bit is added to the
next pair of bits. In this section, half adder, full adder and
Fig. 6.1 Addition of two binary numbers
4-bit adder circuits are explained.
6.2.1 The Half Adder
A half adder is the simplest digital adder and it is used
Table 6.1 Truth table of half adder to add two binary digits, an addend (A) and an augend
Inputs Outputs (B). After addition of two binary digits A and B, the sum
Addend Augend Sum Carry (S) and carry (C) are generated. This carry signal may be
(A) (B) (S) (C) used to the next stage of the addition. Table 6.1 shows
0 0 0 0 the truth table for adding two binary digits A and B. The
0 1 1 0
1 0 1 0
Boolean expressions of the sum (S) and carry (C) are
– –
1 1 0 1 Sum S = A⊕B = AB + A B
Carry C = A.B
Arithmetic Logic Circuits 235
The sum can be implemented by using an Exclusive-OR gate and an AND gate can be used for carry
generation as shown in Fig. 6.2(a). Figure 6.2(b) shows the implementation of the sum and carry functions
using AND and OR gates. A block diagram representation of a half adder (HA) is also depicted in Fig. 6.3.
Fig. 6.2 Implementation of half adder (a) Using EX-OR and AND logic gates
(b) Using AND and OR logic gates
–– – — –—
Sum S = A B Cin + A BCin + AB Cin + ABCin
– – —
Carry C = A BCin + AB Cin + ABCin + ABCin
The sum can also be expressed as
– – — –— – ———
S = A (B Cin + BCin) + A(B Cin + BCin) = A (B ⊕ Cin) + A B ⊕ Cin )
Finally, sum is S = A⊕B⊕Cin and can be implemented using an three inputs EX-OR gate.
The carry out may be rewritten as
– – —
C = (A B + AB )Cin + AB(Cin + Cin) = (A⊕B)Cin+ AB
The K-maps for sum and carry out are shown in Fig. 6.5(a) and (b) respectively. The carry-out
equation may be written in simplified form using K-map as given below:
Cout = AB + BCin+ ACin = (A⊕B)Cin+ AB
Fig. 6.5 K-map of Full adder (a) for sum (b) for carry out
Implementation of full adder circuits using AND, OR and EX-OR gates are depicted in Fig. 6.6(a)
and Fig. 6.6(b). Full adder circuit can also be implemented with the help of two half-adder circuits as
shown in Fig. 6.7. The first half adder is used to add two inputs A and B and generate sum S′ and carry
output C′. Then second half adder combines the sum (S′) and carry input (Cin) and generate final sum S
and carry out C′′. The final carry can be produced by using OR operation between C′ and C′′.
Fig. 6.6(a) Implementation of full adder using AND and OR gates (b) Implementation of full ad-
der using EX-OR, AND and OR gates
Arithmetic Logic Circuits 237
– –
Difference D = A⊕B = AB + A B Table 6.3 Truth table of Half subtractor
– Inputs Outputs
Borrow Bout = A B
Minuend Subtracted Difference Borrow
Figure 6.14 shows the implementation of the (A) (B) (D) (Bout)
difference (D) and the borrow (Bout) functions using AND 0 0 0 0
and OR gates. The block diagram representation of a half 0 1 1 1
subtractor (HS) is also shown in Fig. 6.15. 1 0 1 0
1 1 0 0
Fig. 6.14 Implementation of half subtractor Fig. 6.15 Block diagram of half subtractor
using logic gates
The block diagram of full subtractor is shown in Fig. 6.16. The difference (D) and the borrow output
(Bout) can be expressed in Boolean equations from the truth table as follows:
240 Digital Electronics: Principles and Applications
–– – — –—
difference D = A B Bin + A BBin + AB Bin + ABBin
–– – — –
borrow output B out = A B Bin + A BBin + A BBin
+ ABBin
The simplified expression of difference is
– – — –— –
D = A (B— + BBin) + A(B Bin + BBin) = A (B ≈
Bin—–
Fig. 6.16 Block diagram of full subtractor Bin) + A B ≈ Bin = A ≈ B ≈ Bin
The borrow out may be rewritten as
– — –– – –——–
Bout = A B(Bin + Bin) + (A B + AB)Bin = A B + A ≈ B Bin
The K-maps of difference (D) and the borrow output (Bout) are shown in Fig. 6.17 (a) and Fig. 6.17
(b) respectively. From K-map, the simplified Boolean expression of borrow output is
– –
Bout = AB + ABin + BBin
Fig. 6.17 K-map of full subtractor (a) for difference (b) for borrow output
final borrow output of the subtraction. The final result of ‘N ’ bit subtraction is the difference (D) =DN-1
DN-2 ….D1 D0 and the borrow output Bout=BN-1.
Fig. 6.20 Four bit subtractor using FS Fig. 6.21 Four bit subtractor using FS and HS
– –– –
B 3B2B1B 0 1’s complement
+ 1 Cin = 1
A3 A2 A1 A0 Minuend
S3 S2 S1 S0 Difference
Sign Magnitude
Arithmetic Logic Circuits 243
The first bit, 0 stands for positive sign and the Table 6.5 4 bit signed binary number
next three bits are used to represent the magnitude Decimal number Signed binary number
of the number. The 1’s complement of 0001 is 1110. Sign Magnitude
Then 2’s complement is 1110 +1= 1111 which rep-
+7 0 1 1 1
resents decimal number, –1. Here the first bit, 1 +6 0 1 1 0
stands for negative sign. Table 6.5 shows the 4 bit +5 0 1 0 1
signed binary number. +4 0 1 0 0
Figure 6.28 shows the 4-bit sign magnitude bi- +3 0 0 1 1
nary subtraction. During subtraction, the 4 bit sign +2 0 0 1 0
subtracted B is converted into two’s complement to +1 0 0 0 1
change the sign of number. It is depicted in Fig. 6.28 0 0 0 0 0
that the 4 bit sign magnitude binary number A (A0, –1 1 1 1 1
A1, A2, A3) is directly fed to first 4 bit adder IC 74283 –2 1 1 1 0
and the other number B (B0, B1, B2, B3) is inverted –3 1 1 0 1
using quad EX-OR gates and fed to the 4 bit adder. –4 1 1 0 0
When Cin is 1, the two’s complement of the 4 bit –5 1 0 1 1
sign number B is added with A and the difference of –6 1 0 1 0
the two 4 bit sign magnitude binary numbers can be –7 1 0 0 1
find at the outputs S¢3 S¢2 S¢1 S¢0 of IC 74283. If S¢3 = –8 1 0 0 0
0, output will be S¢2 S¢1 S¢0. When S¢3 = 1, output will
be two’s complement of S¢2 S¢1 S¢0. Therefore the second 74283IC is used to generate the 2’s complement
of the output S¢2 S¢1 S¢0 and final output can be obtained at S2 S1 S0. The final output of the two 4 bit sign
magnitude binary subtraction is the sign bit and the magnitude of the result of subtraction as given in
Fig. 6.28.
grounded. The final result will be obtained from the output of IC2 after decimal adjustment as
depicted in Fig. 6.29.
6.4 CARRY LOOK-AHEAD
ADDITION
In the 4-bit adder, the carry signals have to propagate
from one full-adder to the next full adder. The delay
generated to produce carry output is 4d, where d =
propagation delay of each stage. This propagation de-
lay can be increased with number of bits. The circuit
performance can be improved by increasing the speed
of operation. Reducing the propagation delay, we can
increase the speed. Generally, look-ahead carry gen-
erator technique is used for this operation. The look-
ahead carry generator involves two Boolean functions
namely Generate (G) and the Propagate (P). For input
bits Ai and Bi, Generate (Gi) and the Propagate (Pi)
functions are defined as:
Gi = AiBi
Pi = Ai ≈ Bi
The carry output equation will be Cout=(Ai≈Bi)Cin+
AiBi and the above equation can be rewritten in terms
of Generate (Gi) and the Propagate (Pi) Cout=PiCin+Gi
For a 4-bit adder, the generation and propagation
Fig. 6.29 BCD adder terms for each stage are as follows
G0=A0B0 P0=A0≈B0
G1=A1B1 P1=A1≈B1
G2=A2B2 P2=A2≈B2
G3=A3B3 P3=A3≈B3
The carry outputs for the different stages are
C0= P0Cin + G0
C1= P1C0 + G1 = P1 (P0Cin +G0) + G1 = P1 P0Cin + P1G0 + G1
C2= P2 C1 + G2= P2(P1 P0 Cin + P1 G0 + G1)+ G2= P2 P1 P0 Cin + P2 P1 G0+ P2 G1+ G2
C3= P3C2 + G3 = P3 P2 P1 P0Cin+ P3 P2 P1 G0+ P3 P2 G1+ P3 G2+ G3
The final carry-out equation can be rewritten as
C3=PCin+ G
where G = P3 P2 P1G0+ P3 P2 G1+ P3 G2+ G3 and P = P3 P2 P1 P0
This carry look ahead generator can be implemented using AND, OR and XOR gates as shown in
Fig. 6.30. IC 74283 performs the addition of two 4-bit binary numbers with full internal carry look
ahead facility.
Arithmetic Logic Circuits 245
Fig. 6.30 Carry look ahead generator Fig. 6.31 Pin diagram of IC 74283
The pin diagram and logic symbol of IC 74283 are
illustrated in Fig. 6.31 and Fig. 6.32 respectively. The sum
outputs are provided for each bit (S3 S2 S1 and S0) and the
resultant carry (C4) is obtained from the fourth bit. These
adders feature full internal look ahead across all four bits.
This provides the system designer with partial look - ahead
performance at the economy and reduced package count of
a ripple-carry implementation. The features of IC 74283 are
given below:
∑ Full-carry look-ahead across the four bits
∑ Systems achieve partial look-ahead performance with
the economy of ripple carry
∑ Typical add times: two 4-bit words 15 ns; two 8-bit
words 25 ns; two 16-bit words 45 ns
∑ Typical power dissipation per 4-bit adder is 95 mW.
For 8 bit addition, two 74283 IC are connected in cascade
and typical delay time is about 25ns. A 16 bit addition can be
implemented by cascade connection of four 74283 ICs and
delay time to get the final result will be approximately 45ns.
6.5 SERIAL ADDER
Figure 6.33 shows the serial addition of two N - bit numbers
A = AN-1 AN-2 …. A1 A0 and B= BN-1, BN-2… B1 B0. This circuit Fig. 6.32 The IC 74283 4 bit carry look
consists of three shift registers, a full adder and a D flip-flop. ahead adder
In serial adder, addition is started from the least signifi-
cant bit. Initially, the full adder inputs are Ai=A0, Bi=B0 and Ci–1=0. The outputs are sum Si=S0=A0≈B0 and
carry Ci = C0= A0B0. When the first clock pulse is applied, S0 is loaded into the SUM register. Carry out
Ci=C0 is connected with the D flip-flop. Therefore, flip-flop output Q = D after first clock pulse and is fed
246 Digital Electronics: Principles and Applications
available from full adders and fed to the flip-flops of sum register. When the clock pulse is applied, these
results will be stored in sum register.
The parallel addition has speed limitation. The carry generated of full adder must be ripple through
from one full adder to next full adder. For example, carry output of first full adder C0 will be obtainable
after a time equal to the propagation delay time of the full adder. Then this carry C0 will be used as carry
input of next full adder and generates a carry C1 after a second propagation delay. This process will
continue till the additions of all bits are completed. The sum of the propagation delays of all full adders
is actually the total delay time of operation. To reduce the total delay time, the fast adder circuits are
incorporated the carry look ahead (CLA) to ripple through carry of adders.
The addition of K N-bit numbers is S = X(1) +X(2) + X(3) +….+ X(K). When more than two N-bit
numbers are added, the Fig. 6.34 must be modified into Fig. 6.35. This adder circuit consists of N-bit
augend register, N bit full adder and N+1 bit accumulator register. Actually, the N bit full adder is the
cascade connection of N full adders.
Initially, all flip-flops of augend register and accumulator register are in reset condition and the first
number X(1) [ XN-1(1)………. X2(1) X1(1) X0(1) ] is fed to the input terminals of D flip-flops of the augend
register. After application
of clock pulse, the number
X (1) is input to the BN-1
……B2 B1 B0 terminals of
N bit full adder and other
terminals of N bit full
adder AN-1 ……A2 A1 A0 are
0 as the outputs of N–bit
accumulator are 0. Then N
bit full adder circuit added
two N bit number AN-1 =0
……A2 =0 A1 =0 A0=0 and
BN-1 = XN-1(1) ……B2=
X2(1) B1= X1(1) B0 = X0(1) Fig. 6.35 Parallel addition of K N - bit numbers
with carry input Cin=0.
After addition, the output of N bit full adder will be XN-1(1)………. X2(1) X1(1) X0(1). Therefore, the
X(1) will be stored in the accumulator register when the second clock pulse is applied and fed into the
input terminals AN-1 ……A2 A1 A0 of N-bit full adder and the next number X(2) [ XN-1(2)………. X2(2)
X1(2) X0(2) ] is also loaded in augend register. Now A = X(1) and B = X(2). The output of N-bit full
adder is the sum of X(1) and X(2). When the third clock pulse is applied, S = X(1)+ X(2) will be loaded
in accumulator register and X(3) [ XN-1(3)………. X2(3) X1(3) X0(3) ] number will be loaded into augend
register. Then above process will continue until addition of all N-bit numbers are completed. So, after
Kth clock pulse the content of accumulator register is the final sum of K N-bit numbers.
Table 6.6 Truth Table of binary multiplication multiplier digit is 1, the partial product is equal to
Inputs Output the multiplicand. Therefore, the AND operation is
equivalent to multiplication of two bits.
Multiplicand Multiplier (A.B) The process of two bit multiplication is
(A) (B) shown in Fig. 6.36. The multiplicand A (A1 A0) is
0 0 0 multiplied in turn by each digit of the multiplier
0 1 0 B (B1B0). Intially, B0 is multiplied with A1 and A0
1 0 0 and generates partial product A1B0, A0 B0. Then
1 1 1 B 1
is multiplied with A1 and A0 and generates
partial product A1 B1 , A0 B1 which are shifted by
one bit left. Then sum of threse partial products
produce the result of multiplication using AND
gates and adders as depicted in Fig. 6.37. Each
partial product is either 0 or 1 depending upon
the multiplicand and multiplier. The AND gates
produce the partial products. In a 2-bit by 2-bit
multiplier, two half adders are used to sum the
partial products, but generally full adders are used
Fig. 6.36 Process of 2 bit multiplication
in multiplication. Here P3 – P0 are the product
output. Table 6.7 shows the product output of 2 two bit binary numbers. The product output has more
digits than the multiplicand and multiplier. If two N bit binary numbers are multiplied, the product
output will be as many as 2N bits.
Table 6.7 Truth table 2×2 multiplier
Inputs Output
Multiplicand Multiplier P3 P2 P1 P0
A1 A0 B1 B0
0 0 0 0 0 0 0 0
0 0 0 1 0 0 0 0
0 0 1 0 0 0 0 0
0 0 1 1 0 0 0 0
0 1 0 0 0 0 0 0
0 1 0 1 0 0 0 1
0 1 1 0 0 0 1 0
0 1 1 1 0 0 1 1
1 0 0 0 0 0 0 0
1 0 0 1 0 0 1 0
1 0 1 0 0 1 0 0
1 0 1 1 0 1 1 0
1 1 0 0 0 0 0 0
1 1 0 1 0 0 1 1
1 1 1 0 0 1 1 0
Fig. 6.37 2 - bit by 2- bit multiplication 1 1 1 1 1 0 0 1
Arithmetic Logic Circuits 249
Logical AND operation each of the bits of the multiplicand (A3 A2 A1 A0) with the first bit of the
multiplier (B0) can generate A3 B0, A2 B0, A1B0, A0B0. The output of A0 AND B0 is the first bit of the
product output - P0. After that, AND each of the bits of the multiplicand (A3 A2 A1 A0) with the first bit of
the multiplier (B1) and generates A3B1, A2 B1, A1 B1, A0 B1. Then partial product A3B0, A2B0, A1B0 now will
be added with A3B1, A2 B1, A1 B1, A0 B1 using full adders. In this addition process, the carry is generated
and it is forwarded to the next column of partial products. Product P1 is obtained from first full adder.
The above process will continue till all multiplication and addition process are completed. The carry
output from the last adder becomes the final bit in the product. The final product of this 4 bit multiplier is
an 8 bit result P7 P6 P5 P4 P3 P2 P1 P0. In this way, combinational logic circuit (AND gates and full adders)
is used to implement 4 bit multiplication. This operation can also be implemented by 4 bit adders and
AND gates as shown in Fig. 6.40.
250 Digital Electronics: Principles and Applications
Function indicates the action like add, subtract, AND, etc. Data outputs have same bit width as multi-bit
data inputs A and B and conditions indicates special conditions of arithmetic activity like overflow.
Arithmetic logic units may vary in terms of number of bits, supply voltage, operating current,
propagation delay, power dissipation, and operating temperature etc. The number of bits equals to the
width of the two input words on which the ALU perform arithmetic and logical operations. Common
configurations of ALU are 2-bit, 4-bit, 8-bit, 16-bit, 32-bit and 64-bit ALUs. Supply voltages varies
from –5 V to +5 V. Power dissipation of ALU is in some milliwatts (mW).
Transistor-Transistor Logic (TTL), Fairchild Advanced Schottky TTL (FAST), Emitter Coupled Logic
(ECL), Complementary Metal-Oxide Semiconductor (CMOS) logic families are used to develop ALU ICs.
Arithmetic Logic Units are available in a variety of integrated circuit (IC) package types and with different
numbers of pins. Basic IC package types for ALUs are Ball Grid Array (BGA), Quad Flat Package (QFP),
Single In-Line Package (SIP), and Dual In-Line Package (DIP).
IC74382 is an ALU IC and its logic symbol is depicted in Fig. 6.45. It is a 4-bit device and performs
eight functions as shown in Table 6.8. Three select lines S2 S1 S0 are used to select output functions.
Multi-bit ALU can be created by connecting the carry output of lower order IC to carry in of higher
order IC as shown in Fig. 6.46.
Table 6.8 Function table
Select inputs Logic function Comments
S2 S1 S0
0 0 0 CLEAR F3F2F1F0=0000
0 0 1 B Minus A CN=1
0 1 0 A Minus B
0 1 1 A Plus B CN=0
1 0 0 A≈B Exclusive OR
1 0 1 A+B OR
1 1 0 AB AND
1 1 1 PRESET F3F2F1F0=1111
Fig. 6.45 Logic symbol of ALU IC 74382
to provide multi-level full carry look-ahead is illustrated in Fig. 6.49. If high speed is not of importance,
a ripple-carry input (Cn) and a ripple-carry output (Cn+4) are available. However, the ripple-carry delay
has also been minimised so that arithmetic manipulations for small word lengths can be performed
without external circuitry.
It is necessary to develop an algorithm which can be used for hardware implementation of any
comparator. The algorithm of 2-bits comparator as follows:
Algorithm
Step-1 Initially we take the most significant pair of digits A1 and B1 respectively. If A1>B1, then
A>B; if A1<B1 then A<B ; if A1=B1 we can not take any decision and the next pair of digits must
be compared.
Step-2 If A0>B0 and A1=B1 then A>B; if A0<B0 and A1=B1 then A<B; if A0=B0 and A1=B1
then A=B.
— —
To determine A>B , the equation is L = A1B 1 + E1A0B 0
— —
The first term in this equation A1B1 = 1 if A1>B1. The second term E1A0B 0 = 1 if A1=B1 and A0>B0. If
those two conditions are satisfied, then A>B.
— —
The equation for determining whether A<B is S = A1B1 + E1A 0 B0
— —
In this equation, the first term A1B1 =1 if A1 < B1. The second term E1A 0 B0 =1 if A0=B0 and A0<B0. If
those two conditions are satisfied, then A<B.
— — —
The implementation of a 2 bit comparator based on E = E1E0 = 1, L= A1B 1 + E1A0B0 and S = A 1B1 +
—
E1A 0B0 is shown in Fig. 6.51.
SUMMARY
In this chapter, the arithmetic operations: addition, subtraction, 2’s complement adder/subtractor, sign magnitude
binary subtraction carry look ahead adder, serial adder, parallel adder, BCD addition, multiplication and division
using combinational logic circuits are explained. Some MSI ICs are also incorporated to perform addition and
multiplication. The operation of arithmetic logic unit (ALU) is also explained with 74382 and 74181 MSI ICs. The
operation of 1 bit, 2 bit and 4 bit comparators are discussed in this chapter.
REVIEW QUESTIONS
6.1 Draw a half adder circuit using NAND gates and explain its operation.
6.2 Draw a full adder circuit using NAND gates and explain its operation. Write some applications of
full adders. What is the difference between half adder and full adder?
6.3 Design a 4 bit divider circuit using repeated subtraction.
6.4 Draw a 8 bit serial adder and explain it operation briefly. When serial input data’s are 1111 1001
and 1000 1000, find the output of serial adder after eight clock pulses. What are the advantages and
disadvantages of serial adder?
6.5 Design a 4 bit parallel adder circuit. Explain how 1010 and 1111 will be added in parallel adder.
What are advantages of parallel adder?
If the propagation delay time of 1 bit full adder is 100ns, determine the total delay time to get final
result.
6.6 Draw a 4 bit by 4 bit array multiplication circuit and explain its operation. What will be total delay
time to get final product output? Consider AND gate delay time 100ns and full adder delay time
200ns.
6.7 Design a circuit to convert 4 bit binary number into one’s complement form.
6.8 Design a circuit to convert 4 bit binary number into two’s complement form.
6.9 Determine the maximum propagation delay time between Cin and Cout of a 4 bit CLA adder. Assume
the propagation delay in each full adder is Tf and in gates is Tg.
6.10 Design the combinational logic circuits to perform the following operations:
(a) A+B (b) A-B (c) A¥B where A=A5A4A3A2A1A0 and B= B 5 B 4 B 3 B 2 B 1 B 0
6.11 Define ALU. Explain the operation of 74LS382 ALU IC with diagram. Show the following operation
using 74LS382 ALU IC:
(a) A PLUS B (b) A+ B (c) A MINUS B
6.12 Design a 8 bit ALU using two 4 bit 74LS382 ALU IC. Show the following operation using 74181
IC:
(a) A PLUS B (b) A ≈ B
where A=1111 1111 and B =1000 0111.
6.13 Show the following operation using 74LS181 IC:
(a) A PLUS B (b) AB Plus A
6.14 Design a combinational logic circuit to perform the arithmetic operation B =A+2, where
A= A4A 3A 2A1A 0.
6.15 Draw the connection diagram of 74283 and 7486 to perform a 8 bit parallel adder/subtractor.
6.16 Draw the 4 bit multiplication circuit and explain briefly. Write most commonly used multiplication
ICs in digital electronics.
6.17 An arithmetic circuit has two selection signals, S0 and S1. The circuit is required to perform the fol-
lowing operations
(a) F = A + B (b) F = A + B + 1 (c) F = A (d) F = B
Arithmetic Logic Circuits 261
Design the ALU circuit using a 4 bit adder and logic gates.
6.18 Design a binary multiplier which multiplies a 4 bit number B3 B2 B1 B0 by a number A= A2 A1 A0.
6.19 Design a circuit that adds two binary bits a carry input (Cin).
6.20 What is the difference between a parallel adder and a carry look-ahead adder?. Explain the operation
of carry look-ahead adder with diagram.
6.21 Compare the following two circuits as shown in Fig. 6.53 and Fig. 6.54.
7
FLIP-FLOPS
7.1 INTRODUCTION
The combinational logic circuits are a part of digital systems and they have many applications such as
decoder, encoder, adder, subtracter, multiplexer, demultiplexer, etc. But when the circuit output not only
depends on the present state but also the previous state, the circuit is known as sequential logic circuit.
The basic block diagram of a sequential circuit is shown in Fig.7.1. This circuit consists of a combina-
tional logic circuit and a memory element. The output of combinational logic circuit is stored in memory
elements. Memory elements output entered into combinational logic circuit and used as input variables.
The output of combinational logic circuit depends upon the external inputs and input from memory ele-
ments. A memory element is a device which can store information in terms of 1 or 0 and its state can be
modified by clock signal and data inputs A flip-flop is one bit memory element which can store 1 or 0.
Flip-flop is an electronic circuit or device which is used to store a data in binary form. Actually, flip-
flop is an one-bit memory device and it can store either 1 or 0. This device has two-state characteristics.
Therefore, this device is known as two state machines as shown in Fig.7.2. There are four conditions of
transition of flip-flops due to change in input and clock signals. Condition-1, condition-2, condition-3
and condition-4 are the four different logic conditions related with input and clock signals. If the initial
state of flip-flop is 0 in condition-1, when input x = 0 and clock is applied, flip-flop output state will not
be changed and its output should retain at logic level 0. In condition-2, while flip-flop is in 0 state and
input x=1 and clock is applied, there will be transition in flip-flop’s output as its state is changed from
logic level 0 to logic level 1. Similarly, in condition-3, when flip-flop is in 1 state, input x = 1 and clock
is applied, output will not be changed and output should maintain logic level 1. But, in condition-4,
flip-flop is in 1 state, input=0 and clock signal is applied, and then output will be changed from logic
level 1 to logic level 0. Flip-flop can be constructed using inverter, NOR and NAND gates which are
discussed in this chapter.
Fig. 7.1 Block diagram of sequential logic circuit Fig. 7.2 Two state machine
Flip-Flops 263
Table 7.1 Truth table of one bit can store one bit information either 1 or 0. The operation of
memory cell using NAND gates one bit memory cell using NAND gates is represented by
Inputs Outputs Table 7.1.
– Figure 7.7 shows the circuit diagram of 1 bit memory cell
A1 A2 Q Q
using NOR gates and its truth table is depicted in Table 7.2.
0 1 1 0
The correlation between input and output is
1 0 0 1 – – –
Q = A2 = A 1 , and Q = A1 = A 2
Inputs Outputs
A1 A2 Q
–
Q
0 1 1 0
1 0 0 1
Fig. 7.7 One bit memory cell using NOR gates
7.5 LATCH
Latch is a bistable device capable of staying in either of two states: Set and Reset for an indefinite time
period. Latches are basically similar to flip-flops as they have two states. But the difference between latches
and flip-flops is in the method of changing their states. When the Enable input of Latch is high, the output
of Latch changes depending upon inputs. If the Enable input of Latch is low, the output of Latch should
hold its previous state. The flip-flop is triggered by either positive edge or negative edge of clock signal for
changing their output states. When the clock signal changes from low to high state and the output changes
due to the inputs, it is called positive edge triggering flip-flop. If the clock signals change from high to low
state and the output changes due to the inputs, this condition is known as negative edge triggering flip-flop.
The difference between latch and flip-flop is illustrated in Table 7.3. Different types of latches are SR latch
and D latch. The operation of S-R latch and D latch is explained in Section 7.6 to 7.10.
Table 7.3 Difference between Latch and flip-flop
Latch Flip-flop
A latch is an electronic sequential logic circuit used to store A flip-flop is an electronic sequential logic circuit used to
information in an asynchronous arrangement. store information in an synchronous arrangement. It has
two stable states and maintains its states for an indefinite
period until a trigger pulse is applied.
One latch can store one bit information, but output state One flip-flop can store one bit data, but output state changes
changes only in response to data input. with trigger pulse only.
Latch is an asynchronous device and it has no clock Flip-flop has clock input and its output is synchronised
input. with clock pulse.
Latch holds a bit value and it remains constant until new Flip-flop holds a bit value and it remains constant until a
inputs force it to change. trigger pulse is received.
Latches are level-sensitive and the output tracks the input Flip-flops are edge-sensitive. They can store the input only
when the level is high. Therefore as long as the level is logic when there is either a rising or falling edge of the clock.
level 1, the output can change if the input changes.
Flip-Flops 265
S=0, R=0: The normal resting state of S-R Latch is S=0, and R=0. In this condition there is no effect on
–
output. Consequently, the state of Q and Q will not be changed. This is hold operation of S-R latch.
Fig. 7.9 (a) NOR Latch with R = 0 and S = 0 (b) NOR Latch with R = 1 and S = 0 (c) NOR Latch
with R = 0 and S = 1 (d) NOR Latch with R = 1 and S = 1(Invalid)
–
S=1, R=0: When S=1, and R=0, the output Q will be 1 and Q is equal to 0. This is called set operation
of S-R Latch.
266 Digital Electronics: Principles and Applications
–
S=0, R=1: If S=0, and R=1, Latch reset the output. Accordingly output Q=0 and Q =1. This is known as
reset operation of S-R Latch.
–
S=1, R=1: If S=1 and R=1, latch is set and reset at the same time. The output will be Q=0 and Q =0.
–
But practically both outputs zero have no use. Therefore, this condition is invalid as the Q and Q outputs
must be complement of each other. Therefore, this is called an invalid or illegal state for the S-R latch.
Table 7.5 Truth table of NOR gate S-R latch Table 7.5 shows the truth table of S-R latch where Qn is
the present state and Qn-1 is the next state. Figure 7.10
Inputs Present state Next state
shows the state transition diagram of S-R latch. 0Æ0
S R Qn Qn+1
transition occurs when S = 0 and R=0 or S=0 and R=1.
0 0 0 0
0 0 1 1 Since R can be either 0 or 1, it may be indicated as don’t
0 1 0 0 care state represented by X symbol. Then 0Æ0 transition
0 1 1 0 is possible only when S=0 and R=X. The 0Æ1 transition
1 0 0 1 is generated if S=1 and R=0. Similarly, 1Æ0 transition
1 0 1 1
1 1 0 x occurs when S=0 and R=1. The 1Æ1 transition is gener-
1 1 1 x ated if S=X and R=0.
The timing diagram of a NOR latch for
different S-R inputs is depicted in Fig. 7.11.
Initially, R=1 and S=0, the output of S-R latch
–
Q is 0 and Q =0. After that R=0 and S=0, the
output of S-R latch does not changed and it
should retain its previous output. Therefore S-
–
Fig. 7.10 State transition diagram of S-R Latch R latch output Q is 0 and Q = 0. Then R=0 and
–
S=1, the output of S-R latch Q is 1 and Q =0 as
–
the latch is set. Afterwards R=1 and S=1, the output of S-R latch Q is 0 and Q =0 as this state is invalid
–
due to R=S=1. Then R=1 and S=0, the output of S-R latch Q is 0 and Q =1 as the latch is reset. Similarly,
other logic operations can be justified using Table 7.5.
The K-map of S-R latch with three inputs namely S, R, Qn and one
output Qn+1 is given in Fig. 7.12. The relationship between inputs and
output can be expressed by characteristic equation
–
Qn+1 = S + R Qn.
7.7 S-R LATCH USING NAND GATE
The S-R Latch can be constructed from two NAND gates as shown in
Fig. 7.13. Two NAND gates are cross-coupled. Output of one NAND Fig. 7.13 NAND latch
Flip-Flops 267
–
gate is connected with the one input of the other NAND gate. Therefore, the output of gates Q and Q are
the latched outputs. In general, outputs are complement of each other. In latch, there are two inputs namely
Set (S) and Reset (R). Initially, S and R both inputs are 1 state. Then any one input will be changed to 0
(logic 0) for changing output. Truth table for operation of S-R latch using NAND gates is given in Table
7.6. The four possible states of S-R latch are shown in Fig. 7.14 (a), (b), (c) (d) and (e) and operation
detail is given below:
Table 7.6 Truth table of cross-coupled NAND gates
–
S R Q Q Comments
0 0 1 1 Not used
0 1 0 1 Reset
1 0 1 0 Set
1 1 Latch Latch Hold
Fig. 7.14 (a) NAND latch with R=0 and S=0 (Invalid) (b) NAND latch with R=1 and S=0 (c) NAND latch
with R=0 and S=1 (d) NAND latch with R=1 and S=1 (e) NAND latch with R=1 and S=1
268 Digital Electronics: Principles and Applications
–
S=0, R=0: When S=0, R=0, the output of latch will be Q=1 and Q
=1. But practically both outputs high will not be allowed; therefore
this state is called invalid state of latch.
–
S=1, R=0: When S=1, and R=0, the output Q will be 1 and Q =0.
This is known as set operation of S-R latch.
S=0, R=1: If S=0, and R=1, flip flop reset the output. Therefore,
–
the output Q will be 0 and Q =1. This is called reset operation of
S-R latch.
Fig. 7.15 Symbol of S-R latch S=1, R=1: This is the normal resting state of S-R Latch when S=1,
R=1 and in this condition there is no effect on output. Consequently,
–
the state of Q and Q will not be changed. This is the holding state of latch. Figure 7.15 shows the logic
symbol of S-R latch.
Fig. 7.17 Waveform of S-R Latch Fig. 7.18 Symbol of S-R Latch with enable
with enable
Table 7.9 (a) Truth table of D latch Table 7.9 (b) Truth table of D latch with E, D, Qn and Qn+1
–
E D Q Q ENABLE D Present State Next State
0 0 Latch Latch E Qn Qn+1
0 1 Latch Latch
0 0 0 0
1 0 0 1
0 0 1 1
1 1 1 0
0 1 0 0
0 1 1 1
1 0 0 0
1 0 1 0
1 1 0 1
1 1 1 1
and the Karnaugh map for the next step of D latch from enable, D and present state Qn is depicted in
Fig.7.22. The expression for the next state output Qn+1 from the Karnaugh map is
–
Qn+1 = ED + E .Qn
As there are two 1’s in adjacent cells on the K-map, a static hazard is present in K-map. To eliminate
the static hazard, another term DQn will be added. Then static hazard free characteristic equation is
–
Qn+1 = ED + E .Qn + DQn
It is clear from this expression that the state of D latch does not change until the enable is high. If the
enable is asserted, the logic expression can be simplified as Qn+1
= D. Logic symbol of D flip-flop is shown in Fig. 7.23. Figure
7.24 shows the timing diagram of D latch. The outputs respond
to input D when the enable (E) input is high. When the enable
signal becomes low, the circuit remains latched. Any time D
is high and enable E is high, the output Q is high. Any time D
is low and enable E input is high, Q becomes low. When the
enable E input is low, the state of latch does not affected by the
D input. The advantages of enabled D latch is that it has only
one data input and when only output is required make the enable
Fig. 7.23 Logic symbol of D latch signal logic 1. The transition of D latch does not occur until E
with enable makes a 0Æ1.
Flip-Flops 271
Fig. 7.26 (a) Clocked S-R flip-flop using NAND gates (b) Clocked S-R flip-flop using NOR gates
272 Digital Electronics: Principles and Applications
Fig. 7.28 (a) Positive edge triggered S-R flip-flop (b) Negative edge triggered S-R flip-flop
The truth table of positive edge triggered S-R flip-flop is given in Table 7.10. When S = 1 and R = 0,
flip-flop sets on the rising clock edge. If S = 0 and R = 1, flip-flop resets on the rising clock edge. The S
and R inputs can be changed at any time when the clock input is low or high. It is depicted in Fig. 7.27
that output changes at the transition of clock from low to high. The operation and truth table of negative
edge-triggered flip-flop are the same as positive edge triggered flip-flop but only difference is trigger
edge that will be negative or falling edge of the clock pulse. Therefore, flip-flop will be set or reset at the
negative or falling edge of the clock pulse.
Table 7.10 Truth table of positive edge triggered S-R flip-flop
Inputs Outputs Comments
–
Clock S R Q Q
(CLK) –
0 0 Q Q No change
Ø
Ø
0 1 0 1 Reset
Ø
1 0 1 0 Set
Ø
1 1 ? ? Invalid
Example 7.1 Determine the output waveform when of S-R latch when the inputs as shown in Fig. 7.33
are applied. Consider initial output of S-R Latch is low and enable is always high.
Fig. 7.33
� Solution
The output waveform of S-R Latch is illustrated in Fig. 7.34. Initial output
of S-R latch Q is 0. When S=1, R=1, this is the invalid state of SR Latch and
output Q is 0. After that S=0 and R=1, the latch is reset. So the output Q has not
changed and it retain at 0. Then S=1 R=0, latch is set. So the output Q changes
from 0 to 1. Similarly, other outputs of SR latch can be justified. Fig. 7.34
Example 7.2 Write the output of a clocked S-R flip-flop when the inputs are R=011001 and
S = 101100. Assume initially Q is low.
� Solution
Table 7.12
The output of S-R flip-flop Qn+1 is shown
Inputs Outputs in Table 7.12. Initial output Qn is 0. If S=1,
CLK S R Qn Qn+1 R=0, Qn=0 and first clock pulse is applied,
1 0 0 1 the next state output Qn+1 will be 1. When
Ø
0 1 1 0
Ø
S=0, R=1, Qn=1 and second clock pulse is
1 1 0 0
Ø
applied, the next state output will be 0. In
1 0 0 1
Ø
the same way, remaining next state outputs
0 0 1 1
Ø
with respect to clock pulse can be justified
0 1 1 0
Ø
using truth table of S-R flip-flop.
Flip-Flops 275
Example 7.3 Draw the output waveform of a positive edge triggered S-R flip-flop when the
inputs are given in Fig. 7.35.
Assume initially flip-flop output is low.
� Solution
The output waveform is shown in Fig. 7.36. If S=1, R=0 and positive edge triggers
applied, the flip-flop will be set. If S=0, R=1 flip flop will be reset when positive
edge triggered applied. At the instant of first clock pulse, S=0 and R=1, flip-flop Fig. 7.35
will be reset and output Q is 0. During the second clock pulse, S=0 and R=0 and
flip-flop should retain its previous state and there will be no change in output. So
the output Q = 0. Subsequently, S=1 and R=1, flip-flop operates in invalid state
and output Q=0. At the instant of fourth clock pulse, S=0 and R=0, the output of
the flip-flop Q is =0. During the fifth clock pulse, S=1 and R=0, flip-flop is set
and output Q =1.
Fig. 7.36
7.15 EDGE-TRIGGERED D FLIP-FLOPS
The operation of D latch is already discussed in Section 7.9 and 7.10. It responds to the data inputs D
only when the enable input is high. But, the edge triggered D flip-flops responds on either the rising or
falling edge of a clock pulse when a clock signal is applied. In edge triggered D flip-flop, data can be
transmitted from inputs to outputs on the ris-
ing (positive) or falling (negative) edge of
clock pulse. The clocked D flip-flop has two
inputs: a clock input and D input. At the in-
stant when clock changes from low to high
or from high to low, the flip-flop changes its
states to whatever in D input. If the clock is
disabled, the flip-flop does not change its
state. Consequently, D flip-flops can be used
as 1-bit memory device to store either 1, high Fig. 7.37 Positive edge triggered D flip-flop
or 0, low state when clock is disabled, and
read new data from the D input when clock Table 7.13 Truth table of D flip-flop
is enabled. Figure 7.37 shows the positive Clock D Present State Next State
edge triggered D flip-flop. Table 7.13 shows (CLK) Qn Qn+1
the truth table of D flip flop representing 0 0 0 0
present sate and next state and the Kar- 0 0 1 1
0 1 0 0
0 1 1 1
0 0 0
Ø
0 1 0
Ø
1 0 1
Ø
1 1 1
Ø
naugh map for the next state output of D flip-flop Qn + 1 from clock
CLK, data input D and present state Qn is depicted in Fig.7.38. The
Fig. 7.38 K map of D flip-flop expression for Qn + 1 from the Karnaugh map is
———
Qn + 1 = CLK.D + C L K . Qn
276 Digital Electronics: Principles and Applications
Fig. 7.40 Response of negative edge Fig. 7.41 (a) Logic symbol of positive edge
triggered D flip-flop triggered D flip-flop (b) Logic symbol
of negative edge triggered D flip-flop
7.16 D FLIP-FLOP WITH ASYNCHRONOUS INPUTS
–
In D flip-flop, outputs, Q and Q will depend on synchro-
–
nous input D and outputs Q and Q are synchronised with
clock signal. In asynchronous D flip-flop, asynchronous
inputs can set or reset the flip-flop regardless of D and
clock signal. These inputs are called preset (PRE) and
clear (CLR). Figure 7.42 shows the asynchronous D flip-
flop. When the preset input (PRE) is high and the clear
input (CLR) is low, the D flip-flop will be cleared or
–
reset (Q=0, Q=1) despite the consequences of synchro-
nous inputs or the clock signal. If the preset input (PRE)
is low and the clear input (CLR) is high, the D flip-flop
–
Fig. 7.42 (a) Logic symbol of asynchronous D
will be set (Q=1, Q= 0). Preset (PRE) and clear (CLR)
flip-flop with preset and clear inputs will be used when multiple D flip-flops are con-
(b) Logic symbol asynchronous D nected in a group. Asynchronous inputs may be active-
flip-flop with inverted preset and high or active-low. If inputs are active-low, there will be
clear
an inverting bubble at that input on the block symbol
same as the negative edge-triggered clock inputs.
Flip-Flops 277
Example 7.4 Determine the output waveform of level triggered D flip-flop if the inputs waveform is
shown Fig. 7.43(a) as given below:
Example 7.5 What is race around condition of data transfer using negative edge triggered D flip-
flops? How can it be removed?
� Solution
Figure 7.44 shows the race around condition of data transfer using negative edge triggered D flip-flops. At
the instant of negative edge of the first clock pulse, Q0 becomes high or logic 1 after a propagation delay tPLH.
At the negative edge of the second clock pulse, Q0 becomes logic level 0 after a time delay tPLH. The flip-flop
FF1 is also clocked and its input is 1. Then output of FF1 is Q1=1 which creates a race condition. Actually,
a marginal condition becomes arise as Q0 does not remain in high or logic 1 after the second negative
triggering edge of the clock. Therefore, logic level 1 may not be transferred. To transfer data, Q0 must be
remaining high for time equal to the hold time thold. The data can only be transferred if tPHL> thold. If thold > tPHL,
a unreliable data transfer is created. This condition is known as race around condition of data transfer using
D flip-flops. To remove this condition, the master slave flip-flops will be used.
– –
Q =1. When J=1, K=0, the flip-flop set and the output Q=1 and Q =
0. While both J and K inputs activated (J=1, K=1), the outputs Q and
–
Q will swap states. If the flip-flop is in set state, it will be changed to
reset state. On the other hand, reset flip-flop will be changed to set state.
Therefore, the J-K flip-flop will toggle from a set state to a reset state,
or visa-versa. It is depicted in Table 7.14 that the S-R flip-flop’s invalid
state is eliminated and the additional feature, ability to toggle between
Fig. 7.45 J-K flip-flop the two stable output states is incorporated.
Table 7.14 Truth table of J-K flip-flop
Inputs Outputs –
J K Q Q
0 0 Latch Latch
0 1 0 1
1 0 1 0
1 1 Toggle Toggle
Fig. 7.48 Karnaugh map of Fig. 7.49 (a) Logic symbol of positive edge triggered
J-K flip-flop J-K flip-flop (b) Logic symbol of negative edge
triggered J-K flip-flop
7.17.3 J-K Flip-Flop with Asynchronous Inputs
Asynchronous inputs on a J-K flip-flop have control over
–
the Q and Q outputs. These inputs are called the preset, PRE
and clear, CLR. The preset input drives the flip-flop to a
clear or reset state whereas the clear input drives it to a set
state. Figure 7.50 shows the asynchronous J-K flip-flop. If
the preset input is high and the clear input is low, the J-K
–
flip-flop will be cleared and outputs will be Q= 0 and Q =1
despite the consequences of synchronous inputs and the
clock signal. If the clear input is high and the preset input
–
is low, the J-K flip-flop will be set (Q=1, Q=0). The preset
(PRE) and clear (CLR) inputs will be used when multiple J-
K flip-flops are connected in a group. Asynchronous inputs Fig. 7.50 (a) Logic symbol of asynchro-
may be active-high or active-low. If inputs are active-low, nous J-K flip-flop with reset and clear
(b) Logic symbol of asynchronous J-K
there will be an inverting bubble at that input on the block
flip-flop with inverted reset and clear
symbol just like the negative edge-trigger clock inputs.
7.17.4 J-K Master Slave Flip-Flop
It is clear from Table 7.15 that the flip-flop is disabled when clock (CLK) =0 and flip-flop is active when
clock (CLK) = 1. Figure 7.46 exhibits instability when J=1, K=1 and CLK=1 due to the feedback of the
complementary output signals to input. In this condition the output Q is oscillatory and will stay in this
state until clock changes from 1 to 0. To overcome these difficulties, a J-K master slave flip-flop is used.
In J-K flip-flop, if J=1, K=1, Q=0 and when clock pulse is applied then output Q=1. This change in
output takes place after a propagation delay time tPLH. Now J=1, K=1 and Q=1 and if the clock pulse
is still present, Q changes back to 0. So for the certain duration of the clock pulse tP, the output will
oscillate between 0 and 1. The output Q is ambiguous. This situation is called as race-around condition.
To eliminate the race-around condition, tPHL must be grater than clock pulse tP. Therefore, J-K master
slave flip-flops are introduced to solve this problem.
280 Digital Electronics: Principles and Applications
Figure 7.51 shows the diagram of J-K master slave flip-flop. This is the cascade connection of two
J-K flip-flops. The first flip-flop is called master and other one is called as slave. The master is clocked in
the normal way but the inverted clock is applied to slave. It is assumed that the changes in J and K inputs
does not effect on output when clock is low and master flip-flop is disabled. When the clock changes low
–
to high, the output of master flip-flop (Qm and Q m) changes and these changes are fed to the input of the
–
slave flip-flop. But there is no change at the output of slave flip-flop (Q and Q ) as inverted clock pulse is
–
applied to slave flip-flop. Consequently, feedback inputs Q and Q will not effect due to no change. When
clock changes high to low, master’s output can be transferred to slave flip-flop. Therefore, the output of
slave flip-flop changes by shifting data from maser to slave flip-flop at the end of each clock pulse. The
timing diagram of J-K master slave flip-flop is shown in Fig. 7.52.
Fig. 7.51 J-K Master slave flip-flop Fig. 7.52 Waveform of J-K flip-flop
Example 7.6 Draw the output waveform of J-K master slave flip-flop with the following inputs as
shown Fig. 7.53.
� Solution
Figure 7.54 shows the output waveform of J-K master slave flip-flop, where
–
Qm and Q m are outputs of master flip-flop and slave flip-flops outputs are Q
–
and Q . The master flip-flop is positive edge triggered but the slave flip-flop
Fig. 7.53
is negative edge triggered. Initially, J=1 and K=0 and output of the master
–
flip-flop will be Qm =1 and Q m= 0 just after the positive edge of first clock
pulse. Before the negative edge of first clock pulse, inputs of slave flip-flop
–
are J = Qm =1 and K= Q m= 0. After the negative edge of first clock pulse,
–
outputs of slave flip-flops are Q = 1 and Q = 0. Thus, we can also justify the
other outputs of J-K master slave flip-flop for remaining clock pulses.
Example 7.7 The waveforms as depicted in Fig. 7.61 are applied to a T flip-flop. Draw the output
waveform of the clocked T flip-flop.
� Solution
The output waveform of clocked T flip-flop is shown in Fig. 7.62.
Assume the initial state of T flip-flop Q is 0. During the first clock pulse Fig. 7.61
T=0, then output Q will be 0. At the instant of second clock pulse, T=1,
the output will be the complement of previous state. So, the output Q
is 1. Similarly, we can determine the output of T flip-flop for remaining
clock signal and T input.
Fig. 7.62
Example 7.8 A positive edge triggered T flip flop with PRE and CLR inputs is shown in Fig. 7.63.
Draw the output waveform. Consider initial output is low.
� Solution
� Solution
The truth table of conversion from T flip-flop to J-K flip-flop is shown in Table 7.24. Using this table, the
—
logical expression of T(J, K, Qn) can be derived from K-map as given in Fig. 7.74. Here, T is T(J,K,Qn) = J Qn
—
+ KQn. The implementation conversion of T to J-K flip-flop using logic expression T(J,K,Qn) = JQ n+KQn is
shown in Fig. 7.75.
Propagation Delay Time Propagation delay time means that the required interval times to
change the output after applying the input signal. The performance of flip-flop can be measured by dif-
ferent propagation delays:
Propagation delay tPLH (CLK to Q) is measured from the 50% triggering edge point of the clock pulse
to the 50% transition of the output from Low to High. This time delay is shown in Fig.7.76
Propagation delay tPHL (CLK to Q) is measured from the 50% triggering edge of the clock pulse to the
High to Low transition of the output as depicted in Fig. 7.77.
288 Digital Electronics: Principles and Applications
—––
Propagation dealy tPLH (PRE to Q) is measured from the 50% preset input to the Low to High transition
of th e output. This delay is shown in Fig. 7.78.
Fig. 7.77 Propagation delays tPHL clock to output Fig. 7.78 Propagation delays tPLH preset to
output
— ––
Propagation dealy tPHL (CLR to Q) is measured from the 50% clear input to the High to Low transition
of the output as depicted in Fig. 7.79
Maximum clock frequency ( fmax ) Maximum clock frequency is the highest clock frequency
at which the flip-flop can be triggered. If the clock frequency is above maximum, the flip-flop will not
be able to respond properly.
Setup time (tset up ) Set up time is the minimum time that input signal must be present on input
terminal prior to the triggering edge of the clock pulse as depicted in Fig. 7.80. tset up is approximately
20ns for TTL ICs. Therefore, the input of a D FF must be held constant for at least 20ns before applying
a positive edge-triggering clock into the flip-flop.
Fig. 7.79 Propagation delays tPHL clear to output Fig. 7.80 Set-up time
Hold time (thold ) The hold time is the minimum time interval that signal must remain at the terminal
after the triggering edge of the clock pulse. thold is approximately 5ns. Therefore, the input signal of D
flip-flop will be removed at about 5ns after the positive edge of the clock has applied. Figure.7.81 shows
the hold time of a D flip-flop.
Flip-Flops 289
Power dissipation The power dissipation is one of the important characteristics of flip-
flops. It is actually the total power consumption on the device and measured from P=Vcc Icc. If the
flip-flop operates on a 5V dc supply and draws 25 mA current, the power dissipation will be P=Vcc
Icc=5V×25mA=125mW.
The comparison of operating performance of different flip-flop ICs is given in Table 7.25.
In this section, applications of flip-flop as registers, frequency division, counters, memory and bounce
elimination switch are explained.
7.21.1 Registers
Shift register is one type of sequential logic circuit. This circuit is most commonly used to store digital
data. Shift register can be constructed by a group of flip-flops. The output of one flip-flop is fed to the
next flip-flop as input. A common
clock drives all these flip-flops and
they are set or reset simultaneously.
Therefore, data process sequentially.
There are four basic types of shift
registers namely Serial In - Serial
Out, Serial In - Parallel Out, Parallel
In - Serial Out, and Parallel In -
Parallel Out.
In Serial In - Parallel Out Shift Fig. 7.82 4 bit register using flip-flop
Registers, data bits are entered
serially but the data bits are taken out of the register in parallel. Once the data are stored in the register,
each bit appears on its respective output line, and all bits are available simultaneously. A construction of
a four-bit serial in - parallel out register is shown below.
A 4 bit register using 7474 positive edge triggered flip -flop is shown in Fig.7.82. The bits to be
stored are applied at the D inputs, which are clocked in at the leading edge of the clock pulse. In this
register, the data to be entered must be available in parallel form. The detail operations of registers are
incorporated in next chapter.
7.21.3 Counters
Flip-flops are most commonly used for counting purpose. A 2-bit counter consists of two flip-flops as
shown in Fig. 7.84. The flip-flop used is 74107 J-K master slave flip-flops, which is used as T type. The
pulses to be counted are connected at the clock input of FF0. The Q0 output of FF0 is connected to the
Flip-Flops 291
clock input FF1. The flip-flops are cleared by applying logic 0 at the clear input terminal momentarily.
For normal counting operation, it is to be maintained at logic 1. The pulses and the output waveforms
are depicted in Fig. 7.84.
The output Q0 of the least-significant stage changes at the negative edge of each pulse. The output Q1
changes at the negative edge of each Q0 pulse.
At any time, the decimal equivalent of the binary number Q1 Q0 is the number of pulses counted till
that time. For example, at the count is 01 decimal 1. The circuit resets after counting four pulses. The
different types of counters are discussed extensively in Chapter 8.
7.21.4 Memory
In digital systems, digital data stored and retrieved whenever
required. Flip-flop can be used to store data for any desired length
of time and then read out whenever required. In this memory, data
can be written into memory and data can also be read from memory.
A 1-bit read/write memory is shown in Fig.7.85. It has the three Fig. 7.85 One bit memory cell
terminal namely data inputs D, an Write/Read and an output Q.
In this one bit memory, D Flip Flop has Q Table 7.26 Modes of operation of one bit Memory cell
output that follows the D input when E ter-
minal is at logic 1. When the E input changes Inputs Mode
from logic 1 to logic 0, the Q output does not Write/Read D
change and it is retained though the D input ¥ ¥ Hold, Q=D
changes. Therefore, E enables the memory
1 0 Write 0 into memory, Q=0
cell for reading or writing operation. If E=
1 1 Write 1 into memory, Q=1
Write/Read is at logic 1 writing operation
can be performed. When Write/Read is at 0 ¥ Read , Q
logic 0, reading operation is done. The modes
of operation are given in Table 7.26. The detailed operations of memory are explained in Chapter 12.
nection is not immediate. The switch opens and closes several times before final disconnection. So, it is
virtually impossible to obtain a clean voltage transition from +Vcc to 0V if a mechanical switch position
changes from 1 to 2. The reason for this is the phenomena of contact bounce as shown in Fig. 7.86. It is
clear from Fig. 7.86 that the movement of the switch from contact position 1 to 2 produces several out-
put voltage transitions as the switch bounces many times before coming to rest on contact 2. Generally,
the multiple output voltage transitions will stay on the output for few milliseconds. This type of output
voltage transition is not acceptable in many applications. Therefore, NAND or NOR latch can be used
to prevent the presence of switch bounce.
Fig. 7.86 Contact bounces Fig. 7.87 Contact bounces elimination using S-R latch
Figure 7.87 shows the contact bounce elimination using S-R latch. Initially, consider switch in position
1, S is low and the Q output is low. When switch position moved to position 2, S is high, R is low and the Q
output is high. If the connection with position 2 has been broken due to contact bounce, S is high, R is high.
In this condition, the output voltage Q will not be changed. The converse action takes place when the switch
is moved to position 1. In this way, bounce-elimination circuits can eliminate the contact bounce.
Inputs Outputs
— — –
nSD nRD nCP nD nQ nQ
L H x x H L
H L x x L H
L L x x H H
H H L L H
(a) Individual logic symbol (b) Single block logic symbol
H H H H L
Fig. 7.89 Logic symbol of 7474 duel positive edge triggered
D flip-flop
Fig. 7.93 Pin diagram of 74LS175 Fig. 7.95 Pin diagram of 74LS273
Pin Function
CP Clock pulse input
D 0 D7 Data inputs
——
MR Asynchronous master reset input
Q0 – Q7 Flip-flop outputs
Inputs Outputs
–
CLR CLK J K Q Q
L x x x L H
—
H L L Q0 Q0
H H L H L
Table 7.31 shows the function table of S-R Latch where Q0= the level of Q before the indicated input
conditions were established.
Inputs Output
– –
S R Q
L L H
L H H
H L L
H H Q0
SUMMARY
In this chapter, the basic element of sequential circuits, flip-flops has been introduced as a basic memory element. This
device can be used to store 1 bit of digital information. There are four types of flip-flops, namely S-R, J-K, T type, and
D type. All four flip-flops have been explained in detail, including their design using logic gates. The triggering systems
of flip-flops have also been incorporated in this chapter. Flip-flops are converted from one type to others. Therefore,
conversions of flip-flops are also discussed here. Applications of flip-flops in registers, frequency division, counters,
memory elements, contact bounce elimination, etc. have been included in this chapter.
8. In a clocked S-R flip, R is connected with S through an inverter, the circuit is called
(a) JK flip-flop (b) T flip-flop (c) D flip-flop (d) None of these
–
9. In a J-K flip-flop, if J=K=1 and clock is applied, the output Q will be
(a) 0 (b) No change (c) 1 (d) None of these
10. Race around condition occurs in JK flip-flop if
(a) J=1, K=1 (b) J=0, K=0 (c) J=0, K=1 (d) J=1, K=0
11. In a flip-flop with Preset and Clear terminals,
(a) Preset and clear operation perform separately
(b) In preset operation, clear is disabled
(c) In clear operation, preset is disabled
(d) None of these
12. Master salve is used to
(a) Improve its reliability (c) Eliminate race condition
(b) Reduce power dissipation (d) Increase its clock frequency
13. A transparent latch is a
(a) D flip-flop (b) T flip-flop (c) T or D flip-flop (d) T and D flip-flops
14. The initial output of JK flip-flop Q is 1. It changes to 0, when a clock pulse is applied. The input J
and K will be
(a) J=1, K=1 (b) J=0, K=0 (c) J=0, K=1 (d) J=1, K=0
15. The initial output of JK flip-flop Q is 0. It changes to 1, when a clock pulse is applied. The input J
and K will be
(a) J=1, K=1 (b) J=0, K=0 (c) J=0, K=1 (d) J=1, K=0
16. The initial output of SR flip-flop Q is 0. It changes to 1, when a clock pulse is applied. The input S
and R will be
(a) S=1, R=1 (b) S=0, R=0 (c) S=0, R=1 (d) S=1, R=0
17. The initial output of SR flip-flop Q is 1. It changes to 0, when a clock pulse is applied. The input S
and R will be
(a) S=1, R=1 (b) S=0, R=0 (c) S=0, R=1 (d) S=1, R=0
18. Flip-flops can be used as
(a) Latches (b) Registers (c) Counters (d) All of these
19. The digital memory element consists of
(a) Flip-flops (b) NAND gates (c) NOR gates (d) Shift registers
20. Flip-flops can be used to store
(a) One bit data (b) Two bit data (c) One byte data (d) Two byte data
REVIEW QUESTIONS
7.1 What will be the output of a NAND latch as shown in Fig. 7.13 for the following cases?
(a) S=0, R=1 (b) S=1, R=0;
7.2 Define flip-flop. Explain the principle of operation of SR flip-flop with truth table. Draw the output
waveform of SR flip-flop.
Flip-Flops 299
7.3 Design a SR flip-flops using NOR gates and draw the output waveform. Why S=1 R=1 condition is
invalid in SR flip-flop?
7.4 What is a clocked flip-flop? Explain the principle of operation of clocked SR flip-flop with truth
table. Draw the output waveform.
7.5 Explain the function preset and clear inputs of SR flip-flop.
7.6 Explain the principle of operation of clocked maser slave SR flip-flop with output waveform.
7.7 Draw the circuit diagram of positive edge triggered D flip-flop. Explain its operation using truth
table and waveform. Why is it called as delay flip-flop?
7.8 Explain the principle of operation of clocked T flip-flop with truth table and output waveform. Why
it is called as toggle switch?
7.9 Write the truth table of JK flip-flop and explain the principle of operation of clocked JK flip-flop
with output waveform. What is race condition in flip-flop?
7.10 What will be the state of JK flip-flop in the following cases?
(a) J=1; K=1; Qn=0 (b) J=0; K=1; Clear low
7.11 Explain JK master slave flip-flop with output waveform.
7.12 What are the different forms of triggering in flip-flops? Explain any one with example.
7.13 Difference between level, negative edge tiggered and master slave flip-flop.
7.14 What is the conversion of one type of flip-flop to other type? Explain the following flip-flop conver-
sions
(a) SR to JK (b) JK to SR (c) JK to T (d) JK to D
7.15 Draw the output waveform of a clocked SR latch, when the inputs are as shown in Fig. 7.99.
Fig. 7.99
7.16 What is edge triggering and level triggering? Explain edge triggering SR flip-flop with wave-
forms.
7.17 Draw the output waveform of a clocked D latch, when the inputs are as given in Fig. 7.100
Fig. 7.100
7.18 Draw the output waveform of a clocked T latch, when the inputs are as given in Fig .7.101
300 Digital Electronics: Principles and Applications
Fig. 7.101
7.19 Draw the output waveform of a clocked J K latch, when the inputs are as depicted in Fig. 7.102.
Fig. 7.102
Fig. 7.103
7.22 If the waveforms as shown in Fig. 7.102 is applied to the JK master slave flip-flop as given in Fig.
7.104, draw the output waveform.
Fig. 7.104
7.23 Define D and T flip-flop. Write the truth table and draw waveform. Design the D and T flip-flop
using JK flip flop.
Flip-Flops 301
7.26 Draw the output of flip-flop FF0 and FF1 with respect to clock signal. Assume all Flip-flops are ini-
tially reset. What is the condition for proper operation of the circuit as shown in Fig. 7.106?. How
we remove race around condition of data transfer using negative edge triggered D flip-flops.
Fig. 7.106
7.27 Draw the output of Q0 and Q1 of flip-flop, FF0 and FF1 when the clock signal is applied as per
Fig.7.107. Assume all flip-flops are initially reset.
Fig. 7.107
CHAPTER
8
SEQUENTIAL CIRCUITS
8.1 INTRODUCTION
A sequential circuit consists of memory elements, such as flip-flops and combinational logic circuits.
Figure 8.1 shows the basic block diagram of a sequential circuit. The sequential circuit is a feedback
system as the present state of
the circuit is fed back to the
input decoder and is used to
determine the next state of the
machine. The next state of the
machine can be determined by
the present state of the circuit
and inputs. The input decoder
performs the logic operations
based on the present state of the
circuit and inputs and generates
Fig. 8.1 Basic block diagram of sequential circuit
next state code of the circuit.
Then the next state code is stored in the memory. In sequential circuit, the output depends on the im-
mediate input to the circuit and also the present state of the circuit. The present state of the circuit is also
stored in the memory element.
There are two types of sequential circuits, such as synchronous sequential circuit and asynchronous
sequential circuit. In synchronous sequential circuit, state changes are synchronised to the periodic
clock pulses but state changes of asynchronous sequential circuit are not synchronised with clock signal.
Most commonly used sequential circuits are registers and counters. In this chapter, operating principles
and applications of registers and counters are discussed in detail.
8.2 REGISTER
Registers are digital circuits which are used to store ‘n’ bits information in the same time and each bit
is stored in a flip-flop. Generally, registers are building with D flip-flops. Registers can also be designed
using S-R and J-K flip-flops and presently, they are available in MSI ICs. In a register, data can be entered
in serial form and data can also be output in serial form. Then this register is called as shift-register since
data bits are shifted in the flip-flops with each clock pulse. Data can be shifted either in right direction
or left direction or bi-directional. When the data is shifted from left to right, it is known as right shift
register. If data is shifted right to left, it is called as left shift register. In bi-directional shift register, data
can be shifted either left to right or right to left, depending upon the mode control signal.
Sequential Circuits 303
Example 8.1 Draw the waveform of 4-bit SIPO register, when input data is 1010.
� Solution
The logic symbol of 4-bit SIPO shift register is shown in Fig. 8.14(a). Here serial data input is 1010. Initial
data input is ‘1’, when clock pulse is applied, data ‘1’ is stored in Q0 and other flip-flops are in reset condition.
Sequential Circuits 307
During second clock pulse, input data is ‘0’. Just after application of second clock pulse, Q0 becomes ‘0’ and
previous state of Q0 is shifted to Q1. At this instant Q1=1, and Q2=Q3=0. At the instant of third clock pulse,
input data is 1, so after third clock pulse Q0=1, Q1=0 and Q2=1. Then at fourth clock pulse, input data is 0,
output will be Q0=0, Q1=1, Q2=0 and Q3=1. As it is a four bit register, after the four clock pulse, data input
operation will be completed and data will be available at output terminals. The register output after four clock
pulses is 1010 as shown in Fig. 8.14(b).
8.8 SERIAL IN-SERIAL OUT SHIFT REGISTERS
A basic four-bit serial in –se-
rial out shift register can be con-
structed using four D flip-flops,
as shown in Fig. 8.15. The oper-
ation of the circuit is as follows.
In this shift register, data inputs
serially means one bit at a time
on a single line and data outs in Fig. 8.15 Four bit serial in – serial out shift register using
serial form. When clear input is D flip-flops
low, the register is first cleared
and the output of all four flip-flops will be zero. After that clear
input is in high state and the input data is applied sequentially to
the D input of the first flip-flop (FF0). As soon as clock pulse is
applied, input data has to be transferred to the output of FF0 on
positive edge of clock pulse. If the clock pulse is applied sequen-
tially, one bit is transmitted from left to right on each clock pulse. Fig. 8.16 Data inputs and
Therefore, data is shifted from FF0 to FF1, FF1 to FF2 and FF2 to clock waveform of shift register
FF3 respectively. If a data word to be 1101, after four-clock pulse the least significant bit of the data has
to be shifted through the register from FF0 to FF3 and 1101 data will be stored in register. Accordingly,
the data input operation completes. Timing diagram of shift register output is given in Fig. 8.16.
In order to get the data out of the register, data must be shifted serially and taken out from FF3.
After fourth clock pulse, the least significant bit of the data appears on FF3. When the next clock pulse
is applied, the second bit data comes out on FF3. Similarly, the third bit and fourth bit appear on FF3
sequentially after applying corresponding clock pulses. While the original four bit are being shifted
completely, a new four bit number can be entered in the shift register.
308 Digital Electronics: Principles and Applications
Example 8.2 Draw the waveform of 4- bit register as shown in Fig. 8.19 for four clock pulses, when
input data is 1001. Assume that initially the register content is 0000.
� Solution
Fig. 8.19 Four bit serial in – serial out shift register using D flip-flops
As initially the register content is 0000, Q0=Q1=
Q2= Q3= 0. During first clock pulse, data input is
1. Consequently, after first clock pulse, data ‘1’
is stored in Q0 and other flip-flops are in reset
conditions. At the instant of second clock pulse,
data is 0. Just after application of second clock
pulse, Q0 becomes 0 and Q1=1 as Q0 is shifted to
Q1. Similarly after third clock pulse, Q0=0, Q1=0
and Q2=1. At fourth clock pulse, data is 1, then
output will be Q0=1, Q1=0, Q2=0 and Q3=1. As a
result, after application of four clock pulses, ‘1’
will be output at output data terminal Q3 of shift
Fig. 8.20 Four bit serial in–serial out shift register. Figure 8.20 shows the waveform of 4 -
register using D flip-flops bit register for four clock pulses.
Sequential Circuits 309
Example 8.3 Draw the timing diagram of data output of a four bit shift register with parallel input
data 1011.
� Solution
———
When SHIFT/LOAD is low and clock pulse is applied, the parallel data 1011 are loaded into register. The
output at Q3 is 1. On the second clock pulse, the data ‘1’ at Q2 is shifted into Q3. At third clock pulse, the ‘0’
is shifted into Q3. When the fourth clock pulse is applied, the output at Q3 is 1. Figure 8.25 (b) shows the
timing diagram of PISO shift register.
Fig. 8.25 (a) Block diagram of PISO shift register and (b) Timing diagram of PISO shift register
at output bus as output bus is in high-Z state. Whenever the output is required, output enable (OE) signal
makes low and the flip-flops output available at the output terminals.
H = High voltage level, h = High voltage level one set-up time prior to the low to high CP transition
L = low voltage level, l = Low voltage level one set-up time prior to the low to high CP transition
q, d = lower case letters indicate the state of the referenced input one set-up time prior to the low to
high CP transition
x=don’t care , ↑ = Low to high clock pulse transition
Fig. 8.31 Timing sequences of clear, clear-load, shift-right, shift-left, inhibit and clear of 74194
Table 8.4 Actually, the mode select inputs S1 and S0 select shift
Activity Mode Clock Mux gate left, shift right, and load with enabling multiplexer gates
S1 S0 L, R, and Load respectively. This register has tri-state
Hold 0 0 ↑ Hold outputs. The tri-state buffers must be disabled by S1=1
Shift left 0 1 ↑ L S0=1 to float the I/O bus for use as inputs. A bus is a
Shift right 1 0 ↑ R collection of similar signals. The inputs are applied to A,
Load 1 1 ↑ Load and B through pins QA and QB, and routed to the Load
gate in the multiplexers, and on the D inputs of
the FFs. Data is parallel load on application of a
clock pulse.
When S1=0 S0=0, the hold gate enables a path
from the Q output of the flip-flop back to the hold
gate, to the D input of the same flip-flop. As a
result, the output is continuously re-loaded with
each new clock pulse when S1=0, S0=0. In this
Fig. 8.33 Logical symbol of IC 7491 8 bit shift way, data is hold.
register
To read data from outputs QA and QB, the tri-
state buffers must be enabled by O—E2
— = 0, O—E1
— =0
Table 8.5 and mode S1 S0 = 00, or S1 S0 = 01, or S1 S0 = 10. So that mode
S1
—— ——
S0 OE2 OE1 Tristate gate is anything except load for data output as shown in Table 8.5.
x x x 1 Disable For right shifting operation of data, shift right (SR) input
x x 1 x Disable signal is used. Any data shifted out to the right from stage QA
0 0 0 0 Enable to QB via QA and QB. This output is unaffected by the tri-state
0 1 0 0 Enable
1 0 0 0 Enable buffers. The shift right sequence for S1 S0 = 10 is:
1 1 x x Disable SR → QA → QB
Similarly, the left shift operation of data is possible with
shift left (SL) input signal. Any data shifted out to the left from stage QB to QA via QB and QA. This is
also unaffected by the tri-state buffers. The shift left sequence for S1 S0 = 01 is:
SL → QB → QA
Shifting of data may take place with the tri-state buffers disabled by one of O —E2
— or O —E1
—. During
shifting operation, the register contents outputs will not be accessible. The IC 74ALS299 is universal
shift register with tri-state outputs which is commonly used in digital systems.
In this section, time delay generation, Ring counter, Johnson counter and Serial to parallel converters
are explained.
are very inefficient in terms of state usage. But the most advantage of a Ring counter over a binary
counter is that it is self-decoding.
Johnson Counters In a Johnson counter, inverted output of the last stage flop-flop is fed back
to the input of the first stage flip-flop. Then a unique sequence is
Table 8.7 Counting sequence of
4-bit Johnson counter
generated due to feedback. Table 8.7 shows the sequence table
of four bit Johnson counter. A four bit Johnson counter has eight
Clock Q0 Q1 Q2 Q3
0 0 0 0 0
1 1 0 0 0
2 1 1 0 0
3 1 1 1 0
4 1 1 1 1
5 0 1 1 1
6 0 0 1 1
7 0 0 0 1
Fig. 8.37 Four bit Johnson counter
counting sequence and five bit Johnson counter
has ten counting sequence. Therefore ‘n’ bit/stage
Johnson counter should have a count sequence of
length ‘2n’ and it may be called as mod-2n coun-
ter. These counters are also known as twisted ring
counters. Figure 8.37 shows the circuit diagram of
a four bit Johnson counter. The timing diagram of
four bit Johnson counter is depicted in Fig. 8.38 Fig. 8.38 Waveform of four bit Johnson counter
The disadvantage of this counter is that the maximum available states are not fully utilized and only eight
states out of the sixteen states are being used.
8.14.3 Serial Data to Parallel Data Conversion
Serial data transmission is commonly used to transmit data one digital system to other through single line.
If parallel data transmission is used, eight lines are required for this. The microprocessor or computer-
based systems require parallel data. When these systems communicate with external devices, then these
devices send or receive serial data. Therefore, the commonly required incoming data to be converted
into parallel format. Therefore, serial-to-parallel conversion is required. A Serial In - Parallel Out shift
register can be used in serial-to-parallel conversion.
Example 8.4 Draw the logic circuit and waveform of 5 bit Ring counter
� Solution
The logic circuit diagram
of 5 bit ring counter is
shown in Fig. 8.39 and its
timing diagram is depicted
in Fig. 8.40. Initially, first
D flip-flop FF0 is reset
and rest of the flip-flops
are cleared. So Q0 is 1
Fig. 8.39 Five bit Ring counter and Q1=Q2=Q3=Q4=0 after
318 Digital Electronics: Principles and Applications
8.15 COUNTER
When a group of flip-flops are connected in cascade, the counting operation is performed. Then, this
sequential circuit is most commonly used for counting purpose, and this circuit is called as counter. The
counter is also a memory system as any counter circuit must remember its past states and it possesses
data in memory. In this chapter, the connections of flip-flops to make any type of counter and their
operations have been explained. Counters are mostly used in digital computers, digital telephone and
digital instruments. A number of flip-flops are required for different asynchronous and synchronous
counters, divide by ‘n’ counters, and their connection diagram and the numbers of sequential states are
explained. The design of synchronous counters, cascade counters and self-starting and self-correcting
counters are also discussed in this chapter.
8.16 CLASSIFICATION OF COUNTER
There are several types of counters, which are able to count binary numbers. Counters can be classified
based on application of clock, number of flip-flops (stages) and sequential states. According to
application of clock to flip-flops, counter is divided into two broad categories namely asynchronous
and synchronous counters. As per number of flip-flops (stages) counters are 2 bit, 3 bit, 4 bit and n bit.
Counters can also be used as count up or count down based on sequential states.
Asynchronous (Ripple) Counters In asynchronous counter, the external clock pulse clocks
the first flip-flop. Then, the output of first flip-flop (Q or Q–) is connected as clock of the next flip-flop.
–
Similarly, each successive flip-flop is clocked by the Q or Q of the previous one. All flip-flops do not
change states in exact synchronism with the applied clock pulses. There is some propagation delay between
responses of successive flip-flops. The asynchronous counter is also called as ripple counter due to the
way of flip-flop response one after another in a kind of rippling effect. The maximum clock frequency
of an asynchronous counter decreases with the increase of number of flip-flops or bits. Asynchronous
counter can generate glitches in decoding gates due to propagation delays. Therefore, strobing technique
should be used for eliminating the effects of glitches.
Synchronous Counters In synchronous counter, the clock input terminals of all flip-flops are
commonly connected. Therefore, the same clock pulse simultaneously triggers all flip-flops of the counters
and the problem caused by the flip-flop propagation delay has been eliminated in these counters. For a
synchronous counter, the maximum frequency remains same, regardless of the number of bits.
Count Down Counter Synchronous and asynchronous counters are able to count either in increasing or
decreasing order. In count down counter, the counter value sequentially decreases. In a three stage down counter,
the counting sequence is 7, 6, 5, 4, 3, 2, 1, and 0. This counter can be made by J-K or T or D flip-flops.
Count Up Counter In count up counter, the counter value sequentially increases. The counting sequence of
three-stage counter is 0, 1, 2, 3, 4, 5, 6, and 7. This counter can also be designed by J-K or T or D flip-flops.
Sequential Circuits 319
Fig. 8.47 Timing own counter diagram 2-bit ripple Fig. 8.48 State transition diagram of 2-bit
binary down counter
Table 8.9 State sequence for 2-bit ripple down counter
Clock pulse Q1 Q0
0 1 1
1 1 0
2 0 1
3 0 0
Table 8.10 Truth table of 3-bit clock pulse, is applied, flip-flop FF0 is reset and the output of FF0
ripple up counter changes from 1 to 0. After the second clock pulse, flip-flop FF1 is
State Q2 Q1 Q0 set and the output of FF1 changes from 0 to 1. Then counter output
0 0 0 0 will be 010 as depicted in third row. When the third clock pulse is
1 0 0 1 applied, FF0 flip-flop sets and output becomes 1. At this time, the
2 0 1 0 state of FF1 and FF2 do not change. At that moment, the output of
3 0 1 1 the counter is 011. If the fourth clock pulse is applied, flip-flop FF0
4 1 0 0 resets and the output of FF0 changes from 1 to 0. In this time flip-
5 1 0 1
6 1 1 0 flop FF1 resets and the output of FF1, Q1 will be 0, which changes
7 1 1 1 the flip-flop FF2 to 1.
As soon as the fifth clock pulse given in FF0, the said flip-flop
sets and output Q0 becomes 1, while the output of flip-flop FF1 and FF2 are not affected. After fifth
pulse, the counter output is 101. In the next pulse, flip-flop FF0 resets and flip-flop FF1 and FF2 are set.
During the 7th pulse, all flip-flops, FF0, FF1, and FF2, are set and the counter output will be 111. When
the eighth pulse is applied, all flip-flops are reset and then counter output is 000. In this way, the counter
counts 0 to 7 sequentially.
Fig. 8.54 Waveform of 4-bit Fig. 8.55 State transition diagram of 4-bit ripple up counter
ripple up counter
Table 8.12 Truth table of 4-bit ripple up counter
State Q3 Q2 Q1 Q0
0 0 0 0 0
1 0 0 0 1
2 0 0 1 0
3 0 0 1 1
4 0 1 0 0
5 0 1 0 1
6 0 1 1 0
7 0 1 1 1
8 1 0 0 0
9 1 0 0 1
10 1 0 1 0
11 1 0 1 1
12 1 1 0 0
13 1 1 0 1
14 1 1 1 0
15 1 1 1 1
Fig. 8.61 Timing diagram of decade counter Fig. 8.62 Simultaneous up-down counter
Fig. 8.63 (a) Wave form of four bit up counter and (b) Waveform of four bit down counter
other NAND network into the clock input of FF2. Thus, the counter will count in UP direction. The functional
Table 8.15 Functional table of up counter
table of 3-bit up counter is shown in Table 8.15.
When the control input UP is at 0 and DOWN is at 1,
UP Down State FF2 FF1 FF0 the inverted outputs of FF0 and FF1 are gated into the
1 0 0 0 0 0 clock inputs of FF1 and FF2 respectively. If the flip-flops
1 0 1 0 0 1 are initially reset to 0’s, then the counter will go through
1 0 2 0 1 0 the following sequence as given in Table 8.16 when
1 0 3 0 1 1
1 0 4 1 0 0 clock pulses are applied. Then the counter behaves as
1 0 5 1 0 1 DOWN counter. An asynchronous up-down counter is
1 0 6 1 1 0 slower than an up counter or a down counter because
1 0 7 1 1 1 of the additional propagation delay introduced by the
NAND networks.
Table 8.16 Functional table of down counting
UP Down State FF2 FF1 FF0
0 1 0 0 0 0
0 1 1 1 1 1
0 1 2 1 1 0
0 1 3 1 0 1
0 1 4 1 0 0
0 1 5 0 1 1
0 1 6 0 1 0
0 1 7 0 0 1
Example 8.5 Each flip-flop of a 3-bit asynchronous counter is positive edge triggered and has a
propagation delay of 10µs. Draw the timing diagram of the counter and determine the
delay time of Q2 after 4th clock pulse.
Sequential Circuits 327
� Solution
Figure 8.66 shows the positive edge triggered 3-bit
asynchronous counter and it has propagation delay of 10µs.
Figure 8.67 shows the timing diagram of this counter. The
output Q0 has 10µs delay from clock input and output Q1 has
–
delay 10µs from Q0 and 20 µs from clock. The output Q2 has
–
also 10µs delay from Q1. Therefore Q2 has 30µs delay from
clock.
Fig. 8.66 3 bit asynchronous counter
Example 8.6 How a 4-bit asynchronous counter can count 0000 to 1100?
� Solution
Figure 8.68 shows the 4-bit asynchronous counter to
count 0000 to 1100 and its timing diagram is depicted
in Fig. 8.69. When the counter has reached 1100, the
output of AND gate reset all flip-flops. Therefore, the
counter again starts counting from 0000.
Table 8.20(a) State sequence for 3-bit synchronous rection of the counter. State sequence of 3-
binary up counter bit synchronous up - down counter is given
———
UP/DOWN Clock pulse Q2 Q1 Q0 in Table 8.20 (a) and (b) respectively.
1 0 0 0 0
It is depicted in the sequence table of
1 1 0 0 1
1 2 0 1 0 three bit UP/DOWN synchronous counter
1 3 0 1 1 that Q0 toggles on every clock pulse for
1 4 1 0 0 both the UP and DOWN sequences. In the
1 5 1 0 1 UP counter, Q1 changes state on the next
1 6 1 1 0
1 7 1 1 1
clock pulse when Q0=1. But in the DOWN
counting sequence, Q1 changes state on the
Table 8.20(b) State sequence for 3-bit synchronous
next clock pulse when Q0=0. Q2 changes state
binary down counter
——— on the next clock pulse when Q0=Q1=1 for
UP/DOWN Clock pulse Q2 Q1 Q0
the UP sequence. In the DOWN sequence,
0 0 1 1 1 Q2 changes state on the next clock pulse
0 1 1 1 0
0 2 1 0 1 when Q0=Q1=0. These characteristics can
0 3 1 0 0 be implemented using AND, OR and NOT
0 4 0 1 1 logic gates as given in Fig. 8.79.
0 5 0 1 0
0 6 0 0 1
0 7 0 0 0
sequence. Figure 8.81 shows the 4-bit synchronous Table 8.21 State sequence of a synchronous
decade counter. State sequence of decade counter is decade counter
given in Table 8.21. Clock Pulse Q3 Q2 Q1 Q0
It is very clear form the Table 8.21 that Q0 toggles 0 0 0 0 0
on each clock pulse. Consequently the logic equation 1 0 0 0 1
for J and K inputs of FF0 is J=K=1. When Q0=1 and 2 0 0 1 0
Q3=0, Q1 changes on the next clock pulse every time. 3 0 0 1 1
4 0 1 0 0
So the logic equation for J and K inputs of FF1 is 5 0 1 0 1
–
J=K=Q0 Q3. But Q2 changes on the next clock pulse 6 0 1 1 0
each time when Q0=Q1=1. The logic expression for 7 0 1 1 1
J and K inputs of FF2 is J=K=Q0Q1. Q3 changes 8 1 0 0 0
9 1 0 0 1
on the next clock pulse each time when Q0=1 and
Q3=1 for count 9 and Q0=Q1=Q2=1 for count 7.
Therefore the logic expression for J-K inputs of FF3
is J=K=Q0Q1Q2+Q0Q3. These characteristics can be
implemented by using AND, and AND and OR logic
gates as depicted in Fig. 8.81. The timing diagram of
a synchronous decade counter is shown in Fig. 8.82.
8.27 PROPAGATION DELAY IN
Fig. 8.82 Timing diagram of synchronous
SYNCHRONOUS COUNTER decade counter
The propagation delay of asynchronous counters
has been discussed in Section 8.21. The delay time response of a synchronous counter is the time taken
by one flip-flop to toggle and the time for new logic levels to propagate through AND gate to reach the
J-K inputs of the flip-flops. The total delay time of a synchronous counter can be expressed as
Total delay time = Propagation delay of one flip-flop (tpd) + propagation delay of AND gate (tg)
The propagation delay is always constant and it is independent of the total number of flip-flops.
Usually, it will be much lower than propagation delay in asynchronous counters with the same number
of flip-flops. Hence, the speed of operation of synchronous counters is limited by the propagation delays
of AND gates and a single flip-flop. In a there bit synchronous counter, only one AND gate is used.
Therefore, the maximum clock frequency of a there bit synchronous counter for reliable operation is
1
f max =
t pd + t g
where, tpd is propagation delay and tg is the propagation delay of AND gate.
As all three flip-flops of a there bit synchronous counter are connected to a common clock pulse,
glitches can be avoided completely in this counter.
A four bit synchronous counter is known as synchronous counter with parallel carry. In this counter,
the number of stages is four and the number of AND gates also increases to two along with the number
of inputs for the AND gates. This is the disadvantages of this circuit. Then the maximum clock frequency
of a four bit synchronous counter for reliable operation is
1 1
f max = =
t pd + 2 · t g t pd + (n - 2) · t g
Sequential Circuits 333
where, tpd is propagation delay , tg is the propagation delay of AND gate and n is number of stages
or bits.
For an n bit synchronous counter, the maximum clock frequency can be determined by
1
f max = .
t pd + (n - 2) · t g
For example, in a seven stage synchronous counter, the propagation delay of each flip-flop is 50ns
and propagation delay of AND gate is 10ns, then the maximum clock frequency at which the counter
operate properly is
1 1
f max = = = 50MHz as tpd = 50ns , tg =10ns and n =7.
t pd + (n - 2) · t g 50ns + (7 - 2)10ns
8.28 SYNCHRONOUS COUNTER ICs
The operations of synchronous counters with circuits and waveforms have been explained in previous
sections. Generally, these counters are designed using flip-flops. Presently, some synchronous counters
are available in MSI ICs as shown in Table 8.22. Depending upon the features of counters, ICs are
divided into four different groups A, B, C and D. All these ICs are positive edge triggered and loading,
clearing and change of states take place on the positive edge of input clock pulse. Table 8.22 shows the
synchronous counter ICs and designer should study the manufacturer data sheet of counter ICs before
application of any counter ICs.
Table 8.22 Synchronous counter ICs
IC Numbers Description Features Group
74160 Decade UP counter Synchronous preset and asynchronous clear A
74161 4 bit binary UP counter Synchronous preset and asynchronous clear A
74162 Decade UP counter Synchronous preset and asynchronous clear A
74163 4-bit binary UP counter Synchronous preset and asynchronous clear A
74168 Decade UP/Down counter Synchronous preset and asynchronous clear B
74169 4-bit binary UP counter Synchronous preset and asynchronous clear B
74190 Decade UP/Down counter Synchronous preset and asynchronous clear C
74191 4-bit binary UP counter Synchronous preset and asynchronous clear C
74192 Decade UP/Down counter Synchronous preset and asynchronous clear D
74193 4-bit binary UP counter Synchronous preset and asynchronous clear D
Example 8.7 Figure 8.83 shows the 4-bit synchronous counter. Determine the sequence of counter.
� Solution
Table 8.23 shows the sequence of counter as illustrated in Fig. 8.83.
Example 8.8 The waveform of 3-bit synchronous binary UP/DOWN counter is shown in Fig. 8.84.
Determine the sequence of counter.
� Solution
Table 8.24 shows the sequence of 3-bit synchronous binary UP/DOWN counters.
Table 8.24 State sequence for 3 bit synchronous binary UP/DOWN counters
———
UP/DOWN Clock pulse Q2 Q1 Q0
1 0 0 0 1
1 1 0 1 0
1 2 0 1 1
1 3 1 0 0
0 4 0 1 1
0 5 0 1 0
0 6 0 0 1
0 7 0 0 0
1 8 0 0 1
1 9 0 1 0
1 10 0 1 1
1 11 1 0 0
Example 8.9 The sequence of 3-bit synchronous binary UP/DOWN counter is shown in Table 8.25.
Draw the timing diagram of counter.
Table 8.25 State sequence for 3 bit synchronous UP/DOWN counter
———
UP/DOWN Clock pulse 2
Q1 Q0
1 0 0 0 1
1 1 0 1 0
1 2 0 1 1
1 3 1 0 0
(Contd...)
Sequential Circuits 335
Fig. 8.88 State transition diagram Fig. 8.89 Circuit diagram Fig. 8.90 Waveform of
of mod-3 counter of mod-3 counter mod-3 counter
Fig. 8.92 Circuit diagram of mod-5 counter Fig. 8.93 Waveform of mod-5 counter
Step-3 The unused state of the counter should be tabulated in the present state and the next state
should be initial count value. But, in practice, the unused states of the counter do not shown
in flip-flop excitation table.
Step-4 Select T or D or J-K or R-S flip-flops for
design a counter and find the number of
flip-flops considering the expression 2n ≥
m, where n is the number of flip-flops and
m is the number of counting sequence.
Step-5 Draw the K-maps for all flip-flop inputs.
Step-6 Derive the simplified expression for all
flip-flop inputs. Fig. 8.96 Waveform of mod-12 counter
Step-7 The implementation circuit diagram of
counter with flip-flops and logic gates.
By using above steps, mod-5 synchronous counter and mod-10 synchronous counter design are
explained in this section.
–
Fig. 8.97 (a) K-map for J0= A (b) K-map for K0 ( K0= 1) (c) K-map for J1 (J1= C)
and (d) K-map for K1 (K1= C) (e) K map for J2 (J2=BC) and (f ) K map for K2 (K2=1)
– – – – – – –
Fig. 8.99 (a) K map J0 = Q3 + Q2Q1 and (b) K map K0 = Q3 + Q2Q (c ) K map J1 = Q3Q0 and
– – –
(d) K map K1 = Q3Q0 (e) K map J2 = Q3Q1Q0 and (f) K map K2 = Q3Q1Q
– – –
and (g) K map J3 = Q3Q2Q1Q0 (h) K map K3 = Q2Q1Q0
Fig. 8.101 Cascade connection of mod-4 Fig. 8.102 Waveform of mod-32 counter due connec-
and mod-8 counters tion of mod-4 and mod-8 counters to cascade
Sequential Circuits 341
Synchronous counters can be connected in cascade from. For this count enable (CE) and terminal
count (TC) are used for higher mod counter. Figure 8.103 shows the cascade connection of two mod-
10 counters. When count enable (CE) signal is high, counters start counting. Here, terminal count of
counter -1 is connected to count enable (CE) terminal of counter-2.
When counter-1 does not reach its last count state, the TC signal of counter-1 is low and counter-2 is
inhibited. After completion of first cycle counting of counter-1, TC signal of counter-1 becomes high.
This high enables counter-2 and the counter-2 starts to count and changes to next state. When the first
clock pulse is applied to counter-1, this counter should reaches its last stage of count or terminal count
at 10th clock pulse (CLK10) and counter-2 starts counting from its initial state to next state.
After completion of the second cycle of counter-1, TC of counter -1 is again high and counter-2 is again
enabled and its state changes to next state. This operation continues for ten cycles. After the ten cycle
operations, the counter-2 generates terminal count TC. Therefore, counter-1 generates TC after ten clock
cycles but counter-2 generates TC after 10 × 10=100 clock cycles. In this way, counter-2 will complete one
cycle after 100 clock pulses and the overall mod value of two cascaded Mod-10 counters is 100. This circuit
can be used as frequency divider. When input frequency of clock signal (CLK) is fin, the frequency of TC of
counter-1 is fin/10 and the frequency of TC of counter-2 is fin /100 as shown in Fig. 8.103.
When the mod-10 counters are connected in cascade, the output frequency will be fin/10, where fin is
the input frequency. Figure 8.104 shows the cascade connection of three counters and a 10 MHz clock
frequency has been applied to counter-1. Then output frequencies of three counters are 1 MHz, 100 KHz
and 10 KHz respectively.
Example 8.10 Determine the mod value of counter as shown in Fig. 8.105(a) and (b).
� Solution
(a) The mod value of two cascade counters as shown in Fig. 8.105(a) is 2×10=20
(b) In Fig. 8.105(b), three different counter are connected in cascade. The mod value of three cascade
counters is 10×5×8=400
8.32 PROGRAMMABLE OR PRESETTABLE COUNTERS
Generally the up counters start the count sequence from 000..0, but the down counters start counting from
111…1 state. This is done when all the flip-flops are reset or set after completion of each counting cycle. A
counter can also be made to start counting in any desired state using combinational logic circuits. Programmable
counters have the capability to start counting
from any desired state. The Programmable
counters are known as Presettable counters,
which can be preset to any desired starting
count. Presettable counters are two types, such
as asynchronous presetting and synchronous
presetting counters. Asynchronous presetting
is independent of the clock input, while
synchronous presetting occurs on the active
edge of the clock signal. Figure 8.106 shows a
three bit synchronous presetting counter. In this
counter, apply the desired count value to P2,
P1 and P0 inputs. When the preset load (PL) is
low, the count value is loaded into the counter
flip-flops. After that the preset load (PL) input
becomes high, the NAND gates are disabled
and the counter is free to count input clock
pulses starting from the newly entered count Fig. 8.106 Three bit programmable or presettable
value which has been preset into the flip-flops. counter
Most commonly used Presettable counters ICs
are 74ALS190, 74ALS191, 74ALS192, 74ALS193, 74HC190, 74HC191, 74HC192 and 74HC193.
8.33 SELF STARTING AND SELF CORRECTING COUNTERS
The counter already explained in
previous sections always starts
counting sequence from either
000 or 111. In real working en-
vironment, we can not able to
assume that the counter will al-
ways start from this predefined
count value. As soon as the power
switch is ON, the states of the flip-
flops is undefined, they will be set
or reset at random. Therefore, the
counter should not be able to start Fig. 8.107 (a) State transition diagram of self-start counter and
from any predefined state and the (b) State transition diagram of self-start counter
Sequential Circuits 343
counting states will not be correct. This problem can be eliminated by self starting and self correcting
counters.
In any mod-n counter, all possible states are not present but only required states are present. But in a self-
starting counter
each possible
state are present
through some
states which
–– –– –– are not desired
Fig. 8.108 (a) K map for (D0 = A B + BC + C A ) and (b) K map for
–– – – –
(D1 = A B C + A BC ) and (c) K map for D3 = (D3 = A BC + ABC )
–– count sequence.
The self-start-
ing and self-correcting counters should have a sequence of transitions that eventually leads to a valid counter
state. It is not a matter how the counter starts up, but it eventually enters the proper counter sequence after very
short time.
Figure 8.107(a) shows the state transition diagram of a typical self-starting counter. In this state
transition diagram, the counter should be in sequence after one transition. Fig. 8.107(b) shows the
alternative state transition diagram. In this diagram, counter may require either two transitions or one
transition before entering into the correct sequence. During design, it is necessary to select the counter
sequence as few transitions as possible. Therefore, Fig. 8.107(a) is used for hardware implementation.
As shown in Fig. 8.107(a), the counting sequence is 000→001→011→100→101→000. If at starting
initial count value is either 111 or 110 or 010, then self correcting capability has been added after
incorporating the unused states in counter design. If present state is 111 or 110 then, next transition will
be 000. When present state is 010 then next state transition is 011. When this counter is designed with
D flip-flops, the excitation of D
flip-fops will be the next state.
Flip-flops excitation for self-
start counter is given in Table
8.32. The state transition Table
8.32 is represented by K-maps as
shown in Fig. 8.108(a), (b) and
(c). The excitation function of D
–– – –
flip-flops are D0 = A B + B C +
–– –– – –
A C , D1 = A B C + A BC , and D3 =
– ––
A BC + AB C where A=Q2, B=Q1,
C=Q0. The implementation of
the self-start and self-correcting
counter is shown in Fig. 8.109.
Fig. 8.109 Self-starting counter
In some applications of coun-
ters, self initialisation is an
advantage. It eliminates the need for complex initialisation and guarantees the return to the original state
sequence after a temporary wrong state. The low operating frequency and large areas of the available self-
correcting counters have limitations. Due to the additional hardware required to change state transitions,
the final circuit tends to be slow and large. The self-starting and self-correcting counters have maximum
10 stages.
344 Digital Electronics: Principles and Applications
The counter starts counting at t1 time and the counter stops counting at t2. Thus, the counter counts
the number of pulses that occur during the sampling interval. This is a direct measure of the frequency
of the pulse waveform. Usually, the counter is made by cascaded BCD counters, the decoder and seven
segment display units. The decoder converts the BCD outputs into seven segment form and display in
Sequential Circuits 345
power frequency is uses as the basic clock frequency. In both case, the basic frequency has to be divided
down to a frequency of 1 Hz or pulse of 1 second (pps). The basic block diagram for a digital clock is
shown in Fig. 8.114.
The 50 Hz signal is passes through a pulse shaper circuit to produce square pulses at the rate of
50 pps. Then, 50 pps square waveform is fed into a MOD-50 counter to generate a 1 pps signal. The
1-pps signal is then fed into the SECONDS section. In this section, BCD and MOD-6 counters are
used to count seconds and display seconds from 00 to 59. After counting 60 seconds, the MOD-6
counter generates 1 pulse/minutes and again starts second cycle counting. In minutes section, BCD
and MOD-6 counters are used to count minutes and display seconds from 00 to 59. After counting 60
minutes, MOD-6 counter of minute section sends a pulse, i.e., 1pulse/hour to the hour section. The
Hour section BCD and MOD-2 counters count hours and display 00 to 12. After complete one cycle
operation, the next cycle operation will be started. Hence, Hours, Minutes and Seconds are displayed
in Hour section, Minutes section and Seconds section respectively.
SUMMARY
Shift registers are storage devices and used for storing binary data. JK, D and SR flip-flops can construct shift registers.
In shift register, several flip-flops can be cascaded together and are driven by a common clock. In ‘n’ bit shift register,
‘n’ flip-flops are required. In this chapter, four basic types of shift registers: Serial In-Parallel Out, Serial In- Serial Out,
Parallel In-Parallel Out, Serial In- Parallel Out are discussed with examples and ICs. A bi-directional shift register can
move data internally in either left or right direction. In a universal shift register, data can be entered/loaded in serial
and parallel, and data can also be out in serial and parallel. The bi-directional and universal shift register ICs are also
incorporated in this chapter. The Ring and Johnson shift counters are two specialized shift registers used to create
sequential outputs. The Ring counter has ‘n’ states in its sequence but the Johnson counter has ‘2n’ states, where n is
the number of stages.
Counter is a sequential circuit and it can be developed by using flip-flops. Generally, counter has a 2n counter states,
where ‘n’ is the number of flip-flops used in the counter. Counter of any value can be designed by skipping some states
from the natural count. For this feedback signals are taken from some flip-flops and then reset or clear all flip-flops.
In this chapter, operations of asynchronous (ripple) and synchronous counters are explained in detail. The design of
synchronous counters, mod-n counters, and cascade connection of counter are also incorporated. Some asynchronous
and synchronous counters ICs are also included for practical implementation. Cascaded counters, programmable
counters, self-starting and self-correcting counters and applications of counters are also discussed in this chapter.
Fig. 8.115
32. The preset input of a 4-bit preset able UP counter has 1010. The modulus of this counter is
(a) 5 (b) 10 (c) 11 (d) 15
33. The preset input of a 4-bit preset able DOWN counter has 1001. The modulus of this counter is
(a) 11 (b) 10 (c) 9 (d) 8
34. If 100KHz clock pulse is applied to mod-2 counter, the output frequency of symmetrical square
wave will be
(a) 200KHz (b) 100KHz (c) 50KHz (d) None of these
35. If time period of input clock pulse is 10µs, 50µs times period symmetrical square wave can be
generated from
(a) divide by 5
(b) divide by 10
(c) 3-bit binary counter
(d) cascade connection of mod-2 and mod-5
36. The waveforms of a counter are shown in Fig. 8.116. This is a
(a) Asynchronous counter (b) Johnson counter
(c) Ring (d) None of these
Fig. 8.116
Fig. 8.117
REVIEW QUESTIONS
8.1 What is shift register? What are the types of registers? Explain any one-shift register with example.
8.2 Explain the operation of bi-directional shift register with circuit diagram and waveforms.
8.3 What is universal register? Explain its operation.
8.4 Explain the operation of Ring counter with state diagram and waveforms.
8.5 Explain the operation of Johnson counter with state diagram and waveforms. What is difference
between Johnson and Ring counter.
8.6 Write the applications of shift register briefly.
8.7 What is serial data transfer and parallel data transfer? Explain the serial to parallel and parallel to
serial data conversion with circuit diagram.
8.8 Explain the operation of four stages and five stages twisted ring counter with circuit diagram, truth
table and timing diagram.
8.9 Draw the waveforms to enter a serial data 11101into a SIPO shift register.
8.10 Draw the logic circuit diagram of universal shift register and explain its operation with functional
table.
8.11 What is the largest hexadecimal number that can be stored in a ten flip-flops shift register?. Draw a
PIPO shift register which consists of six flip-flops.
8.12 Draw a logic circuit diagram of shift register to produce a 50µs delay and explain briefly.
8.13 Draw the waveform for 4-bit SIPO shift register as shown in Fig .8.118, when data input is 1101.
Fig. 8.118
352 Digital Electronics: Principles and Applications
— ——
8.14 Draw the timing diagram of the shift register as shown in Fig. 8.119, when LEF T /RIGHT signal is
low for three clock pulses and high for three clock pulses. Consider QA=1, QB=0, and QC=1.
Fig. 8.119
8.15 Draw the output waveform of SISO shift register as shown in Fig. 8.120, serial data 10101011 ap-
plied in A and B is high.
Fig. 8.120
8.16 Show the timing diagram of 4-bit PISO shift register as depicted in Fig. 8.121, if input data is
1101.
Fig. 8.121
8.17 Explain the operation of counter circuit as shown in Fig. 8.122 with truth table and timing dia-
gram.
Fig. 8.122
Sequential Circuits 353
8.18 Explain the operation of counter circuit as shown in Fig. 8.123 with truth table and timing dia-
gram.
Fig. 8.123
8.19 Draw the logic circuit diagram of a ten bit Ring counter. Show the timing diagram and explain
briefly.
8.20 Figure 8.124 shows the logic diagram of 74194. Explain how it will be used in (i) Serial Input Paral-
lel Output (ii) Parallel In Parallel Out (iii) shift left and (iv) shift right operation.
Fig. 8.124
Fig. 8.125
8.26 Design a 4-bit asynchronous decade counter and draw the timing diagram.
8.27 Draw a logic diagram of 4-bit ripple counter and explain its operation with timing diagram and
sequence table. What modification is required to use as a decade counter.?
8.28 Figure 8.126 shows a asynchronous counter. Draw the waveform of output Q0, Q1 and Q2 outputs
with respect to clock.
Fig. 8.126
8.35 Figure 8.127 shows a synchronous counter. Draw the timing diagram for first eight clock pulses.
Fig. 8.127
8.36 Design a 4-bit synchronous decade counter and draw the timing diagram.
8.37 Design a 4-bit synchronous decade counter to count Excess-3 code sequence.
8.38 Design a synchronous decade counter using 74160.
8.39 Define mod ‘n’ counter. Design the following mod counters
(a) mod-5 (b) mod-10 (c) mod-15 (d) mod-12
8.40 Design a counter using JK flip-flops to generate the sequence as shown in Table 8.33.
Table 8.33
Clock pulse Q3 Q2 Q1 Q0
0 0 0 0 1
1 0 0 1 0
2 0 1 0 0
3 1 0 0 0
8.41 Determine the overall modulus of cascade connection of counters as given in (a), (b) & (c ) and also
determine the output frequency. Consider clock frequency is 10KHz
8.42 What is the difference between register and counter? Explain how shift register can be used as a
counter.
8.43 Design a synchronous mod-6 counter using JK flip-flops and draw the timing diagram of this coun-
ter.
8.44 Design the following synchronous counter
(a) divide by 7, (b) divide by 9, (c) divide by 11
8.45 A synchronous counter using JK flip-flops has the following connections
–
(i) In FF0, J = K = HIGH (ii) In FF1, J = K = Q0Q 3
(iii) In FF2, J = K = Q0 Q1 (iv) In FF3, J = K = Q0 Q1 Q2 + Q0Q3
Draw the above synchronous counter and determine its modulus and the count sequence.
CHAPTER
9
SEQUENTIAL
CIRCUITS DESIGN
9.1 INTRODUCTION
The combinational logic circuits are a part of digital systems and they have many applications such
as decoder, encoder, adder, subtracter, multiplexer, demultiplexer, etc. But when the circuit output not
only depends on the present state but also the previous state, the circuit is known as sequential logic
circuit. Any sequential circuit consists of a combinational logic circuit and memory elements. The
output of combinational logic circuit is stored in memory elements. Memory elements output feedback
into combinational logic circuit and used as input variables. The output of combinational logic circuit
depends upon the external inputs and input from memory elements. A memory element is a device
which can store information in terms of ‘1’ or ‘0’ and its state can be modified by clock signal and data
inputs. A flip-flop is an one bit memory element, which can store ‘1’ or ‘0’. To store ‘n’ bit information,
‘n’ flip-flops are required. Generally, J-K, D and T flip-flops are used in memory elements. In this
chapter, different kinds of sequential logic circuits: synchronous sequential circuits and asynchronous
sequential circuits are discussed.
In fact, a sequential logic circuit is one way of building block of a sequential machine. In any
sequential machine, the output not only depends on the present input to the machine, but also it always
depends on the previous condition of the machine. Sequential machines can be considered as machines,
which have a well organised set of conditions. The conditions are called as states. Therefore, sequential
machines are also called as state machines. The transitions of the machine from one state to the next are
most frequently driven by a clock signal. When the machine is driven by clock signal, it is known as a
synchronous machine. If the machine is not clocked driven, the transitions from one state to the next
state can be decided by the change in input to the machine and it is known as asynchronous machine. As
input changes sequentially, the output of sequential machines may be repeated cyclically through a finite
set of states. Consequently, sequential machines are also called as finite state machines.
A finite state machine is the most general type of digital circuit whose outputs depend upon both
on the present input signals and on the previous input signals. Though the previous inputs of a finite
state machine control the present outputs indirectly by determining the internal state of the machine.
The internal state and the present inputs find out the present output signals. The examples of finite state
machines are latches and flip-flops, which are the simplest types of finite state machines and counters.
The sequential circuits have many applications in digital system design which consists of combinational
Sequential Circuits Design 357
logic circuits as well as memory elements. Any logic family can be used in combinational logic circuit
and the memory element may be either D flip-flops or J-K flip-flops or T flip-flops. Generally, J-K flip-
flops are used for simpler circuit implementation. In this chapter, the design procedure of sequential
circuits has been discussed with examples.
9.2 SEQUENTIAL CIRCUIT MODEL
Figure 9.1 shows the model for a general sequential circuit which consists of combinational logic circuit
and memory elements. The combinational logic circuit has ‘n’ inputs I1 – In and ‘m’ outputs O1-Om. The
edge triggered flip-flops are used in memory elements. This sequential circuit is driven by a clock signal
and the output can be changed on either positive or negative edge of the clock pulse only.
When a sequential circuit is driven by a clock signal, it is called as synchronous sequential circuit. If
the circuit perform operations with out a clock signal, it is known as asynchronous sequential circuit.
This circuit can also be classified depending on the effect of the present inputs on the present outputs,
such as Moore machine and Melay machine. In Moore machine, the outputs depend directly only on
the state information. But in Melay machine, the outputs directly depend both on the preset inputs
and on the state information. Based on presence or absence of clock, the Moore machine is classified
as synchronous and asynchronous Moore machine. Similarly, the Melay machine is also classified as
synchronous and asynchronous Melay machine.
The behaviour of Moore machine is defined by the equations
Next state = F (Present state, Inputs)
Output = G (Present state)
The configuration of
synchronous and asyn-
chronous Moore machine
is shown in Fig. 9.2 and
Fig. 9.3 respectively. Sim-
ilarly, the behaviour of
Mealy machine is defined Fig. 9.2 Synchronous Moore machine
by the following equa-
tions.
Next state = F (Present state, Inputs)
Output = G (Present state, inputs)
The general structures of synchronous and asyn-
chronous Melay machine are shown in Fig. 9.4 and 9.5 Fig. 9.3 Asynchronous Moore machine
respectively.
Block Diagram and Timing Diagram of Sequential Circuit After the detailed
study of the problem specification, designer should construct a block diagram showing all the inputs
and the required outputs. In addition, draw a timing diagram of sequential circuit which represents the
outputs of the specified problem.
The State Diagram The verbal statements of the problem should be expressed in terms of the
internal states of the circuit and draw a state diagram representing all internal states. There are no defined
rules for constructing state diagrams, but it is the ability of the designer which can only be acquired by
experience. For example, we assume the following verbal statements of the problem:
“A sequential logic circuit receives input data serially on an input line. The input data is synchronised
with an external clock signal. When the following combinations 010, 011, 110 and 111 are detected, a 1
will appear at the output. The output must occur when the third bit of the string is present and the third
clock pulse is high”.
Generally, the innovative and inexperienced designer can develop the tree-like structure of the states
as shown in Fig.9.7. Here, the method of approach is that the designer selected a state S0 arbitrarily.
This internal state of the circuit may have a pair of transition paths: one in the left side and other in the
right side. The left side movement or right side movement is selected by the transition signal X. When
the transition signal X=1, internal state change from S0 to S1. If the transition signal X=0, internal state
change from S0 to S2.
Again each of the states S1 and S2 may have a pair of transition paths: one in the left side and other in
the right side. Depending upon the value of the transition signal X, there will be four paths lead to the
four different states S3, S4, S5 and S6 as depicted in Fig. 9.7. In the same way, each of these four states
S3, S4, S5 and S6 has two different paths, but the next transition is that all left and right exist paths return
back to the starting state.
The combinations 111 and 110 follow the path S0 S1 S3 S0 through the state diagram as shown in Fig. 9.7
and the output O=1 in state S3. In the same way, the combinations 010 and 011 follow the path S0 S2 S5 S0
through the state diagram and the output O=1 in the state S5. Then remaining two paths of the state diagram
are related with those combinations which are not required to detect.
State Table Corresponding to the state diagram as shown in Fig. 9.7, the state table is developed
and it is depicted in Table 9.4. In this table, each row represents the state of the circuit and each column
stands for every combination of the input signals. Here, there is only one input signal X. Therefore, there
are only two columns in the next state: one for X = 1 and other for X = 0. The next state of the circuit is
Sequential Circuits Design 363
Table 9.4 State table of Fig. 9.7 Table 9.5 Reduced state table
Present Next state Present Next state
state X=0 X=1 state X= 0 X=1
S0 S2 S1 S0 S2 S1
Output O = 0 Output O = 0 Output O = 0 Output O = 0
S1 S4 S3 S1 S46 S35
Output O = 0 Output O = 0 Output O = 0 Output O = 0
S2 S6 S5 S2 S46 S35
Output O = 0 Output O = 0 Output O = 0 Output O = 0
S3 S0 S0 S35 S0 S0
Output O = 1 Output O = 1 Output O = 1 Output O = 1
S4 S0 S0 S46 S0 S0
Output O = 0 Output O = 0 Output O = 0 Output O = 0
S5 S0 S0 entered in the each of the cells which are produced by the
Output O = 1 Output O = 1
intersection of the rows and columns. The output O of
S6 S0 S0
Output O = 0 Output O = 0
each state is also entered into the cell. For example, when
X = 0 and present is S0, the next state is S2 and output is
0. Similarly, if X = 1 when present state is S0, the next state is S1 and output is 0. In the same way, other
states and outputs are entered in the cells.
State Reduction When large numbers of states are present in the state diagram, the more hardware
is required for the circuit implementation. Therefore, it is required to reduce the number of states if pos-
Table 9.6 Minimal state table sible. The process of the state reduction in sequential
Present Next state circuit design means that the process which can be used
state X=0 X=1 to minimise the combinational logic circuit design.
S0 S12 S12 Usually, the state reduction is done by using Caldwell’s
Output O = 0 Output O = 0 merging procedure which depends upon two equivalent
S12 S46 S35 states. Equivalence of states can be defined by the fol-
Output O = 0 Output O = 0 lowing statements:
S35 S0 S0 “Two states Sp and Sq are equivalent if both have
Output O = 1 Output O = 1
the same next states and both have equal outputs”. It is
S46 S0 S0
Output O = 0 Output O = 0 depicted in Table 9.4 that the rows headed S4 and S6 and
the rows headed S3 and S5 satisfy the above definition
of equivalence of states. Consequently, states S4 and S6
have been merged, the state formed is represented by S46. Whenever
S4 and S6 appear in the table, they are replaced by S46. In the same
way, S3 and S5 are merged and from an equivalent state S35 which
replaces S3 and S5 wherever S3 and S5 appear in the state table. The
reduced state table is shown in Table 9.5. After getting the reduced
table, the designer should try to find out the minimal state table.
For this, again use Caldwell’s merging procedure in the reduced
stable table. It is clear from Table 9.5 that the two rows S1 and S2
are equivalent and can be merged to form the equivalent S12. Then
S12 replaces S1 and S2 wherever S1 and S2 appear in Table 9.6. After
Fig. 9.8 Reduced state diagram that no further reduction is possible. Then the reduced state diagram
can be constructed from the minimal reduced state table. Figure 9.8 shows the reduced state diagram.
364 Digital Electronics: Principles and Applications
State Assignment After getting the minimum state table, the next step is that the designer should
choose secondary variables properly to locate the variables states. The required numbers of secondary
variables are determined by the total number of states in the reduced state diagram. It is depicted in Fig. 9.8
that there are four states. Therefore, two secondary variables are required to define each state uniquely.
The number of secondary variables which are used to define all states of reduced state diagram is
equal to the number of flip-flops required to implement the sequential circuit. As there are four states
and two secondary variables A and B are required to describe all four states, only two flip-flops are
required to implement the circuit.
Table 9.7 Revised state table of state diagram
Revised State Table Table 9.7 shows
Present Next State Flip-Flop inputs Output
the revised state table of reduced state diagram
state X = 0 X = 1 X=0 X=1 O
as shown in Fig. 9.8 in terms of the secondary AB AB AB D1 D 0 D1 D0
variables A and B. In this table, every possible
00 01 01 0 1 0 1 0
transition of the secondary variables for both 01 10 11 1 0 1 1 0
X = 0 and X = 1 is presented. 10 00 00 0 0 0 0 0
11 00 00 0 0 0 0 1
Flip-Flop Selection To implement the
sequential circuit, the designer should choose any one of the following flip-flops: D, J-K and T flip-flops.
Here, D flip-flops have been selected to implement the next state equations.
The Next State Equations To determine the next state equations, initially we represent the
required inputs of D flip-flops for every transition in the state table. After that, the D-inputs for the
various transitions are mapped on the K - map and find the simplified boolean functions. Figures 9.9(a)
and.9.9(b) show the K-map of D1 and D0 flip-flops respectively. From the K-map for D1 and D0, the next
state equations are derived as follows:
(a) (b)
– –– –
Fig. 9.9 (a) Three variables K-map D1 = A B (b) Three variables K-map D0 = A B + XA
– – –– –
D1 = A B D1 = A B D0 = A B + XA
Example 9.1 Design a sequential circuit (finite state machine) for Table 9.8 using D flip-flops.
Assume two inputs are A and B, outputs of the sequential circuit are outputs of D
flip-flops, present state =S, Next State=S*. Consider the four states of the sequential
circuit are S0=00, S1=01, S2=10 and S3=11.
Table 9.8
� Solution
After substituting the following four states S0→00, S1→01, S2→10, and S3→11 in Inputs (AB)
Table 9.8, we get the state transition Table 9.9. As the state information is two bits, Present 00 01 10 11
two flip-flops are required. Q1 and Q0 are the output signals of two flip-flops. Then state (S)
present state of flip-flops are Q1 and Q0 and the next state of flip-flops are Q1* and S0 S1 S0 S0 S1
Q0*. When the memory element of the sequential circuit (finite state machine) is S1 S2 S0 S0 S2
implemented with D-type flip-flops, then the excitation table of the D flip-flops is S2 S3 S0 S0 S3
shown in Table 9.10. S3 S1 S0 S0 S1
Next State (S*)
Table 9.9 The state transition table Table 9.10 The excitation table of D flip-flops
Inputs (AB) Inputs (AB)
Present state 00 01 10 11 Present state 00 01 10 11
(Q1Q0) (Q1Q0)
00 01 00 00 01 00 01 00 00 01
01 10 00 00 10 01 10 00 00 10
10 11 00 00 11 10 11 00 00 11
11 01 00 00 01 11 01 00 00 01
Next State (Q1* Q0*) Inputs of flip-flops D1 D0
Two K-maps can be drawn from the excitation Table 9.10. Figure 9.11 shows the K-map for D1 and D0.
Based on the K-map as shown in Fig. 9.11, the following excitation equations can be derived.
Example 9.2 The state diagram of a sequential circuit is given in Fig. 9.13. Draw the state table for
Fig. 9.13. Assume two inputs are A and B, output is O.
Table 9.11 State table Table 9.12 State table with output
Inputs (AB) Inputs (AB)
Present state 00 01 10 11 Present state 00 01 10 11
(S) (Q1Q0)
S0 S1 S0 S0 S1 00 01/1 00/1 00/1 01/1
S1 S2 S0 S0 S2 01 10/0 00/0 00/0 10/0
S2 S3 S0 S0 S3 10 11/0 00/0 00/0 11/0
S3 S1 S0 S0 S1 11 01/1 00/1 00/1 01/1
Next State ( S*) Next State (Q1* Q0*)/Output(O)
Sequential Circuits Design 367
Example 9.3 Design a sequential circuit for the state Table 9.13 using D flip-flops. Assume two
inputs are A and B, output of the sequential circuit is O, present state of D flip-flops
= Q1 Q0, Next State of D flip-flops = (Q1* Q0*).
Table 9.13
Inputs (AB)
Present 00 01 10 11
state(Q1Q0)
00 01/0 00/0 00/0 01/0
01 10/1 00/1 00/1 10/1
10 11/0 00/0 00/0 11/0
11 01/1 00/1 00/1 01/1
Next State (Q1* Q0*)/Output(O)
� Solution
As the memory element of the sequential circuit is implemented with D-type flip-flops, then the excitation table
of the D flip-flops is given in Table 9.14. The K-map for D1 and D0 is shown in Fig. 9.11. Based on the K-map
as shown in Fig. 9.11, the excitation equations of D1 and D0 flip-flops can be derived as given below:
—–– — –– — — –——
D1 = Q1* = QQ0A B + Q1Q0A B + Q1Q0AB + Q1Q0AB = (A B ) (Q1 Q0)
–– ––— — –—— –
D0 = Q0* = A B Q1 + ABQ1 + A B Q0 + ABQ0 = (A B ) (Q1 + Q0)
As output depends on the current state only, this sequential circuit is a synchronous Moore machine. The
—
output function O can be easily determined as Q1Q0 + Q1Q0. The implementation of the sequential circuit
using D flip-flops and combinational logic circuit elements is shown in Fig. 9.14.
Table 9.14 The excitation table of D flip-flops
Inputs (AB)
Present state 00 01 10 11
(Q1Q0)
00 01/0 00/0 00/0 01/0
01 10/1 00/1 00/1 10/1
10 11/0 00/0 00/0 11/0
11 01/1 00/1 00/1 01/1
Inputs of flip-flops (D1 D0 )/ Output(O)
Example 9.4 Design a finite state machine for the state Table 9.15 using T flip-flops.
� Solution Table 9.15 The state table
When Table 9.15 is implemented by T flip-flops instead of Inputs (AB)
D flip-flops, the excitation table will be different. Table 9.16 Present state 00 01 10 11
shows the excitation table when the finite state machine is (Q1Q0)
implemented by using two T flip-flops. Construct the K- 00 01 00 00 01
map for the excitation Table 9.16 and derive the minimised 01 10 00 00 10
10 11 00 00 11
boolean function from the K-map as shown in Fig. 9.15. The
11 01 00 00 01
minimised Boolean excitation functions of T flip-flops are Next State (Q1* Q0*)
as follows:
–– – – Table 9.16 The excitation table of T
T1= Q1Q0 + A B Q0 + A BQ1 + ABQ0 + AB Q1 flip-flops
––
= Q1Q0 + A B Q0 + (A B)Q1 + ABQ0
— – – — –– — — — – – Inputs (AB)
T0= Q1Q0 + A B Q 1 + A B Q 0 + ABQ 1 + ABQ 0 + A BQ0 + AB Q0 Present state 00 01 10 11
— ––— — –– — — – –
= Q1Q0 + A B Q 1 + ABQ 1 + A B Q 0 + ABQ 0 + A BQ0 + AB Q0 (Q Q )
— –– — –– — – – 1 0
= Q1Q0 + (A B + AB)Q 1 + (A B + AB)Q 0 + (A B + AB )Q0 00 01 00 00 01
— –—— — –—— —
= Q1Q0 + (A B ) Q 1 + (A B ) Q 0 + (A B)Q0 01 11 01 01 11
— –—— — —
= Q1Q0 + (A B ) (Q 1 + Q 0) + (A B)Q0 10 01 10 10 01
The implementation of the sequential circuit using T flip-flops 11 10 11 11 10
Inputs of Flip-flops T1 T0
and combinational logic circuit elements is shown in Fig. 9.16.
Example 9.5 Design a finite state machine for the state Table 9.17 using J-K flip-flops.
� Solution
When J-K flip flops are used to implement the Table 9.17, the excitation table consists of four bits in each
cell as there are two inputs of each J-K flip-flops. Table 9.18 shows the excitation table when the finite state
machine is implemented by using two J-K flip-flops. Construct the K-map for the excitation table as shown
in Fig. 9.17 and derive the minimised excitation function. The excitation functions of the sequential circuit
are as follows:
–——
J1 = A B Q0 K1 = (A B) + Q0
–—— —
J0 = (A B ) K0 = A B + Q1
The implementation of the sequential circuit using J-K flip-flops and combinational logic circuit elements
is shown in Fig. 9.18.
Table 9.17 The state table Table 9.18 The excitation table of JK flip-flops
Example 9.6 Design a up-down counter for the State diagram 9.19 using T-flip-flops. Assume ‘En’
stands for counter enable and ‘dir’ represents direction of up-down counter. Consider
four states S0=00, S1=01, S2=10 and S3=11 and two outputs O1 and O0.
Fig. 9.19
� Solution
Consider A=‘En’ stands for counter enable and B=‘dir’ represents direction of up-down counter. The memory
element of sequential circuit consists of two T flip-flops and the sate transition table is given in Table 9.19.
The excitation Table is illustrated in Table 9.20. The K-map for the excitation table is shown in Fig. 9.20.
Then the excitation functions are as follows
–— –—
T1 = ABQ0 + AB Q0 = A(BQ0 + B Q0) = A B Q0
T0 = A
Based on the output table as given in Table 9.21, the output functions are
O1 = AQ1
O0 = AQ0
The implementation of the sequential circuit using T-flip-flops and combinational logic circuit elements is
shown in Fig. 9.21.
Sequential Circuits Design 371
Table 9.19 The state table Table 9.20 The excitation table of T-flip-flops
Inputs (AB) Inputs (AB)
Present state 00 01 10 11
Present state (Q1Q0) 00 01 10 11
(Q1Q0)
00 00 00 11 01 00 00 00 11 01
01 01 01 00 10 01 00 00 01 11
10 10 10 01 11 10 00 00 11 01
11 11 11 10 00
Next State (Q1* Q0*) 11 00 00 01 11
Inputs of flip-flops T1 T0
Example 9.7 Implement the State Table 9.22 using D flip flops
Table 9.22
Present Next state Flip-flop inputs Output
state X=0 X=1 X=0 X=1
AB AB AB D1 D0 D1 D0 O
00 01 01 0 1 0 1 1
01 10 11 1 0 1 1 1
10 00 00 0 0 0 0 1
11 00 00 0 0 0 0 0
372 Digital Electronics: Principles and Applications
� Solution
Initially we construct the K-map of Table 9.22 and derive the excitation functions of D flip-flop inputs D1 and
D0. Fig.9.22 shows the K-map of the excitation Table 9.22. The minimised Boolean functions are obtained
form Fig.9.22 as follows
–
D1 = A B
–– –
D0 = A B + XA
––
The output equation is A B . The implementation of the sequential circuit using D flip-flops and combinational
logic circuit elements is shown in Fig. 9.23.
(a) (b)
– –– –
Fig. 9.22 (a) Three variables K-map D1 = AB (b) Three variables K-map D0 = AB + XA
Example 9.8 Design a sequence detector as per State Table 9.23 and implement using D flip flops.
� Solution
Draw the K-map of Table 9.23 and derive the excitation function of D flip-flop inputs D1 and D0. Fig. 9.24
shows the K-map of the excitation Table 9.23. The minimised Boolean functions are obtained as follows
–– – –
D1 = X A B + X AB + XAB
– – –
D0 = XA + AB + AB
––
The output equations are O1 = A B and O0 = AB. The implementation of the sequence detector circuit using
D flip-flops and combinational logic circuit elements is shown in Fig.9.25.
Fig. 9.24 (a) Three variables K-map Fig. 9.24 (b) Three variables K-map
–– – – – – –
D1 = X A B + X AB + XAB D0 = XA + AB + AB
and S2, S5 respectively. These two cells are equivalent. In the last column, we find that there are three
uncrossed cells S0, S7; S0, S5; and S0, S2. These three cells are also equivalent. Therefore, the final partition
listing will be P = (S0 S2 S5 S7) (S6) (S4) (S3) (S1). Table 9.27 shows the reduced state table.
Example 9.9 Determine the minimal state table for a synchronous sequential circuits as
given in Table 9.28 using (a) Caldwell’s merging rules and (b) Partitioning
Table 9.28 State table
Present Next state
state X=0 X=1
S0 S1 S2
Output O = 1 Output O = 1
S1 S3 S4
Output O = 1 Output O = 1
S2 S5 S6
Output O = 1 Output O = 1
S3 S0 S0
Output O = 1 Output O = 0
S4 S0 S0
Output O = 1 Output O = 1
S5 S0 S0
Output O = 1 Output O = 1
S6 S0 S0
Output O = 0 Output O = 1
� Solution
(a) In Caldwell’s merging rules, the equivalence of states can
Table 9.29 Minimal State Table be defined by the statement that “Two states Sm and Sn are
Present Next state equivalent if both have the same next states and also both have
state X=0 X=1 equal outputs”. It is depicted in Table 9.28 that states outputs
S0 S1 S2 for S0, S1, S2, S4 and S5 are equal but the next states are unequal.
Output O = 1 Output O = 1 Consequently, S0, S1, S2, S4 and S5 can not be merged together.
S1 S3 S45 But, only states S4 and S5 can be merged as both have the same
Output O = 1 Output O = 1 next states and also both have equal outputs. After merging
S2 S45 S6 S4 and S5 states, we find the minimal state table as shown in
Output O = 1 Output O = 1 Table 9.29.
S3 S0 S0
Output O = 1 Output O = 0 (b) In partitioning method, the first partition is made by placing
S45 S0 S0 all those present states in the same section of partition, when
Output O = 1 Output O = 1 the outputs are identical for all possible inputs. The states
S6 S0 S0 outputs for S0, S1, S2, S4 and S5 are equal and these states are
Output O = 0 Output O = 1 put in the same section. Outputs of state S3 and S6 are different
and they are placed in two different sections of partition.
Therefore, the first partition is
P1= (S0, S1, S2, S4, S5) (S3) (S6)
In the first partition, when X = 0 or X = 1, the next states for S4, and S5 are all in the same section of P1. But
when X = 0, the next states for S0, S1, S2 are S1, S3 and S5 respectively. As next states are different, the state S0,
378 Digital Electronics: Principles and Applications
S1, and S2 must be in a different section of partition. Then the final partition is
P2 = (S0) (S1) (S2) (S4, S5) (S3) (S6) and the minimal state table is shown in Table 9.29.
The main characteristic of asynchronous sequential circuit is that only one input is allowed to change
at any particular instant. Simultaneous changes of two or more input variables are prohibited. This is
obviously different from the behaviour of a synchronous sequential circuit, where the change of input
variables are allowed arbitrarily and state changes are activated by the repetitive clock pulse.
There are two different conditions of any asynchronous sequential circuit, namely stable and unstable
states. At any instant, the state of the circuit is defined by the logical values of the input variables and the
present state of the circuit. When the next state is same as the present state, the circuit is in a stable state.
For a set of input variables, the circuit will be in stable state, if yi = Yi , where i = 1, 2…..k. Therefore,
circuit is stable only when the present state is equivalent to the next state. When the circuit is in stable
state, there is a change in the input variable which forces the combinational logic circuit to generate the
new set of next variables. Hence, yi ≠ Yi and the circuit operate in unstable state for time being. After
certain time delay, yi becomes Yi and the circuit again operates in the next stable state.
Sequential Circuits Design 379
Therefore, due to change an input variable, the circuit, can move to an unstable sate and after some
time, the state variables are updated with their new values so that the next state has become the present
state and stability must be restored. Consequently, transition of asynchronous sequential circuit from
one state to next state takes place only in response to the change in input signals one at a time and only
when the circuit operate in stable state. This type of operation is called as fundamental mode. During
design of asynchronous sequential circuits, the designer should take care of static hazards, dynamic
hazards, and races, in order to avoid circuit malfunction.
Example 9.10 Design an asynchronous sequential circuit as shown in Fig. 9.35. The circuit has two
inputs A B, present state Q, next state Q* and one output O. The excitation table of
the circuit is illustrated in Table 9.32.
(a) (b)
Fig. 9.36 (a) K-map for Q* (b) K-map for O
Sequential Circuits Design 381
Example 9.11 Design an asynchronous sequential circuit for the following behaviour
The circuit has two inputs A and B and two outputs O0 and O1. When both inputs are 0, outputs O0, O1 are 0
and Q* = Q. When both inputs are 1, outputs O0, O1 are 1 and Q* = Q. If Q = 0, either A = 1 or B = 1, output O0=
– –
0 and O1= 1 and Q* = Q. If Q = 1, either A = 1 or B = 1, output O0= 1 and O1= 0 and Q*= Q.
� Solution
The block diagram of asynchronous sequential circuit is shown
in Fig. 9.38. Table 9.33 shows the present state, next state and
outputs of the asynchronous sequential circuit according to circuit
behaviour. The K-map for next state Q* , outputs O1 and O0 are
depicted in Fig. 9.39 (a), (b) and (c) respectively. The excitation
function and output equations can be obtained from the K-map. The
– – –
excitation function is Q* = BQ + B Q, output equations are O1= AB
– –
+ BQ, and O0 = AB + BQ. Figure 9.40 shows the implementation
Fig. 9.38 Block diagram of asynchronous sequential circuit by using logic gates.
Table 9.32 The state table with output Table 9.33 The state transition table with outputs
Inputs (A, B) Inputs (AB)
Present 00 01 10 11 Present 00 01 10 11
state (Q) state (Q)
0 0/0 0/1 0/0 1/0 00 0/00 1/10 01/0 10/0
1 1/1 1/1 0/0 1/0 01 1/00 0/01 0/01 1/11
Next State/Output (Q*/O) Next State(Q1* Q0*)/Output(O)
Fig. 9.39 (a) K-map for Q* (b) K-map for O1 (c)-K map for O0
Example 9.12 Design an asynchronous sequential circuit for the state diagram as shown in Fig. 9.41.
Consider four states S0=00, S1=01, S2=10 and S3=11. Assume two inputs A and B and one output O.
Sequential Circuits Design 383
� Solution
The state table of state diagram as shown in Fig. 9.41 is given in Table 9.34. The K-map the state table is
shown in Fig. 9.42. Then derive the excitation functions and output equation are as follows
Q*1 = AB + Q1Q0 + BQ0
– —
Q*0 = AB + Q1Q0 + AQ1 + AQ0
— —
O = Q1Q0 + Q1Q0 = Q1 Q0
The implementation of the asynchronous sequential circuit using combinational logic circuit elements is
shown in Fig. 9.43.
statement into an information diagram which specifies the sequence of operations incorporating with all
necessary conditions for excitation. The special flow chart which can be developed specifically to explain
algorithms of digital system for hardware implementation is called an algorithmic state machine. Hence,
the alternative method of sequential circuit design is known as the algorithmic state machine (ASM).
While this technique is used to design any digital electronics circuit, the state diagram is constructed
in the form of a flow chart. In this section ASM can be explained with a sequence of actions which are
designed to initiate a set of state transitions and outputs for specified data inputs.
State Box In ASM, the rectangular box is used to represent each state for a period of one state time
which may be for one clock period or for an integral number of clock periods in a clock driven machine.
The state is identified by a binary code which is a unique combination of the state variables. Each state
should have a name or number for proper identification. There is one entry path and one exit path for each
state. The exit path may be connected directly to another state box or to one or more decision boxes. The
output is independent of the inputs and simply depends on the present state of the circuit. The outputs are
indicated in the rectangular box. The state output is active while the machine remains in the state, and is
present for the period of the state time. Figure 9.46 (a) shows an example of state box. This state has a
symbolic name S1 and the binary code is assigned to it is 001. Inside the box, it is written R ←0 which
represents the register R will be cleared to 0. The START_OP name inside the Box represents an output
signal which starts any specified operation. The register performs storage data, shift registers, counters,
increment, set and reset flip-flop, clear, 3 decrement, addition, and data transfer operations. The symbolic
notation of register operations is depicted in Table 9.35.
Table 9.35 Different register operations
Description Symbolic Notation
Clear register R R←0
Transfer the content of register A into Register B B←A
Increment register A by 1 A ←A+1
Decrement register A by 1 A ←A–1
Addition of resister A and B A ←A+B
Subtract the content of B from A A ←A–B
Set flip-flop F to1 F ←1
386 Digital Electronics: Principles and Applications
Decision Box The decision box consists of a Boolean expression which generates a conditional
output based on the machine inputs. The ASM decision box is illustrated in Fig. 9.45(b) which has one
input path and three exit paths which will link to other state boxes. When the logical value of the condition
is 1, the true exit path is followed by ASM as shown in Fig. 9.46(b). If the logical value of the condition
is 0, the false exit path is followed. These two paths can be identified by 1 and 0 as shown in Fig. 9.46(b).
The exit paths of decision box can lead directly to another state box or to one or more decision boxes.
Fig. 9.45 ASM chart (a) state box (b) decision box (c) condition box
Fig. 9.46 Example of ASM chart (a) state box (b) decision box (c) condition box
Conditional Output Box The output depends on the present state of the circuit and the input
signals. This is represented by round-ended rectangle boxes. Actually, the round corners can differenti-
ate the conditional output box from the state box. The input path to a conditional output box is always
comes from the output of a decision box and the condition required to generate an active output must be
specified. The example of conditional output box is depicted in Fig. 9.46(c). If A is 0, register R will be
cleared. While A = 1, R will be unchanged. Either A = 0 or A = 1, the next state is S2 which is represented
by binary code 010 and the content register B will be transferred to register C.
Initially, the ASM will stay at state S1 and it is represented by binary code 001. The output in this state
is A=A+1. The output of state box is associated with two decision boxes and one conditional output box
as depicted in Fig. 9.47. Any ASM block without any decision or conditional output boxes can form a
simple block. The operations within the state, decision boxes and conditional output boxes are executed
with in a clock pulse while the system is in S1 state. After the clock pulse, the system controller transfers
the sate S1 to any one of the next states such as S2, S3, and S4. The binary code of states S2, S3, and S4 are
represented by 010, 011, and 100. When B = 0, the register C will be cleared and the state of system will
be 100. If B = 1 and D = 0, the system operates in S3 state other wise output state will be S2.
� Solution
The counting sequence of mod-7 counter is 000, 001, 010, 011, 100, 101 and 110. The ASM chart for mod-
7 counter is shown in Fig. 9.48. There are seven steps assigned by state names S0, S1, S2, S3, S4, S5 and S6
388 Digital Electronics: Principles and Applications
respectively. Table 9.36 shows the present state and next state of mod-7
counter. Assume that the present state variables are A, B, and C and the next
state variables are Z3, Z2 and Z1. Figure 9.49 shows the K-map which is used
to derive the next- state functions. The expressions for Z1, Z2 and Z3 are Z1 =
–– –– – – – – –
A C + BC , Z2 = A BC + BC and Z3 = AB + A BC. The implementation of mod-7
counter using ASM is illustrated in Fig. 9.50.
Fig. 9. 49 (a) K-map for Z1 (b) K-map for Z2 (c) K-map for Z3
Sequential Circuits Design 389
� Solution
It can be assumed that initial count value of the counter is 00. When the 2-bit
synchronous UP/Down counter control input (UP) is high, the counter should
count upward direction on every clock pulse and the counting sequence will
be 00, 01, 10, 11, and 00. If the UP/Down counter control input (UP) is low,
the counter starts counting in down ward direction on every clock pulse
such as 00, 11, 10, 01,00. To develop the ASM chart, the detail sequence
of counter operations must be represented sequentially. Figure 9.51 shows
the ASM chart for 2-bit synchronous UP/Down counters. Present state and
next state of 2-bit UP/Down counter are illustrated in Table 9.37 where the
present state variables are A and B, and the next state variables are Z2 and
Z1. Figure 9.52(a) and (b) show the K-map for Z1 and Z2 respectively. The
expressions for Z1 and Z2 are as follows
–
Z1 = B and
– – —– –– – – –– –— – –
Z2 = A B U P + ABUP + A BUP + ABUP = (A B + AB)UP + (A B + AB)UP =
––—– — —
A B UP + (A B)UP.
Table 9.37 Present state and next state of 2-bit UP/Down counter
Present State Next State when UP=1 Next State when UP=0
A B Z2 Z1 Z2 Z1
0 0 0 1 1 1
0 1 1 0 0 0
1 0 1 1 0 1 Fig. 9.51 ASM chart for
1 1 0 0 1 0 2-bit UP/Down counter
390 Digital Electronics: Principles and Applications
� Solution
Figure 9.54 shows the symbolic representation of 4:1 multiplexer,
which has two select lines S1 and S0 and four inputs X1, X2, X3
and X4 and one output F. The functional table of 4:1 Mux is
illustrated in Table 9.38. When S1= 0 and S0 = 0, output F = X1.
Similarly, depending upon the select inputs, output is available
at output F. The ASM chart of 4:1 multiplexer is depicted in
Fig. 9.55.
Table 9.38 Functional Table of 4:1 MUX Fig. 9.54 Symbol of 4:1 MUX
S1 S0 Output
0 0 F=X1
0 1 F=X2
1 0 F=X3
1 1 F=X4
Sequential Circuits Design 391
Example 9.17 Develop ASM chart for the following conditions of a digital circuit:
The output of digital circuit depends upon the trigger pulse as well as inputs X1 and X2. Assume that after
application of first trigger pulse, output =1
which is independent of inputs X1 and X2.
If X1 X2 = 00, 01, and 10, output = 0 after
application of second positive edge trigger
pulse. When X1 X2 = 11 and second positive
edge trigger pulse is applied, output =1.
� Solution
The transition from one state to the other
state takes place at rising or positive edge
of the clock pulse. After the first rising edge
of the clock pulse, the output is high. As the
output does not depend on input signals, the
first rectangle-box has a value Z=1. The out-
put is low after the second rising edge of the
clock pulse when X1 X2 = 00, 01, and 10 and
the output is high for the condition X1 X2 =
11. The ASM chart for the above operations Fig. 9.57 ASM chart
is shown in Fig. 9.57. This block diagram can be represented in the ASM chart by drawing a decision box
which ANDs both the inputs. When the result of ANDing X1 and X2 is 1, the output is high and rectangle-box
contains Z=1. If ANDing X1 and X2 is 0, output is low and rectangle-box contains Z=0.
SUMMARY
Generally, any sequential circuit consists of a combinational logic circuit and memory elements. The output of
combinational logic circuit is stored in memory elements. Memory elements output feedback into combinational
logic circuit and used as input variables. The output of combinational logic circuit is function of the external inputs
and inputs from memory elements. In this chapter, the modeling and classification of sequential circuits has been
discussed. The operation of Mealy machines and Moore machines, function of state table, state diagram and state
equations are also incorporated. Designs of synchronous and asynchronous sequential circuits with examples are
discussed elaborately. In this chapter, the operation of algorithmic state machines (ASM) are also incorporated with
some examples.
12. When the output of a sequential circuit depends on the present input as well as previous output states,
the circuit is called
(a) Moore machine (b) Mealey machine (c) Sequential circuit (d) all of these
REVIEW QUESTIONS
9.1 (a) Define sequential circuit.
(b) Discuss the classification of sequential circuit with examples
(c ) Write difference between synchronous and asynchronous sequential circuit
9.2 (a) Explain Mealy and Moore machines.
(b) Write difference between Mealy and Moore machines
9.3 (a) Discuss state table, state diagram and state equations of a finite state machine with example.
(b) Write design procedure of a finite state machine.
9.4 A sequential circuit has two inputs X and CLOCK and one output O. Incoming data are examined
in consecutive groups of three digits and the output O=1 for the following three input sequences
000, 010 and 111. Draw a state diagram and implement the sequential circuit using D, T and J-K
flip-flops.
9.5 Find the minimal state table for sequential machines as given in Table 9.40.
Table 9.40 State Table
Present state Next state
X=0 X=1
S0 S0 S1
Output O = 0 Output O = 0
S1 S3 S2
Output O = 0 Output O = 1
S2 S0 S3
Output O = 0 Output O = 0
S3 S5 S4
Output O = 0 Output O = 1
S4 S1 S2
Output O = 1 Output O = 0
S5 S5 S4
Output O = 0 Output O = 1
S6 S0 S1
Output O = 0 Output O = 0
9.6 Design a sequential circuit for
the state Table 9.41 using J-K Table 9.41
flip-flops. Assume two inputs are
Present state Inputs (AB)
A and B, output of the sequential 00 01 10 11
(Q1Q0)
circuit is O, present state of J-K
00 01/1 00/0 00/1 01/0
flip-flops = Q1Q0 , Next State of
J-K flip-flops = Q1* Q0*. 01 10/1 00/1 00/0 10/1
10 11/0 00/0 00/1 11/0
11 01/0 00/1 00/1 01/1
Next State (Q1* Q0*)/Output(O)
Sequential Circuits Design 395
9.7 The state diagram of a sequential circuit is given in Fig. 9.58. Draw the state table for Fig. 9.58 and
implement using T flip-flops. Assume two inputs are A and B, output is O.
Fig. 9.58
9.8 The state diagrams of sequential circuits are given in Fig. 9.59 and Fig. 9.60. Design the sequential
circuits using flip-flops and combinational logic circuit.
9.9 Draw the state diagram and state table of a up-down counter. Design the Up-Down counter using T
flip-flops.
9.10 A sequential circuit has one input and one output. The state diagram is shown in Fig. 9.61. Design
the circuit with J-K, D and T flip-flops.
396 Digital Electronics: Principles and Applications
Fig. 9.61
9.11 Design a 5 state sequential machine whose sequential states are: 000, 001, 010, 110, 111, 000…..
Assume initial state is 000.
9.12 Why state reduction is necessary in sequential circuit design? What are the different methods of
state reduction? Explain implication table method of state reduction with an example.
9.13 Explain algorithmic state machines with examples. Discuss how the ASM chart differs from a con-
ventional flow chart. Draw the ASM chart of (a) 8:1 Multiplexer and (b) 4-bit synchronous Up/Down
counter.
9.14 A synchronous counter is controlled by two input signals A and B. The counter does not operate, if
A = 0 and B = 0. When A = 0 and B = 1, the counter operates as a mod four counter. If A=1 and B=0 the
counter operates as a mod eight counter. Draw an ASM chart and design a circuit using D flip-flops
and NAND gates to satisfy the above specification.
9.15 A sequential circuit waveform generator generates four output waveforms which are controlled by
input signals X1 and X2. If X1= 0 and X2= 0, the output wave form is high for a period of three clock
cycles and low for a period of one clock cycle. When X1= 1 and X2= 0, the output wave form is high
for a period of two clock cycles and low for a period of two clock cycles. If X1= 0 and X2= 1, the
output wave form is low for a period of three clock cycles and high for a period of one clock cycle.
When X1=1 and X2=1, the output wave form is high for a period of one clock cycle and low for a
period of three clock cycles. Develop an ASM chart for the waveform generator. Draw a state table
and implement the waveform generator using D flip-flops.
CHAPTER
10
MULTIVIBRATORS
10.1 INTRODUCTION
The output of sequential logic circuits depends on the present input states and previous history. The logic
circuits operation can be controlled by a train of clock pulses. When the clock pulses are applied, the
outputs of sequential logic circuit changes from one state to next state. These clock pulses are generated
by clock generators or oscillators. The clock generators are frequently called as astable or free running
multivibrator. In this chapter, clock oscillators using TTL and CMOS, astable, monostable, bistable
multivibrators and their applications, operation of 555 timer and its applications have been explained.
The operation of 556 timer IC, non-retriggerable monostable multivibrator IC 74121, retriggerable
monostable multivibrator IC 74122 and IC 74123 are also incorporated.
10.2 CLASSIFICATION OF MULTIVIBRATORS
There are three types multivibrators, namely astable multivibrator, monostable multivibrator, and
bistable multivibrator. These multivibrators are most commonly used in timing applications.
Astable Multivibrator Astable multivibrator is known as free running multivibrator. It has
two quasi-stable states and it continues to oscillate between two stable states. This multivibrator has no
stable state and external trigger pulses are not required to change
the states. This device can be used to generate square wave and the
time duration depends upon circuit parameters. The continuously
generated pulses are used as clock pulses in flip-flops, registers,
counters and other digital circuits where the clock pulse is required
for operation. Figure 10.1 shows the output voltage waveform of an
astable multivibrator which oscillate between 0V and 5V without
Fig. 10.1 Astable multivibrator application of any trigger pulse.
Monostable Multivibrator Monostable multivibrator has a single stable state and a quasi-stable
state. In this multivibrator, trigger signal is applied to switch from stable state to quasi-stable state. After
a short time, the circuit reverts back to its stable state. Hence, a single output pulsed is generated when
a trigger pulse is applied to it. Therefore, it is known as one shot or single shot multivibrator circuit.
The output pulse width can be controlled by internal circuit parameters and trigger pulse has no control
over the pulse width of output waveform. As a result, a small pulse width or a sharp trigger pulse can
be converted into an output of longer pulse width. So, this multivibrator is also called as pulse stretcher.
Figure 10.2 shows the output voltage waveform and trigger signal of a monostable multivibrator. At time
398 Digital Electronics: Principles and Applications
t1, when the trigger pulse is applied, output of monostable multivibrator changes from 0V to 5V and its
output stay at 5V for certain time T1 depending on circuit parameters. After T1 time, output changes from
5V to 0V without application of any trigger pulse.
Fig. 10.6 Charging and discharging of Fig. 10.7 Charging and discharging of
C1 and C2 when T1 is turned C1 and C2 when T1 is off and T2
on and T2 is off turned on
The voltage across capacitor, C and resistor, R must be equal to the applied voltage, Vcc. The
mathematical relationship as given below:
Q
Vcc = IR +
C
400 Digital Electronics: Principles and Applications
dQ Q dQ
Vcc = R + where, Q is charge and I =
dt C , dt
After integrating the above expression, the voltage across the capacitor can be expressed as
V(t) = VCC – (VCC – V0) e-t/RC.
where, V0 is the voltage across the capacitor at t = 0. In this case, the initial voltage V0 = –Vcc. If t = log2
× RC = 0.693RC, V(t)=0V . In this oscillator, when T1 is on, T2 is
OFF and when T1 is off and T2 is ON. The on time and off time are
calculated by the following expressions as given below:
t1=0.693 R1 C1 and t2 = 0.693 R2 C2.
Fig. 10. 8 Wave form of astable The total time period, T = t1+ t2 = 0.693(R1 C1 + R2 C2)
multivibrator
If R1=R2=R and C1=C2=C
T=1.386 RC and the clock frequency, f = 1/T =
0.721/RC.
The cyclic switching of T1 and T2 produces a
square wave at the collectors of transistors T1 and T2.
The waveform of collector of T1 and T2 is shown in
Fig. 10.8. The output of transistor T1 is complement
of T2. Therefore this circuit is called as astable
multivibrator. The astable multivibrator using PNP
transistor is depicted in Fig. 10.9.
Example 10.1 In an astable multivibrator using NPN transistors as shown in Fig. 10.5, the resistance
R1=R2=10K and C1=C2=0.01µF and R3=R4=1Kohm, determine the clock frequency.
� Solution
t1=0.693 R1 C1=69.3 ms and t2=0.693 R2 C2=69.3 µs.
Total time period, T= t1+t2=69.3µs +69.3µs=138.6µs
1
The clock frequency, f = =1/138.6µs =7. 215 KHz
t1 + t2
required base current. The capacitor is charging through R1 and base emitter junction of transistor T2.
When T2 is in saturation, the collector output voltage of T2 will be 0V.
When a negative trigger pulse is applied, C2 act as short circuit, diode D is forward biased and conducting.
Then the voltage at base of transistor T2 will be reduced. Then transistor T2 will operate in cut-off. The
collector voltage of T2 increases to +VCC and the base current of T1 increases. The collector potential will
be reduced and capacitor C2 starts to discharge through T1. Then T1 is in saturation and T2 is in cutoff. After
completely discharged capacitor C2, it starts to charge in the opposite direction through R2. Therefore,
potential at the base of T2 starts to increase. When it is 0.7V, T2 starts conducting. So T2 operates in saturation
and T1 is in cut-off. Then the circuit again operates in stable state. Figure 10.11 shows the waveform of
monostable multivibrator. The duration of pulse width is equal to T = 0.7 RC approximately.
cade and the output of third and fifth NOT gate are used
as input of first NOT gate which forms a closed loop
system. If propagation delay of each NOT gate is 25ns,
then a total 3 × 25=75ns time delay can be achieved for
Fig.10.17 and 5 × 25=125ns for Fig. 10.19. Then time
Fig. 10.16 Cascade connection three period will be 150ns and 250ns and oscillation frequen-
inverters (NOT gates) cy =1/150ns=6.666 MHz for Fig. 10.17 and f=1/250ns=
4 MHz for Fig. 10.19.
The disadvantage of these circuits is that
the frequency of output waveform cannot
be controlled externally. Actually, external
circuits cannot control propagation delay
and therefore frequency is uncontrolled.
Figure 10.20 shows the modification of
astable multivibrator circuit using inverters,
R and C elements. When the resistance and
capacitance are incorporated in the circuit,
there will be some control in frequency.
When the power is switched on C2 begins
Fig. 10.17 Waveforms of three cascaded inverters
(NOT gates): V1, V2 and V3
to charge through R2, the input voltage
of inverter-2 begins to rise, the output
will stay high till the input voltage
to the inverter INV2 reaches a high
logic level voltage. The duration of
high output voltage depends upon
Fig. 10.18 Cascade connection of five inverters the time constant C2R2. When input
(NOT gates) voltage of INV2 arrives at the high
logic level voltage, inverter output
changes from high to low.
Then capacitor C1 start to charge through R1 and input voltage of INV1 increases. The output of INV1
will be high till the input voltage of INV1 reaches a high logic level voltage. The inverter output voltage
changes from high to low when input voltage of INV1 arrive at high logic level voltage. The time period
of output voltage depends upon the time constant R1C1.Therefore, alternately capacitors C1 and C2 will
be charged. As a result, clock pulses will be produced. The frequency of clock pulse is
1 1 1
f = = =
t1 + t2 0.7 R1C1 + 0.7 R2C2 0.7( R1C1 + R2C2 )
where t1 = 0.7R1C1 and t2 = 0.7R2C2
1
if R1 = R2 = R and C1 = C2 = C, frequency f =
1.4 RC
As frequency depends on the circuit parameters such as resistances and capacitances, the frequency
stability is not good. To increase frequency stability, quartz crystal is used as shown in Fig. 10.21.
The oscillator frequency is same as the quartz crystal. The oscillation frequency can be expressed as
f = 1/2RC. When the frequency is known, the value of R and C can be determined from this expression.
404 Digital Electronics: Principles and Applications
Fig. 10.19 Output waveform of multivibrator using cascade connection of five inverters,
V1= V0, V2, V3 and V4
When CMOS inverters replace TTL inverters, the
Fig.10.20 and Fig.10.21 also behave as oscillator or
astable multivibrator. Due to different propagation delay
of CMOS ICs, the frequency of this oscillator will be
different. The output frequency depends on the supply
voltage and temperature, but this variation is very narrow
range. Therefore, this circuit has very little control over
the output frequency. The frequency control range can
Fig. 10.20 Modified TTL clock oscillator
be increased by using resistances and capacitance as
shown in Fig.10.22 and the oscillation frequency can be
determined from the expression f = 0.559/RC.
Figure 10.23 shows the astable multivibrator using AND
and NOT gate. Initially, consider the capacitor is uncharged
and VC = 0V. After switch on the power supply, VC = 0V. So
the input voltage of inverter is low, inverter output voltage is
high. This high voltage fed to AND gate as input. Then output
of AND is high and this voltage applied across the RC circuit
and capacitor voltage starts increasing due to charging. The
output of inverter will be high till capacitor voltage reaches Fig. 10.21 TTL clock oscillator with
the high logic level voltage (VH). When VC cross the high crystal control
logic level voltage VH at time t1, inverter output changes from
high to low. Then AND gate output will be low and capacitor
starts discharging. The inverter output voltage will be low
till capacitor voltage reaches the low logic level voltage (VL).
When VC arrives the low logic level voltage VL at time t2, Fig. 10.22 CMOS oscillator
Multivibrators 405
inverter output changes from low to high and the next cycle of operation begins. The voltage across the
capacitor VC and output voltage VO are shown in Fig. 10.24.
The operational amplifier compares the input signal with the reference voltage. If Vref = 0 and Vi > 0,
the Vd is positive, the operational amplifier output will be high or V0 = +VCC. If Vref = 0 and Vi < 0, the Vd
is negative, the operational amplifier output will be low or Vo= -VCC. When +VCC =15 V and -VCC = –15,
the output voltage will be either +15V or –15V. Figure 10.28 (b) shows the output characteristics when
Vref = 0V.
When Vref = +ve, the output characteristics of comparator is depicted in Fig. 10.28 (c). The output
characteristics can be reversed when Vref and Vi are interchanged as shown in Fig. 10.29(a) and its
characteristics are shown in Fig. 10.29(b). When Vref = + ve, the output characteristics can be expressed
as
Example 10.2 If Vref = 2V and Vi = 10 sin ωt in Fig. 10.28 and Fig. 10.29, draw the output
waveforms.
Assume f = 50Hz.
� Solution
Figure 10.30 shows the output voltage waveform, when Vref=2V and Vi=10 sin ωt in Fig. 10.28. When input
voltage Vi is greater than Vref=2V, output voltage is 10V. While input voltage Vi is less than Vref=2V, output
voltage is -10V. Figure 10.31 shows the output voltage waveform, when Vref = 2V and Vi=10 sin ωt in Fig.
10.29. If input voltage Vi is less than Vref = 2V, output voltage is 10V. When input voltage Vi is greater than
Vref =2V, output voltage is –10V.
408 Digital Electronics: Principles and Applications
If the output of circuit is +VCC or V0 = VCC, then V+ = bV0. As long as Vd = (V+ – V–)> 0, circuit output
will be +VCC. If Vi is increasing, after some time V+ = V– = bVCC. As Vi is continuously increasing, when
Vi is greater than V+, Vd = ( V+ – V–)<0 or becomes negative. Then output of operational amplifier will
be changed from +VCC to –VCC. Then V+ = –bV0 = –bVCC. As V+ becomes negative and force the output
of operational amplifier to become negative. This is continuing until operational amplifier is saturated.
Then output voltage is V0 = –VCC. Figure 10.33 shows the transfer characteristics of circuit.
The transfer characteristics of the bistable circuit is hysteresis as the output changes state at different
values of Vi depending on whether Vi is decreasing or increasing. The bistable circuit has two switching
points: + bVCC and –bVCC. The operation of the bistable circuit are shown in Fig. 10.33 (a) and (b). The
complete operation is also shown in Fig. 10.33(c). When Vi in between + bV0 and – bV0, the circuit
will be in one of its two possible states. The output state of the circuit can be changed by applying an
input signal Vi > bVCC to the circuit. This input pulse can be of a very short duration. This input signal is
referred to as a trigger signal. On the other hand, the state of the circuit can also be changed by applying
a negative pulse with Vi < –bVCC.
The center of the hysteresis band can be shifted at different voltage by adding a reference voltage
to the circuit as shown in Fig. 10.34. This circuit is also called a Schmitt Trigger. The operation of
the circuit is explained in this section. Consider the initial state output is V0. Determine V+ and find
the range of Vi for which Vd is positive. When Vi in this range, the comparator output state cannot be
changed. When Vi is out of range, the sign of Vd changes from positive to negative. Then only the
comparator output changes.
Fig. 10.34 (a) Bistable circuit with Vref (b) Complete input-output transfer characteristics
410 Digital Electronics: Principles and Applications
Here Vd = V+ – V– = V+ – Vi
V0 - Vref
The current through R1 and R2 is i =
R1 + R2
R2 R2 R1
Then V+ - Vref = iR2 = (V0 - Vref ) and we get V+ = V0 + Vref
R1 + R2 R1 + R2 R1 + R2
If V0 = VCC and Vd>0; Vd = V+ – V– = V+ – Vi >0, and the range of Vi for the Schmitt trigger will
R2 R1
remain in this state, can be determined form Vi <V+ where, V+ = VCC + Vref
R1 + R2 R1 + R2
Therefore, the comparator output is in the high state and it stays in the high state until the condition
of Vi < VTH is violated. The transfer characteristic is shown in Fig. 10.34(b).
–
Consider V0 = Vs = –VCC and Vd<0
R2 R1
Then V+ = Vs- + Vref
R1 + R2 R1 + R2
As Vd = V+ – V– = V+ – Vi < 0, the range of Vi for the Schmitt trigger will stay in the current state can
be determined from Vi > V+.
R2 R1
Vi > VTL = V+ = Vs- + Vref
R1 + R2 R1 + R2
As a result, the comparator is in the low state and stays in the same state until Vi >VTL .
The range of Vi is VTL < Vi < VTH
R2 R1 R2 R1
or Vs- + Vref < Vi < Vs+ + Vref – +
Where Vs = –VCC and V s = VCC
R1 + R2 R1 + R2 R1 + R2 R1 + R2
The range of Vi is called the dead band. The input signal should pass completely through this band
– +
before the output of trigger switches from one state to another. The value of Vs and V s are always chosen
based on the desired value of the comparator output voltages.
Example 10.3 In Fig. 10.34, Vref = 4V and a Vi = 10 sin w t, determine VTL and VTH. Draw the output
voltage waveform. Consider R1=R2=1 K ohm.
� Solution
The VTL and VTH voltages can be expressed as
R2 R1 R2 R1
VTL = VS- + Vref ; VTH = VS+ + Vref
R1 + R2 R1 + R2 R1 + R2 R1 + R2
– +
As R1=R2=1 Kohm, VS = –10V , VS = +10V and Vref = 4V
10 4 10 4
VTL = - + = - 3V : VTH = + = 7V .
2 2 2 2
Figure 10.35 shows the output waveform when Vref = 4V and a Vi = 10 sinwt
Multivibrators 411
Fig. 10.35
Fig. 10.36 Bistable circuit with RC feedback Fig. 10.37 Astable multivibrator
Figure 10.36 shows astable multivibrator which consists of bistable circuit and a RC feedback loop. This
circuit can be used to generate square waveform. The operation of the circuit is explained below:
The bistable circuit has two states +VCC and –VCC. Initially, consider the output of bistable circuit is
+VCC. Then the capacitor is charged through resistance and the voltage across the capacitor increases
412 Digital Electronics: Principles and Applications
with a time constant RC. The voltage of capacitor moves toward +VCC. The capacitor voltage is used as
input of bistable circuit. When the capacitor voltage is more than the threshold voltage, VTH, the bistable
circuit is triggered and its output voltage changes from +VCC to –VCC. As –VCC is applied to the capacitor,
the capacitor discharges with the constant RC. Then the voltage of capacitor moves toward –VCC. As
soon as the voltage across the capacitor is VTL, the bistable is triggered again and output changes from
–VCC to +VCC. In this way, the switching takes place and a square wave will be generated at the output
of the bistable circuit. As this circuit has no stable state, it is called astable multivibrator. Therefore, an
astable multivibrator is a combination of a Schmidt trigger and an RC circuit. Figure 10.37 shows the
astable circuit. This circuit has both negative and positive feedback.
In Fig.10.37, resistance R2 and R3 act as a voltage divider. Therefore, the voltage at non-inverting
R2
terminal is V+ = V0
R2 + R3
The current input to inverting and non-inverting terminals is zero (i+=i–=0). So, RC part of the circuit
acts independently. Initial voltage across the capacitor is Vc(t0) at t = t0. When voltage Vo is applied to this
circuit, the voltage across the capacitor at time t will be
t - t0
-
Vc (t ) = V0 + [Vc (t0 ) - V0 ]e t as capacitor is charging.
where t = R1C the time constant of the RC circuit.
If Vd>0, V0 = Vs+. The RC circuit and voltage
divider R2 and R3 operate differently. So, sudden
change in output voltage can effect on sudden
change in V+ . But V– cannot changes suddenly
as the voltage across the capacitor has to be
continuously charged or discharged. There
is some delay in the response of RC circuit.
Actually this delay is used to generate the square
wave output. The voltage across capacitor VC
and output voltage VO are depicted in Fig.10.38.
At t0=0, Vc(t0)=0 and V0 = Vs+ = VCC, the
voltage across capacitor can be expressed as Fig. 10.38 Output voltage and capacitor voltage
t
-
V- = Vc (t ) = Vs - Vs e t
At time t = 0, V– = 0. When time increases, V– increases. At time t1, capacitor voltage will exceed
R2
V+ = Vs+ . Then Vd is negative and it forces the comparator output to become Vs–(–VCC).
R2 + R3
The time period of square wave is T=2(t2-t1) and its expression can be derived as follows:
t - t1
R2 - 2
V- (t2 ) = VC (t2 ) = - VCC + (VCC + VCC )e t
R2 + R3
R2
V+ (t2- ) = - VCC
R2 + R3
Multivibrators 413
–
Where t2 is the time very close to t2 but smaller than t2. The comparator switches to other
state if V–(t2) = V+(t2–). After equating the above equations for V–(t2) and V+(t2–), we get
t - t1
R2 - 2 R2
-VCC + (VCC + VCC )e t = - VCC
R2 + R3 R2 + R3
t - t1
R2 - 2 R2 R3
Or ( + 1)e t =1- =
R2 + R3 R2 + R3 R2 + R3
t -t
- 2 1 R3 t2 - t1 2 R + R3
Or e t = Or = ln 2
2 R2 + R3 t R3
Ê 2 R2 ˆ
Therefore, T = 2(t2 – t1) = 2t ln Á + 1˜ where t = RC
Ë R3 ¯
i.e., positive and the circuit is under steady state condition. In this case, the capacitor C charges through
R1, but the capacitor voltage can not able to increase than the forward voltage drop across D1 (VD). The
resistance values are selected
in such a way that V+ is greater
than VD.
As soon as a negative trigger
pulse is applied, the non-invert-
ing input voltage, V+ becomes
less than inverting voltage,
V- and output voltage changes
from +V0 to –V0 . The capaci-
tor C stars to charge through R1
and moves towards –V0. In this
condition, diode D1 is reverse
biased and acts as open cir-
cuit. After some time, the volt-
age across capacitor C, (VC)
or V- becomes more negative
than V+, then the output again
Fig. 10.41 Waveforms of monostable multivibrator
changes from low quasi-stable
state to high stable state. Figure 10.41 shows the waveform of the monostable multivibator.
The voltage across the capacitor can be expressed as
t
-
VC = - V0 + (V0 + VD )e t
where, t = R1C
At time t = t1, VC = –bV0
The pulse width duration is T and can be expressed as
Ê 1 + VD / V0 ˆ
T = t ln Á
Ë 1 - b ˜¯
where, VD is the forward bias voltage drop across diode D1 and V0 is the output voltage
R3
and b =
R3 + R2
As V0 >>VD, and if R1=R2, the time period can be expressed as
Ê ˆ
Á 1 ˜ 1
T = t ln Á ˜ , as VD / V0 = 0 and b =
1 2
Á1 - ˜
Ë 2¯
T = 0.69R1C
Multivibrators 415
Example 10.4 Figure 10.40 shows monostable multivibrator. Determine the circuit elements for
T = 10µs and draw the voltage across capacitor and output voltage waveform. As-
sume VD= 0.6V and VZ = 9V.
� Solution
Ê 1 + VD / V0 ˆ
We know that T = t ln Á
Ë 1 - b ˜¯
R3 1
and b = = as R2=R3=10 K ohms
R3 + R2 2
After substituting VD= 0.6V and VZ=9V=VO , we get
Ê ˆ
Á 1 + 0.6 / 9 ˜ Ê 1.0667 ˆ
T = t ln Á = t ln Á = 0.7576t = 0.757
76 R1C
1 ˜ Ë 0.5 ˜¯
Á 1 - ˜
Ë 2 ¯
As T=10s , 10s = 0.7576R1C
If C=10pF, R1=1.32K ohm.
Figure 10.42 shows the voltage across the capacitor and output voltage.
voltage. The outputs of the comparators are tied to the bistable flip-flop. When the trigger voltage is
moved below 1/3 of the supply, the comparator - 2 changes state and sets the flip-flop driving the output
to a high state. The threshold pin normally monitors the capacitor voltage of the RC timing network.
When the capacitor voltage exceeds 2/3 of the supply, the threshold comparator (COMP-1) resets the
flip-flop, which in turn drives the output to a low state. When the output is in a low state, the discharge
transistor is “on”, in that way discharging the external timing capacitor. Once the capacitor is discharged
to 1/3 of supply voltage, the timer will again triggered and the next timing cycle will be started.
decrease. As the capacitor voltage decreases, the output of comparator-1 (COMP-1) changes from 1 to
–
0. In this time, R=0, S=0. and the flip-flop output Q=0 and Q =1.
As soon as the capacitor voltage becomes less than VCC/3, the comparator-2 (COMP-2) output goes
–
to 1. Then R=0, S=1 and the flip-flop output Q is equal to 0. Consequently, the transistor goes OFF and
output voltage V0 becomes high. After that, next cycle of operation is started again. Figure10.46 shows
the output voltage V0 and capacitor voltage VC waveforms.
and 2 are +V and +V/2 respectively. The output voltage and capacitor voltage waveforms are shown in
Fig. 10.49 when for 2VCC/3 >V. Then charging and discharging time as follows
È V ˘
Í1 - 2V ˙
CC ˙
T1 = C ( R1 + R2 ) ln Í
Í 1- V ˙
ÍÎ VCC ˙˚
T2=CR2ln2.
It is clear from the charging time equation that
the charging time is reduced but discharging time
does not affected. Therefore, controlling voltage at
pin 5 can vary the oscillator frequency.
Fig. 10.49 Voltage control oscillator wave- The square wave with different frequency can be
forms when pin 5 used to control generated by proper selection of R1, R2 and C. R1 and
frequency
R2 can be varied widely and its range is 1Kohm to
1Mohm. But the capacitance choice is very limited as capacitance is available in few ranges. Therefore,
during the design of multivibrator, initially choose the capacitance value. The different values of C
are 0.001µF, 0.01µF, 0.1µF, 1µF, and 10µF. Then determine the resistance value using the following
expression
0.7
R2 = , when R1 is smaller than R2.
fC
If the required on time is greater than off time, choose resistance R1 which will be approximately ten
times of R2. During the selection of variable resistance, it is best if R2 is variable. If R1 is variable, a fixed
resistance about fraction of 1Kohm is connected in series with variable resistance. Table 10.1 shows the
frequency of astable multivibrator at different value of capacitance and resistances.
Table 10.1 Frequency of astable multivibrator 555
Example 10.5 Calculate the frequency and duty cycle of the output of an astable multivibrator-
using timer 555. Assume R1=25K ohm, R2=50Kohm and C=0.1µF.
420 Digital Electronics: Principles and Applications
� Solution
The frequency is equal to
1 1.443 1.443
f = = = KHz = 0.1154KHz
0.693( R1 + 2 R2 )C ( R1 + 2 R2 )C (25 + 2 ¥ 50) ¥ 0.1
R1 + R2 25 + 50
and Duty cycle = = = 0.6 = 60%
R1 + 2 R2 25 + 2 ¥ 50
Example 10.6 An astable is shown in Fig. 10.45. It has output frequency 10KHz with duty ratio
60%. Calculate the value of R2 and C if R1=3K ohm.
� Solution
1 1
Time period=T=T1+T2=0.693(R1+2R2) C = = ms
f 10
Choose C= 0.01µF
Therefore (R1+2R2)=14.43Kohms
As R1=3K ohm , R2 will be 5.7 K ohms
R + R2 3 + 5.7
Duty ratio, D = 1 = = .6029 = 60%
R1 + 2 R2 14.43
Example 10.7 The clock output frequency of an astable oscillator is 100KHz , R1 is 2K and R2 is 5K.
Determine the timing capacitor required for the astable oscillator.
� Solution
The capacitor value is equal to
1.443 1.433
C= = F =0012F
f ( R1 + 2 R2 ) 100(2 + 2 ¥ 5)
– –
voltage V0 is low as Q=0 and Q =1. As Q =1, the transistor Q1 is ON and the capacitor will be fully
discharged. The threshold and trigger comparator outputs are low. Hence R=0 and S=0. The monostable
multivibrator can be triggered when the trigger input is less than VCC/3.
After the trigger applied, the trigger comparator output momentarily changes from low to high and
–
flip-flops inputs are R=0, S=1. Accordingly, Q=1 and Q =0, the transistor Q1 will be OFF and capacitor
starts to charge towards VCC through R1.
When capacitor voltage VC reaches
the value of 2VCC/3, the threshold
comparator output will be high and
flip-flops inputs will be R=1,S=0.
Then output voltage V0 becomes low
–
as Q=0 and Q =1. The transistor Q1 is
–
ON due to Q =1 and the capacitor is
fully discharged very firstly as turn
on resistance of the transistor is small.
In this way, cycle will be completed
Fig. 10.51 Waveform of monostable multivibrator
and the capacitor is ready for the
next trigger. Figure 10.51 shows the capacitor voltage and output voltage waveforms of monostable
multivibrator.
The capacitor voltage during charging can be expressed as
È t ˘
-
VC (t ) = VCC Í1 - e R1C ˙
Í ˙
Î ˚
At t = T1 , capacitor voltage VC=2VCC/3.
So, T1=R1 C ln 3=1.1R1C
Time period of the pulse is T1=1.1R1C.
The pulse width of monostable multivibrator output can be varied by using the control pin - 5. If
a positive voltage V is applied to pin no. - 5,
the threshold of the comparator will be changed
from 2VCC/3 to V volts. Therefore, the pulse
width of the waveform will be changed to T '1
which can be determined by the expression
given below:
È V ˘
T1¢= R1C ln Í CC ˙
Î VCC - V ˚
10.9.3 Bistable (Flip-flop) Op-
eration Of 555 Timer
Figure 10.52 shows the bistable multivibrator
using 555 timer and it has two stable states:
output high and output low. Therefore, it is also
called as flip-flop. This circuit has two inputs:
trigger and reset. Initially, output is low. Tigger Fig. 10.52 Bistable multivibrator using 555 timer
422 Digital Electronics: Principles and Applications
makes the output high when trigger input voltage less than VCC/3, 555-timer output will be changed from
low to high. Reset makes the output low when reset pin voltage less than 0.7VCC, output will be changed
from high to low.
Example 10.8 Determine the pulse width of the output waveform of a monostable multivibrator as
shown in Fig. 10.50 if R1=100K and C=0.1F
� Solution
Pulse width of the output waveform is T=1.1R1C= 1.1×100×0.1 ms=11ms
Dark Detector Dark detector circuit is shown in Fig. 10.55. It is used to detect darkness all of a sud-
den. The light dependent resistance (LDR) is used to detect darkness or illumination below a limit value.
Due to absence of light, LDR will be short and circuit will be reset. Then speaker develop the alarm.
Metronome Metronome is used in the music industry to produce the rhythm by a ‘toc-toc’ sound.
The speed of sound can be adjusted by the potentiometer R1 as shown in Fig.10.56.
sequencer circuit, which is actually cascade connection of monostable multivibrators. Here, only two
pulses A and B are sequentially generated as shown Fig.10.60.
The sequence starts with the falling edge of the trigger pulse. The first monostable multivibrator is
edge triggered and output A changes from low to high. Output A will remain high for certain duration
depending upon the circuit parameters and then return back to low state. At that time, the next monostable
multivibrator will be triggered and output B changes from low to high. Then output B will remain high
for certain duration depending upon resistance and capacitance and again return back to low state. In
this way, two sequence pulses are generated. At the end of the output B, the sequence is completed and
all timers again wait for the next triggering signal.
Example 10.9 Figure 10.62 shows the connection of 556. Draw the output waveform and deter-
mine the pulse width of the output waveforms. Consider R1=1K ohm , R3=10K ohm
and C1=0.1F
Fig. 10.62
� Solution
Figure 10.63 shows the output waveform at A and B.
Pulse width of the output waveform A is TA=1.1R1C1= 1.1×1×0.1ms=0.11ms
Pulse width of the output waveform B is TB=1.1R3C1= 1.1×10×0.1ms=1.1ms
Example 10.10 Draw a circuit diagram to control speed of a DC motor using 555 timer.
� Solution
Figure 10.64 shows the speed control of DC motor using 555 timer. Here, the motor speed can be controlled
by varying resistance R2.
426 Digital Electronics: Principles and Applications
— Inputs
— Outputs –
A1 A2 B Q Q
L X H L H
X L H L H
X X L L H
H H X L H
H ↓ H
↓ H H
↓ ↓ H
L X ↑
X L ↑
Fig. 10.66 One shot trigger of monostable Fig. 10.67 Timing diagram of monostable
multivibrator IC 74121 multivibrator IC 74121
IC74121 is a non-retriggerable monostable multivibrator and it responses to a positive trigger pulse when it
is in stable state. When it is in quasi stable state after triggering, it will not respond to next trigger pulse until it
returns back to stable state. Therefore, this circuit is known as non-retriggerable IC. Figure 10.68(a) shows the
waveform of non-retrigger-
able monostable multivibra-
tor 74121 when interval of
triggering pulses are greater
than output pulse width Tw.
In Fig.10.68(b), interval of
triggering pulses are less than
output pulse width Tw but ad-
ditional pulses does not af-
fect in output as these extra
Fig. 10.68 Timing diagram of non retriggerable one shot multivibrator pulses are always ignored.
428 Digital Electronics: Principles and Applications
Example 10.11 Determine the pulse width of monostable multivibrator output as shown in
Fig. 10.66 if REXT = 100K and CEXT = 0.01µF
� Solution
Pulse width of monostable multivibrator output Tw =0.693 REXT CEXT =0.693×100×0.01ms=0.693ms.
Example 10.12 A pulse with 100 µs pulse width will be generated from IC74121. Determine the
resistance and capacitance values, which are used in IC 74121 circuit.
� Solution
Pulse width of monostable multivibrator output Tw =0.693 REXT CEXT = 100µs
Consider CEXT =0.01µF
100
Then REXT = ohms=14.43K ohm
0.693 ¥ 0.01
are negative edge trigger, while B1 and B2 are positive edge trigger. Table 10.4 shows the functional
— —
table of monostable multivibrator. If A1 and A 2 are grounded and B2 is high, B1 can trigger the monostabe
IC when its voltage changes from low to high. Then device output will be high for some time duration
depending upon the circuit resistance and capacitance. If B1 and B2 are high, the monostabe IC can also
— —
be triggered when A1 and A 2 inputs changes from high to low transition. If the CLEAR input is activate
by making it low, the output will go low at the same time and will stay low. When the clear input is low,
the IC will not respond to negative edge triggering as well as positive edge triggering.
— — Inputs Outputs –
CLEAR A1 A2 B1 B2 Q Q
L X X X X L H
X H H X X L H
X X X L X L H
X X X X L L H
H L X ↑ H
H L X H ↑
H X L ↑ H
H X L H ↑
H H ↓ H H
(Contd...)
430 Digital Electronics: Principles and Applications
Figure 10.69(a) shows the retriggering action of 74122 when the interval between trigger pulses
is greater than the plush width output. Using 74122 pulse width can be extended. In Fig.10.69(b), the
device is triggered by the first triggering pulse and output will be high. After very short time interval,
another trigger pulses arrives and the
device again triggered. Therefore,
output pulse width can be extended as
shown in the timing diagram.
An external timing capacitor is
connected between Cext and Rext/Cext. To
use the internal timing resistance, Rint
is connected to VCC. To improve pulse
duration accuracy and repeatability, an
external resistor is connected between
Rext/Cext and VCC with Rint open circuited.
To get variable durations, an external
variable resistance may be connected
between Rint or Rext/Cext and VCC.
Internal timing resistance, Rint of
74122 is about 10K ohm and Rext may Fig. 10.73 Graph between pulse width (tw )vs Rext and Cext
be varied from 5 to 50K ohms. There
is no limitation on the maximum value of Cext. The output pulse width duration depends on the values
of Rext and Cext. When the external timing capacitor is smaller than 1000pf, the pulse width should be
determined using the timing chart as shown in Fig. 10.73. If the value of the external timing capacitor is
greater than 1000pF, the pulse width duration can be expressed as
Ê 0.7 ˆ
Pulse width, Tw = KRext Cext Á1 +
Ë Rext ˜¯
Example 10.13 Calculate the Rext and Cext of 74122 multivibrator to generate a 20µs pulse width.
� Solution
Ê 0.7 ˆ
Pulse width , Tw = KRext Cext Á1 + ˜
Ë Rext ¯
0.7
= KRext Cext + KRext Cext = KRext Cext + 0.7 KCext
Rext
The external resistance in terms of capacitance can be expressed as
T
Rext = (TW – 0.7KCext)/KCext = W - 0.7
KCext
The duration of pulse width Tw=20s
Choose Cext = 0.01µF
From manufacturer data sheet, we get K=0.30
T 20
Therefore, Rext = W - 0.7 = Kohms - 0.7 = 6.66Kohms
KCext 0.3 ¥ 0.01
– Inputs Outputs –
A B CLR Q Q
↓ H H
L ↑ H
L H ↑
X X L
X X ↓
432 Digital Electronics: Principles and Applications
Fig. 10.76(a)
Multivibrators 433
Fig. 10.76(b)
Fig.10.76(c)
Figure 10.76 Timing diagram of retriggerable monostable multivibrator using 74123 (a) retriggered
to extend pulse width (b) reduce pulse width with CLEAR (c) 100% pulse width with retriggering
SUMMARY
Clock pulses are required to drive sequential logic circuits and these clock pulses are generated from timing circuits
namely oscillators and multivibrators. In this chapter, clock oscillator-using BJT is explained. The astable multivibrator
has no stable states and it is used as an oscillator to produce a train of rectangular pulses. The monostable multivibrator
has one stable state and it is also called as one shot. This circuit is used to generate a pulse of predefined period
in response to a trigger pulse. The bistable multivibrator has two stable states. This multivibrator output changes
from one stable state to other stable state when trigger pulses are applied. Schmitt trigger circuit is used to convert
irregularly varying signals into rectangular pulses. The astable, monostable and bistable multivibrators using logic
gates, operational amplifiers and 555 timer circuits are incorporated in this chapter. The most commonly used ICs 55
timer, 556 timer, 74121 nonretriggerable one shot, 74122 retriggerable one shot, and 74123 retriggerable one shot are
also explained in this chapter. These ICs are used to generate timing pulses as these are cheap, occupy very little space
and very much reliable.
REVIEW QUESTIONS
10.1 Define multivibrator. What are the types of multivibrator? Explain any one multivibrator with circuit
diagram and waveforms.
10.2 Draw the circuit diagram of monostable multivibrator using BJT and explain its operation.
10.3 Justify that Fig.10.77 behaves as an monostable multivibrator
Fig. 10.77
10.4 Verify that Fig.10.78 behaves as an astable multivibrator
Fig. 10.78
10.5 Explain application of operational amplifier in monostable multivibrator circuit. Why Zener diodes
are used in this circuit?
10.6 Draw the functional block diagram of 555 timer. Explain the operation of different section of 555 timer.
10.7 Describe the monostable operation of 555 timer. Derive a expression to determine the pulse width.
10.8 Draw the voltage waveforms of the Fig. 10.79 at A and B.
436 Digital Electronics: Principles and Applications
Fig. 10.79
10.9 What are the applications of 555 timer? Explain any two applications briefly.
10.10 What is pulse sequencer? Draw a pulse sequencer circuit and explain it’s operation.
10.11 Consider IC 555 timer is operating in stable mode with R1= 4.7K ohms and R2= 2.2 K ohms. If the
timing capacitor is 0.47F, determine the frequency of oscillations of the multivibrator circuit
10.12 If IC 555 timer is operating as an monostable multivibrator to generate a pulse width of 25µs, give
details of the circuit.
10.13 What are the advantages of Schmitt trigger circuit? Explain the operation of a schmitt trigger circuit
using operational amplifier.
10.14 What is the difference between non-triggerable and re-triggerable monostable multivibrator circuit?
Explain with necessary diagram.
10.15 Draw the logic diagram, truth table and typical waveforms.
(a) 74121 non-triggerable monostable
(b) 74122 retriggerable monostable
(c) 74123 retriggerable monostable
10.16 Determine the frequency and duty cycle of the output of an astable multivibrator-using timer 555 if
R1= 205K ohm, R2= 40K ohm and C = 0.1F.
10.17 Determine the timing capacitor of an astable oscillator when the clock output frequency is 50KHz.
Assume resistance R1 and R2 as per requirement.
10.18 If Vref =-2V and Vi=5 sin ωt in Fig. 10.80, draw the output waveform.
Fig. 10.80
10.19 Calculate the Rext and Cext of 74122 multivibrator to generate a 100µs pulse width.
10.20 A pulse width 10µs pulse width is generated from IC74121. Determine the resistance and capacitance
values, which are used in IC 74121 circuit.
CHAPTER
11
ANALOG DIGITAL
CONVERSION
11.1 INTRODUCTION
Sensors are used to measure physical quantities, such as temperature, pressure, voltage etc. If the output
of the sensor is digital, the digital circuits can be directly connected to sensor devices as the sensor
devices are intrinsically digital themselves. Then digital circuits directly connected with computer to
store data for further processing. In this way, sensors are used to monitor any physical changes, namely
temperature, pressure, etc. When the output of sensors is analog, the interfacing between computer and
sensor becomes complex. Then it is required to electronically translate analog signals into digital signals.
An analog-to-digital converter (ADC) performs the required task while a digital-to-analog converter
(DAC) performs the reverse operation of ADC. For computer added monitoring signals of analog
sensors, the output of analog sensors are converted from analog to digital. Input signals of ADC are
analog electrical signals such as voltage
or current and outputs of ADC is a binary.
Figures 11.1 (a) and (b)show the analog
signal and digital signals respectively.
Figure.11.2 (a) shows the block
diagram of ADC. The input signal of
ADC is either analog voltage or current
signal but output is digital. In a DAC,
inputs are binary form and output is an
analog voltage or current. Figure.11.2 (b)
shows the block diagram of DAC. Fig. 11.1 (a) Analog Signal (b) Digital Signal
feedback speed signal is fed to a ADC and output of ADC are connected with computer. In computer, the
required reference speed is compared with feed back speed and generates a digital command signal to
run the motor at reference speed. As the output command of computer is digital one, it is converted into
analog signal by using DAC. Then the output of DAC signal actually controls motor speed. Figure.11.3
shows the block diagram of computer aided
control system using ADC and DAC. It is
very easy to understand the conversion
from digital signal into an analog signal
than from analog to digital. The conversion
of DAC and ADC are explained in Section
11.6 to 11.14.
Fig. 11.3 Computer aided control using ADC and DAC
Before point A, control signal is high, output voltage follows analog input voltage. At the instant of
point A, control signal changes from high to low, but the switch does not opened momentarily due to
propagation delay. At instant B, switch starts to open and output voltage will be equal to input voltage at
440 Digital Electronics: Principles and Applications
that point. At point C, switch is completely opened and output voltage does not follows input voltage but
output voltage will be fixed and hold this fixed voltage till the control signal becomes high and switch is
closed. At instant D, control signal becomes high from low, but switch will not be ON momentarily as there
is some ON time delay. Therefore, after certain time delay, switch will be ON and output signal follows
input signal from point E.
In practice, the sampled
signal takes some time to
track to the input signal.
This is known as the ac-
quisition time. The sam-
pled output continues to
track the input signal for
a short period after switch
over. This is known as
the aperture time. Despite
the high impedance of
the buffer, there is an in-
evitable droop in sampled
voltage during the hold
period. These values are
highly exaggerated in this
Fig. 11.10 Operation of sample and hold circuit
section.
Aperture time
The time is required for the sample-and-hold switch to open, and it is independent of delays through
the switch driver and input amplifier circuitry. The switch opening time is that interval between the
conditions of 10% open and 90% open. During the time interval between the sample and hold, switch is
opened and output is settled with in specified error. This time interval is called as aperture time. The time
duration BC is actually aperture time as shown in Fig.11.10. Aperture time is required for the sampling
switch to open after the sample and hold command has switched from sample to hold.
Settling time
The settling time is the time interval between the transition of sample and hold command and the time
when output is settled within a specified error. In Fig 11.10, the time duration AC is known as settling
time (ts) .
The minimum sample and hold time is summation of acquisition time (ta) and settling time (ts).
T=ts+ta
Therefore, the maximum sampling frequency is equal to
Analog Digital Conversion 441
I 1
f = =
T ta + t s
11.3 QUANTISATION
The quantisation of analog signal is to divide the complete amplitude range of analog signal into a
number of equal intervals. Binary equivalent number can represent each interval. This operation can
be performed by analog to digital converter. To get better resolution, large number of bits is used to
represent a analog signal. If four-bit analog to digital converter is used, the reference voltage is divided
into 16 parts. When reference voltage 15 is divided into sixteen equal divisions, each division represents
15/16 V. Resolution is the measure of the smallest change in output voltage which is the fraction of full
scale range of analog to digital converter. When ‘n’ is the number of bits, the percentage of resolution
1
of ADC is n ¥ 100 .
2 -1
1
If n = 8, the percentage resolution of ADC is 8 ¥ 100 = 100 / 255 = 0.392. When ADC converter
2 -1
resolution is very high, noise voltage is generated in ADC converter circuit. If noise voltage is greater
than the resolution of the A/D converter, the signal and noise cannot be distinguished. Table 11.1 shows
the resolution of DAC and ADC.
442 Digital Electronics: Principles and Applications
1
n=8 ¥ 100 = 0.392
2 -18
1
n=10 ¥ 100 = 0.976
2 -1
10
1
n=12 ¥ 100 = 0.0244
2 -1
12
1
n=16 ¥ 100 = 0.00153
2 -1
16
Binary digit 23 22 21 20
Digit value 8 4 2 1
Binary equivalent weight 8/15 4/15 2/15 1/15
Table 11.3
Example 11.1 What is the output voltage of current summer as shown in Fig.11.12 ?.
Consider R1 = R2= R3= R4= Rf =1K ohm, V1= V2= V3=10 V, and V4=0V.
� Solution
The currents I1, I2, I3 and I4 are
V1 10V V 10V
I1 = = = 10mA, I 2 = 2 = = 10mA,
R1 1Kohm R2 1Komh
V3 10V V 0V
I3 = = = 10mA, I 4 = 4 = = 0mA
R3 1Komh R4 1Komh
digital data can be mapped into a single analog output voltage. Therefore, the analog output of the DAC
is a voltage that is some fraction of a reference voltage.
So, VOut = K×VRef.
where, VOut is the analog voltage output, VRef is the reference voltage and K is the fraction.
Figure.11.13 shows the block diagram of a DAC converter. When a DAC has ‘N’-bits digital inputs
b0, b1, b2, b3… bN-1) and a reference voltage, VRef. The voltage output, VOut of an N bits straight binary
DAC can be expressed as
VOut = K × VRef × Digital inputs
Where, K is scaling factor
Digital input = 2N–1bN–1+2N–2bN-2 +
2N–3bN–3 +………+22b2 + 21b1 + 20b0
N = number of bits
bN–1 - Most significant bit
Fig.11.13 Block diagram of a digital to analog
b0 - Least significant bit converter
The basic architecture of ADC converter without S/H circuit is shown in Fig.11.14. It consists of
binary switches, scaling network and output amplifier. The reference voltage, binary switches and
scaling network convert digital inputs into voltage or current or charge signals. The output amplifier
amplifies the output of scaling network to a desired measurable value.
STATIC CHARACTERISTICS
The static characteristics of DAC are full-scale value (FS), dynamic range (DR), integral non-
linearity(INL), differential non-linearity (DNL), resolution, signal to noise ratio. These characteristics
are not time dependent.
Full-scale value
The input and output characteristics of 3-bit unipolar and bipolar DAC are shown in Fig.11.15(a) and
(b) respectively . The eight possible digits would have unique analog voltage. The analog equivalent of
Analog Digital Conversion 445
LSB is VRef /2N. As resolution of DAC is finite, the maximum analog output voltage will not be equal to
VRef. This characteristic can be explained by full-scale value. The full-scale value or range (FSR) means
the difference between analog output voltage for the MSB and analog output voltage for LSB. The full
scale of DAC may be expressed
Fig.11.15 (a) Ideal input output characteristics of 3-bit unipolar DAC and
(b) Ideal input output characteristics of 3-bit bipolar DAC
INLn = (DAC output value for input code with actual finite resolution - DAC output value for input
code with ideal finite resolution)
Differential nonlinearity (DNL)
Differential non-linearity is measured from bit to bit deviations or the difference between two adjacent
levels. Actually, it measures bit-to-bit deviations from ideal DAC output value rather than the entire
range of output. Differential non-linearity of a DAC is depicted in Fig.11.16.
Monotonicity means that the digital input to the converter increases over its full-scale range. The
slope of the transfer characteristics is never negative in monotonic converter.
Resolution It is defined as the smallest change in the analog output voltage with respect to the value
of reference voltage.
Offset Offset of the DAC is defined as the amount of shift in the input-output characteristics when
digital input is 000. This is similar to the operational amplifier’s offset voltage. Figure 11.17 shows the
offset error of a DAC
Fig. 11.21 3-bit binary weighted DAC Fig. 11.22 Weighted 4-bit binary DAC
Figure 11.22 shows the circuit diagram of weighted 4-bit binary DAC. The analog output voltage of
a 4-bit weighted DAC can be expressed as follows:
Four input currents I1, I2, I3, I4 and feed back current If are determined from the following
expressions
Table 11.4 Binary input and analog output Table 11.5 Binary input and analog output
voltage
Binary Input Output Voltage
Binary Input Output Voltage 000 0.00 V
000 0.00 V 001 −1.00 V
001 −1.25 V 010 −2.00 V
010 −2.50 V 011 −3.00 V
011 −3.75 V 100 −4.00 V
100 −5.00 V 101 −5.00 V
101 −6.25 V 110 −6.00 V
110 −7.50 V 111 −7.00 V
111 −8.75 V
VRef
If = - N -1
(2 N - 1 bN - 1 + 2 N - 2 bN - 2 + 2 N - 3 bN - 3 + ◊◊◊◊◊◊◊◊◊ + 22 b2 + 21 b1 + 20 b0 )
2 R
Rf VRef R f
Vout = - Voff - N -1
(2 N - 1 bN - 1 + 2 N - 2 bN - 2 + 2 N - 3 bN - 3 + ........... + 22 b2 + 21 b1 + 20 b0 )
Rout 2 R
b7 b6 b5 b4
= = = = 10
b3 b2 b1 b0
When Rex is equal to 8R, the above relationship will be exist only.
11.6.4 BCD D/A Converter
Figure 11.27 shows the BCD D/A converter. Weighted resistances are used in this DAC. A group of
four resistances is used for least significant digit and the other group of four resistances is for most
significant digit. The weight of one group resistance is ten times of another group resistance. Therefore,
the large spread resistances create problems. The extended capacity DAC can also be used in BCD D/A
converter as depicted in Fig. 11.28. The least significant digit is represented by b0, b1, b2, and b3 and the
most significant digit is represented by b4, b5, b6 and b7. When Rex= 4.8R, the most significant digits to
least significant digits ratio will be
b7 b6 b5 b4
= = = = 10
b3 b2 b1 b0
Fig. 11.27 Two digits BCD D/A converter Fig. 11.28 Improved two digits BCD D/A converter
Looking from Section A -A′, we find that resistance 2R is parallel with 2R resistance (2R||2R). Then
V
the equivalent resistance=R and equivalent voltage is REF ◊
2
Looking from Section B -B′, R is series with R and sum of these resistances parallel with 2R. Then
V
equivalent resistance=R and equivalent voltage is REF ◊
22
Looking from Section C -C ′, R is series with R and sum of these resistances parallel with 2R.
V
Subsequently, the equivalent resistance is equal to R and equivalent voltage is REF ◊
23
V
Then the equivalent resistance of circuit is R + 2R = 3R while b0 = 1, b1 = 0, b2 = 0. Hence REF
3
is
applied to an operational amplifier through resistance 3R. 2
V
Similarly, the equivalent circuit for b1 is Requ= 3R and Vin = REF and the equivalent circuit for b2 is Requ
VREF 22
= 3R and Vin = ◊. The complete equivalent circuit of Fig. 11.29 is shown in Fig. 11.30(d).
2
R-2R ladder circuit works on the fact that the current reduced by a factor of 2 for each digital input
from LSB to MSB. The I0, I1, and I2 currents are as follows:
Ê ˆ
Vout = – (I2 + I1 + I0)Rf = - VREF b2 + VREF b1 + VREF b0 R f
Á 2 ¥ 3R 2 2 ¥ 3R 23 ¥ 3R ˜¯
Ë
V Rf
= - REF3
(4b2 + 2b1 + 1b0 ) = - K (4b2 + 2b1 + 1b0 )
2 3R
VREF R f
where, K = - 3
2 3R
In this way, the larger component spread problem has been eliminated and current flows through the
resistance can not changed due to switching and behave as constant voltage source. This DAC is as fast
as the binary weighted resistance DAC.
Figure 11.31 shows the ‘N’ bit R-2R ladder circuit and its equivalent circuit is depicted in Fig. 11.32.
The output voltage of ‘N’ bit R-2R circuit can be expressed as
Vout = –(IN – 1 + IN – 2 + ....... + I2 + I1 + I0)R f
V Rf N -1
= - REFN
(2 bN - 1 + 2 N - 2 bN - 2 + 2 N - 3 bN - 3 + 22 b2 + 21 b1 + 20 b0 )
2 3R
Fig. 11.31 N bit R-2R ladder circuit Fig. 11.32 Equivalent circuit of N bit
R-2R ladder circuit
Example 11.2 Determine the output voltage of the circuit as shown in Fig. 11.33 when digital
inputs are 0010 and 1010.
� Solution
The output of a 4-bit R-2R ladder circuit is
V Rf
= - REF
4
(8b3 + 4b2 + 2b1 + 1b0 )
2 3 R
Given data are VREF =12V, Rf=10K and
R = 5K
If b3= 0, b2= 0, b1= 1, b0= 0,
the output voltage Vout
Fig. 11.33
12 10
=- 4 ¥ (8 ¥ 0 + 4 ¥ 0 + 2 ¥ 1 + 1 ¥ 0) = -1V
2 3¥5
When b3= 1, b2= 0, b1= 1, b0= 0,
12 10
the output voltage Vout = - ¥ (8 ¥ 1 + 4 ¥ 0 + 2 ¥ 1 + 1 ¥ 0) = –5V
2 4
3¥5
454 Digital Electronics: Principles and Applications
(a) (b)
Fig. 11.36 (a) Current mode binary weighted DAC with resistor based and (b) Current
mode binary weighted DAC with current source based
The current mode DAC generally converts the reference voltage into a set of binary weighted
currents. Then these currents are applied to an OP AMP in the inverting configuration and generate the
output voltage Vo. Figure 11.37 shows the generalised current mode DAC. The output voltage Vo can be
expressed as
Vo = –Rf (I0 + I1 + I2 + ............ + IN – 1)
Fig. 11.37 (a) Generalised current mode DAC and (b) Generalised current mode DAC
The ‘N’ bit binary DAC consists of ‘N’ weighted current sources in the ratio 1:2:4: ….. 2N – 1. The MSB
switches the current 1 and the LSB switches the current 2N – 1. Theoretically, the basic concept is simple but
this current mode DAC has practical limitations as manufacturing an economical size current ratio 1:128 for
a 8-bit DAC is very difficult. This circuit is enormous and they should match temperature coefficients.
This type of DAC requires precision current sources. When all the digital inputs are zero, not a single
current source is connected with operational amplifier. Then output current iout = 0. The binary input
signals control whether the current sources are connected to either non-inverting terminal of OP-AMP
or ground. The output current iout varies in the range of
0 + I1 + I2...IN – 1 ≥ iout ≥ 0
I
The advantage of the current mode DACs is the high current drive inherent in the system. But the
precision current sources are required to generate a high resolution which is dependent on how well the
current sources can be matched with the binary weight. The other problem associated with this current
mode DACs is the error due to the switching.
Fig. 11.38 3-bit switched capacitor DAC Fig. 11.39 Capacitor divider
Analog Digital Conversion 457
Resolution The resolution of D/A converter refers to the smallest change in the analog output volt-
age. It is equivalent to the value of the Least Significant Bit (LSB). For a N-bit D/A converter, maximum
number of steps is 2N - 1. When the reference voltage is V, the Least Significant Bit (LSB) value is
Reference Voltage V
Resolution = = N
Number of Steps 2 −1
For an-8 bit D/A converter with a full scale output of 10V, the resolution is equal to
10 10
= = 39.2 mV
2 -1
8
255
458 Digital Electronics: Principles and Applications
Example 11.3 When digital input of a 4-bit DAC is 1111, analog output voltage of DAC is 12V.
What will be the output voltage for digital input 1001?
� Solution
Analog output voltage = K × digital input
Here analog output of DAC is 12V. Therefore, 12=K × 15
12
So, K =
15
When the digital input= (1001)2= 9, anlog output voltage of DAC is equal to K × digital input
12
= ¥ 9 = 7 ◊ 2V
15
Analog Digital Conversion 459
� Solution
1
Percentage resolution of 10-bit DAC = ¥ 100 = 0 ◊ 976%
210 - 1
Example 11.6 Determine the output voltage of the circuit as shown in Fig. 11.42, when
Roff = 1 K ohm, Voff = –2V and binary input is 101.
� Solution
The output voltage can be expressed as
Rf Rf Rf Rf
Vout = - ( V1 + V2 + V3 ) - Voff
R1 R2 R3 Roff
Ê Rf Rf Rf ˆ Rf
= -Á b2 + b1 + b0 ˜ V - Vof
Ë R1 R2 R3 ¯ Roff
When Roff =1Kohm , Voff = -2V and binary
input = 101, the output voltage is equal to
Fig. 11.42
Ê4 4 4 ˆ 4
Vout = - Á ¥ 1 + ¥ 0 + ¥ 1˜ ¥ 5 - ¥ ( -2) = -12 V
Ë1 2 4 ¯ 1
Fig. 11.44 Functional block diagram and pin assignments of 12-bit DAC80
The monolithic digital-to-analog converter IC DAC80 is a 12-bit D/A converter. It consists of 12-bit resistor
ladder network, current switches, reference control circuits and output amplifier as shown in Fig. 11.44 and
provides a highly stable reference capable of supplying up to 2.5mA to an external load without degradation
of D/A performance. This IC can be able to provide accurate and reliable performance over temperature and
power supply variations. The use of a zener diode as the basis for the internal reference contributes to the
high stability and low noise of the device. The DAC80 can be operating at supply voltages as low as ±11.4V
without loss in performance or accuracy over any range of output voltage. The reliability of the monolithic
DAC80 is improved by using ceramic package. This IC also operates in wide temperature range. The offset
and gain error of DAC80 can be adjusted by external offset adjustment and gain adjustment resistance e-
brazed ceramic and low-cost molded plastic.
The PCM54 and PCM55 are parallel input, fully monotonic, 16-bit digital-to-analog converters that
are designed and specified for digital audio applications. The PCM54 is packaged in 28-pin plastic DIP
package and the PCM55 is available in a 24-lead plastic miniflat pak. These devices employ ultra-stable
nichrome thin-film resistors to provide monotonicity, low distortion, and low differential linearity error
over long periods of time and over the full operating temperature. These converters consist of a stable,
low noise, internal, zener voltage reference, high speed current switches, a resistor ladder network, and
a fast settling, low noise output operational amplifier all on a single monolithic chip. The converters
are operated in the voltage range from ±5V to ±12V. Power dissipation with ±5V supplies is less than
200mW. A current output option is provided in this DAC. This output typically settles to within ±
0.006% of FSR final value in 350ns. Figure 11.46 shows the connection diagram of 16-bit D/A converter
PCM54 and PCM55. These devices have the following features:
fast speed ADCs. Single slope and duel slope serial ADCs are slow speed type and its resolution is very
high and accuracy is very good. Medium speed ADCs are successive approximation ADCs and Parallel
or flash ADCs is high speed ADCs. Resolution is moderate for medium speed ADCs and resolution is
low for flash ADCs. Accuracy of medium speed ADCs is good but flash ADCs has limited accuracy.
Differential non-linearity (DNL) of ADC is the difference between two adjacent codes at each vertical
step and it always expressed in terms of LSBs. The differential nonlinearity of an A/D converter is DNL=(D-
1) LSBs, where D is the actual vertical step. Fig. 11.51 shows the differential non-linearity of a 3-bit ADC.
The integral nonlinearity (INL) of an ADC is the maximum difference between the ideal finite resolution
characteristics and the actual finite resolution characteristics. It is also measured in terms of LSBs. If INL
is less than 1 LSB in a measuring instrument, it will be acceptable. Sometimes, in ADCs the actual input-
output characteristics is shifted horizontally from the ideal input-output characteristics with some offset.
The offset error is actually the horizontal difference between the actual and ideal characteristics as depicted
in Fig. 11.52. Gain error is a difference between the actual characteristics and ideal characteristics and it is
directly proportional to the magnitude of the analog input voltage as shown in Fig. 11.53.
Fig. 11.50 Non-monotonic ADC with missing Fig. 11.51 Differential non-linearity of ADC
code and wide code code
Fig. 11.52 Offset error of ADC Fig. 11.53 Gain error of ADC
464 Digital Electronics: Principles and Applications
ii. The counter outputs are fed into a DAC to generate a ramp output.
counter operates in down counting mode. Therefore, the DAC output always counts in the proper direc-
tion to track the input signal and the counter’s output updated on each clock pulse. The advantage of this
converter is high speed as the counter never reset. It is much faster update than single slope ADC. Figure
11.59 shows the digital output to track an analog input voltage. Initially, counter catch up the analog input
voltage. In dual slope serial ADC the rate of change of output is identical to the first counting ADC.
Fig. 11.58 Dual slope analog to digital converter Fig. 11.59 Digital output of dual slope ADC
to track an analog input voltage.
1 t Vi
VO = - Ú Vi dt = - t
RC 0 RC
This output VO feeds to the comparator and it is compared with reference voltage 0V. Therefore, the
comparator output is high and fed to the AND gate. Then clock pulses are gated into the counter. The counter
counts from 0000…00 to 1111..11 when 2N –1 clock
pulses are applied. When the next clock pulse is applied,
the counter is reset and the switch S1 will be connected to
reference voltage -VR. As a result the capacitor starts to
discharge. The output of the integrator now goes up at a
fixed rate, as VR, R and C are all constant values. Figure
11.61 shows the waveform of integrator voltage VO and
comparator voltage VC.
If the comparator voltage is high, counter continu-
ously counts till Vo<0. When the integrator voltage
reaches 0V, the comparator output goes LOW. Then
clock pulses are no longer gated into the counter and
the counter stops counting. It is clear from Fig.11.61
that the capacitor is charging during the time interval
0 to T1 and the capacitor discharges during T1 to T2.
The counter output is directly proportional to (T2 - T1). Fig. 11.61 Waveform of Vo and VC
Actually, this time interval is measured to determine
the input voltage.
V
At t = T1, the output voltage VO = - i T1 and the capacitor starts to discharge.
RC
At this instant, output voltage Vo can be expressed as
V V
VO = - i T1 + R (t - T1 )
RC RC
At t = T2 , the capacitor is fully discharged and output voltage Vo= 0V.
Therefore,
V V VR V V
0 = - i T1 + R (T2 - T1 ) or, (T2 - T1 ) = i T1 or, (T2 - T1 ) = i T1
RC RC RC RC VR
N
If the clock time period is Tp and T1 = 2 Tp , the time interval T2-T1 can be determined by
V
(T2 - T1 ) = i 2 N Tp
VR
Vi N
Consider the counter value is N1 at the instant T2. Accordingly (T2 - T1 ) = N1Tp = 2 Tp
Vi N VR
N1 = 2
VR
It is clear from the above equation; the count vale N1 is directly proportional to analog input voltage
Vi. When VR=2N, the counter value is numerically equal to analog voltage, N1=Vi.
468 Digital Electronics: Principles and Applications
The accuracy of the duel slope integration ADC output depends on the reference voltage, VR and
clock frequency fp. These parameters can be made very stable. Therefore this circuit needs little
maintenance, and this circuit has also good accuracy and low cost. This type of ADC most commonly
used in instrumentation where signal changes slowly and rapid conversion is not required.
inverting terminal of a comparator and analog input voltage is also applied to the noninverting terminal
of all comparators . The outputs of comparators are fed to encoder through latches and the encoder
output is the digital data of analog input. When Vi is 0.7V, the output of comparator C7 and C6 are low
or logic level ‘0’ and other comparator C5, C4, C3, C2, C1 are high or logic level ‘1’ . In this case the
digital output of encoder is 101, which is equivalent to analog input voltage. In this way flash type ADC
converter converts analog input voltage into digital output with in one clock pulse but in two phases. In
the first phase, the analog input voltage is sampled and applied to the comparator inputs. In the second
phase, digital encoder determines the correct digital output and stores it in a register. Flash ADC can
be used as bipolar converter when weighted resistances are connected between +V and –V. Table 11.7
shows the analog input voltage, comparator outputs, and digital output of flash type ADC.
Advantage of flash converter is high speed but many comparators are required. For a three bit flash
converter, 7 comparators are required and 8-bit flash converter requires 255 comparators on a chip.
Therefore, power dissipation is very large.
Table 11.7 Analog input, comparator output and digital output of flash converter
Example 11.7 Design a 3-bit parallel comparator A/D converter in 2’s complement format.
� Solution
Let the analog input voltage range from 0 to V. Figure 11.72 shows the 3-bit parallel comparator A/D converter
in which reference voltage divided into eight intervals. For a particular input voltage, the comparator output
follows the Table11.8. Then comparator outputs are converted into 2’s complement format using decoder.
Analog Digital Conversion 475
Table 11.8 Analog input voltage, comparator outputs and 2’s complement
digital output of flash converter
Example 11.8 How many comparators are required to design a 12 bit flash type ADC?.
� Solution
Number of comparators are required to design a 12 bit flash type ADC=2N–1=212–1=4096–1=4095
where N=Number of bits=12
476 Digital Electronics: Principles and Applications
Example 11.9 Determine the conversion time of a duel slope 8-bit A/D converter. Assume analog
input voltage is 5V, reference voltage is 10V and clock frequency is 50KHz. What is
the maximum sampling frequency of the converter?.
� Solution
V
(a) Conversion time of A/D converter is t = 2 N Tp + i 2 N Tp
VR
where number of bits N = 8
analog input voltage Vi = 5V
reference voltage VR = 10 V
clock frequency fp = 50 kHz
1 5 1
Then conversion time t = 28 ¥ + ¥ 28 ¥ = 7 ◊ 68ms
50 ¥ 1000 10 50 ¥ 1000
(b) To determine the maximum sampling frequency, consider Vi = VR
V
conversion time t = 2 N Tp + i 2 N Tp = 2NTp+ 2NTp = 2N+1Tp
VR
1 1 f 50 ¥ 1000
The maximum sampling frequency f < = N + 1 = N p+ 1 = = 97 ◊ 65 Hz
t 2 Tp 2 29
11.16 ADC ICS
Commonly available ADC ICs are single channel 8-bit A/D converter ADC0800, eight channels 8-bit A/
D converter ADC 0808/0809, twe-
lve channels 8-bit A/D converter
ADC0816/0817, and 12-bit A/D
converter ADC80. The ADC0800 is
an 8-bit monolithic A/D converter
using P channel ion-implanted MOS
technology. It consists of a high input
impedance comparator, 256 series
resistors and analog switches, control
logic and output latches as shown in
Fig. 11.73. Conversion is performed
using a successive approximation
technique where the unknown analog
voltage is compared to the voltage
of R network using analog switches.
When the appropriate R network
voltage matches the unknown volt-
age, conversion is complete and the
digital outputs will be an 8-bit com-
plementary binary word correspond-
ing to the unknown voltage. Figure
11.74 shows the timing diagram of Fig. 11.73 Logic diagram of ADC0800
this converter. The features of the
Analog Digital Conversion 477
ADC0800 are low cost, input ranges ±5V to ±10V, no missing codes, ratio-metric conversion, TRI-STATE
outputs, contains output latches, TTL compatible, supply voltages 5 VDC and 12 VDC, resolution 8 bits,
linearity ±1 LSB, conversion speed 40 clock periods, and clock range 50 to 800 kHz. Table 11.9 shows the
maximum values of ADC’s performance characteristics.
Table 11.9 Performance characteristics of ADC0800
The ADC80 is a 12- bit successive approximation type A/D converter. It is available in 32 pin DIP.
The important performance characteristics of ADC80 are given in Table 11.10.
In various digital control systems, it is very useful to represent both positive and negative analog
quantities with binary codes. The most commonly used digital codes for analog to digital data
converters are straight binary, offset binary, two’s complement, ones complement and sign magnitude
codes. But offset binary and two’s complement are the most popular code for data converters. The
relationships between offset binary, two’s complement, ones complement and sign magnitude codes
for a 4-bit bipolar converter system is shown in Table 11.11. Assume that the ±5V is the full scale
input and output voltage range.
In offset binary code, the zero signal value is assigned to the code 1000 and the sequence of codes
is identical to straight binary code. But the difference between a straight binary code and offset
binary code system is the half–scale offset associated with analog signal. The most negative value,
–FS + LSB is allocated for the code 0001 and the most positive value, +FS - LSB is assigned for the
code 1111.
A bipolar DAC is one that can generate both positive and negative output voltages according to
the sign of its digital input. The relationship between the offset binary code and the analog output
voltage of a 3-bit bipolar DAC is shown in Fig. 11.77. The analog output voltage of the DAC is zero
for the digital input code 100. The most negative output voltage is generally represented by the code
001 and the most positive output voltage is also represented by the code 111. The output voltage for
the digital input code 000 is also available for use whenever required.
The offset binary code for a 3-bit bipolar ADC is shown in Fig. 11.78. The digital output of ADC is
a function of its analog input voltage. It is depicted in Fig. 11.78 that zero analog represents the center
of the mid-scale code 100. The most negative input voltage is generally represented by digital code
480 Digital Electronics: Principles and Applications
SUMMARY
In this chapter, different types of analog to digital and digital to analog converters are explained with diagrams. To
increase number of bits, D/A converters are connected in cascade. The slow speed A/D converters are single slope
serial ADC, dual slope integrating ADC, ADC using voltage to frequency converter and ADC using voltage to time
conversion. The medium speed A/D converter is successive approximation type and Parallel/flash converter is high
speed ADC. All these converters are incorporated with their merits, demerits and limitations. The parallel comparator
type is the fastest one but numbers of comparators are required more with number of bits. Therefore, successive
approximation type ADC is most commonly used, as it requires less hardware. Dual slope A/D converter is also very
popular in specified applications, namely digital instruments measuring voltage, current, etc. where speed is not very
important parameter. The static and dynamic characteristics of DAC and ADC have been discussed in this chapter.
The A/D and D/A converter ICs are also discussed in this chapter. The output of ADC and DAC ICs are compatible
with TTL, CMOS etc. logic families.
17. A 12-bit A/D converter has the input voltage signal from 0V to +10V. The voltage equivalent to 1
LSB will be
(a) 0 (b) 1.2mV (c) 2.4mV (d) 0.833V
18. The number of comparators used in 3 bit parallel converter is
(a) 7 (b) 8 (c) 6 (d) None of these
19. An offset voltage ½ LSB is adder to the successive approximation ADC
(a) Improve the conversion speed (c) Reduce the maximum quantisation error
(b) Increase accuracy (d) None of these
20. Static characteristics of DAC is
(a) Conversion speed (c) Aperture time
(b) Acquisition time (d) Dynamic non-linearity (DNL)
REVIEW QUESTIONS
11.1 What is DAC? Write few applications of DAC.
11.2 Explain static and dynamic characteristics of DAC with examples.
11.3 Define resolution, accuracy, settling time, dynamic non-linearity of DAC.
11.4 Draw the N bit binary weight DAC and explain its operation. What are the disadvantages of binary
weight DAC? What is the difference between binary weight DAC and R-2R ladder DAC?
11.5 A 8 bit D/A converter has a full scale analog output of 10V. What is the analog voltage for each
step?
11.6 Draw R-2R ladder circuit for 3 bits and 6 bits. Explain their operation using equivanlent circuits.
11.7 Calculate the resolution the following DACs
(a) 4 bit (b) 8 bit (c) 12 bit (d) 16 bit
11.8 Explain the operation of sample and hold circuit with diagram. Why sample and hold circuit is used
in ADC? What is acquisition time, aperture time, and aperture jitter?
11.9 Define resolution of DAC. How will you improve it? Determine the resolution of 16 bit DAC in
percentage.
11.10 Define ADC. What are the types of ADC? Write some applications of ADCs.
11.11 List the slow speed ADCs. Write the operating principle of single slope serial ADC with diagrams.
What are the disadvantages of single slope serial ADC?
11.12 Explain the counting type ADC with a suitable diagram. What are the limitations of this converter?
How you can improve the performance of ADC?
11.13 Draw a dual slope integrating ADC and explain it’s working principle.
11.14 Explain the successive approximation ADC with a suitable diagram. Compare dual slope ADC and
successive approximation ADC in terms of accuracy, conversion speed and resolution. What is the
resolution of 12 bit successive approximation ADC.
11.15 Explain the operation of flash type ADC with a suitable diagram. What are the limitations of this
converter? Compare flash type ADC and successive approximation ADC in terms of accuracy,
conversion speed and resolution.
11.16 What is the difference between ADC using voltage to frequency converter and ADC using voltage
to time converter?.
484 Digital Electronics: Principles and Applications
If the clock frequency is 100 KHz and the converter has a resolution of 10 bits, what is the maximum
sampling frequency?
11.17 Design a 3-bit parallel-comparator A/D converter for 2’s complement format.
11.18 How many bits of ADC will be required if resolution is 25mV and full-scale voltage is 10V?
11.19 What is extended capacity of DAC? Design a two digit BCD DAC using 4 bit DAC.
11.20 In a 8 bit DAC, the weight of LSB is 0.10V. What is the voltage for the following words?
(a) 1111 1111 (b) 1111 0000 (c) 1000 1000 (d) 1001 1001
11.21 In a 8 bit R-2R ladder type DAC, the 100mA current is supplied by the MSB. What will be the cur-
rent supplied by LSB for this converter?.
11.22 Draw a table for successive approximation type 4bit ADC. What will be the digital equivalent of
analog voltage 5V?.
11.23 Time constant of a dual slope A/D converter is 100µs. Determine the rate of capacitor charging when
input voltage is 10V. What is the complete charging time of capacitor, T1?.
11.24 Justify the following statements
(a) N bit successive approximation ADC requires only N clock pulses for complete conversion
(b) Successive approximation ADC is faster than counting type ADC
(c) Quantisation error is ±½ LSB
(d) N bit flash comparator requires 2N-1 comparators.
11.25 Why 2N-1 comparators are required for an N-bit flash ADC? Draw the logic circuit diagram of an
N-bit flash ADC and explain it’s operation.
11.26 12-bit DAC provides maximum analog output voltage 10V. What is the resolution of DAC?
11.27 How many bits DAC are required when full scale output voltage is 10 V and its resolution is
10mV?
11.28 Design the circuit of a DAC, to convert digital signals in 1’s complement from to analog output
voltage.
11.29 Find the output voltage of the circuit as shown in Fig.11.79, when Roff =5Kohm, Voff = -5V and binary
input is 101.
Fig. 11.79
11.30 In a Voltage to frequency converter, the range of analog input voltage is 0 to 12V and the corre-
sponding frequency range is 0 to 10KHz. When this Voltage to frequency converter is used in a A/D
converter with a resolution of 8-bits, determine the digital output for 5V analog input voltage.
CHAPTER
12
SEMICONDUCTOR MEMORIES
12.1 INTRODUCTION
Data can be stored either in analog or digital form. In analog form, the magnitude of a voltage signal is
stored in a magnetic material by means of magnetisation. In audio and video technology, a thin plastic
tape made by particles of iron-oxide material can be magnetised or demagnetised by the application of
an electromagnetic field from an electromagnet coil. The data can also be retrieved from the magnetised
tape by moving the tape through another electromagnet coil. During retrieving the data, a voltage will
be induced across the coil due to the magnetised spots. The strength of magnetisation changes with time
means degrading of magnetisation. Therefore, analog signal reproduced from magnetic tape will be less
magnitude. In the same tape, data can also be stored in digital form. When the same tape is used to store
data in digital form, the strength of magnetisation on the tape should have two discrete levels high or low. If
the tape is exposed to artificial magnetic fields, some memory locations on the tape will be slight alteration
of magnetic field strength. Though the magnetic tape signal degraded or altered, no data corruption is
possible. Therefore, the most evident advantage of digital data storage is the resistance to corruption. But
sometimes the alterations or degradation will be very extreme that data on the tape will be corrupted but
the parity and checksum error detection techniques can be used to protect against data corruption.
Generally, memory devices are used to store digital information. The simplest type of digital memory
device is flip-flop, which is capable for storing single bit data, and is volatile and very fast. This device
is generally used to store data in form of registers. Registers are also used as main memory of computers
for internal computational operations. The basic goal of digital memory is to store and access binary
data, which is a sequence of 1’s and 0’s.
A memory cell unit is used to store a single bit
of information. A flip-flop, a charged capacitor, and
a single spot on a magnetic disk are examples of
memory cells. Figure 12.1 shows a memory cell
unit. This digital memory cell has three terminals
—
namely read/write (R/W ), address enable (AE) and
data in/data out and consists of D flip-flop, two
buffer, two AND gate and one inverter as depicted
in Fig.12.1. The data in and data out use a common
bus line by connecting two tristate buffers such as
input buffer and output buffer. The enable terminals
of buffer are connected with the output of AND Fig. 12.1 Memory cell unit
486 Digital Electronics: Principles and Applications
gates. When address enable AE = 0, both tristate buffer are disabled and they will be in high impedance
—
state. When address enable AE = 1, data read or data write operation will be performed based on R/W
signal. If R = 1 and AE = 1, output buffer will be enabled and read operation will be performed. When
—
W = 0 and AE = 1, input buffer will be enabled write operation can be performed.
A group of memory cells are used to represent data or program instructions. The actual information
being stored in the memory device is called as the data. The memory data size is variable depending
on the digital system. Typical data sizes are 4, 8, 16, 32, and 64 bits. A special term ‘word’ is used to
refer to a group of 8-bits or one byte. An 8-bit word contains 1 byte, and a 16-bit word contains 2 bytes,
etc. The total number of bits of a memory device is known as memory capacity. The more number of
bits in a device means the higher it’s density or capacity. Each word in a memory device or memory
system has a unique address. The location of this data within the storage device is typically called the
address. Memories are self-available in the form of integrated circuits so that it can hold information.
The memory chips also store information in binary from, which consists of 1’s and 0’s. In this chapter,
types of memory, memory organisation and it’s operation, programming of memory and memory ICs
have been discussed.
12.2 CLASSIFICATION OF MEMORY
There are two types of semiconductor memories, namely ROM and RAM. The ROM stands for read only
memory and data are permanently stored in memory cells. We can able to read data from the memory.
ROM cannot be reprogrammed. This memory is nonvolatile and data retain when power is switched
off. But the data contents of ROM are accessed randomly just like the volatile memory circuits. Vinyl
records and compact audio disks are typically referred as read - only memory or ROM in the digital
systems. The RAM stands for random access memory, which means that any storage memory location
can be accessed to read or write operation. RAM is volatile memory, so data will be lost if power is
switched off. In this section, classification of ROM and RAM are explained.
12.2.1 Classification of ROM
ROMs are manufactured with bipolar technology and MOS technology. Figure 12.2 shows the classifi-
cation of ROM. The different features of ROM, PROM, EPROM and EEPROM are explained below:
ROM (Read Only Memory) The data
is permanently stored in the memory and these
devices are mask programmed during manu-
facturing. ROMs cannot be reprogrammed and
nonvolatile type. These devices are cheaper
than programmable memory devices. The
applications of ROM are fixed programmed
instructions, look-up tables, conversions, and
Fig. 12.2 Classification of ROM
some specific operations.
PROM (Programmable Read Only) The data can be electrically stored. It can be programmed
by blowing built-in fuses and can be reprogrammed and nonvolatile type. These memory devices are
very low memory density and occupy more space.
EPROM (Erasable Programmable Read Only Memory) These are strictly a MOS device
and programmed by storing charge on insulated gates. These devices are erasable with ultraviolet rays
and reprogrammable after erasing. These memory devices are non-volatile type.
Semiconductor Memories 487
single bit. Data can be written and read with in nanoseconds. Usually TTL, ECL, NMOS and CMOS tech-
nology are used to manufacture static RAMs. When the power is shut off, data stored in cells can be lost.
Dynamic RAMs In a dynamic memory, data can be stored on capacitors and to retain data every
cell has to be refreshed periodically. One transistor is used to build memory cell and required less space.
These memories consume less power compared to static RAMs.
12.4 MEMORY
OPERATION
Memories can be building
up by flip-flops or capacitors
in semiconductor memories
and magnetism in magnetic
storage. The storage element
is called a cell. Each storage
element can store either logic
‘1’ or logic ‘0’. The simplified Fig. 12.5 Write data in address 0
Semiconductor Memories 489
• The corresponding address input lines of the ICs must be connected together. So that memory
size is fixed byte.
• The chip enable (CE) or chip select (CS) inputs of the ICs must be connected together.
• The number of output lines will be equal to the word size of each IC × the number of ICs used.
Suppose 1K × 1 memory can be used to develop 1K × 2 memory after connecting two 1K memory
ICs. Here memory size is fixed byte; word size is increased from 1 bit to 2 bit. Figure 12.12 shows the
connection diagram of two 1K × 1 ROMs expanded to 1K × 2 ROM. Another example is that four 1K
× 1 ROMs have been expanded to 1K ×4 ROM as depicted in Fig. 12.13.
• While two ICs are used, the chip enable (CE) or chip select (CS) input of one IC is connected with
MSB and the enable input of the other IC is connected with MSB through an inverter. Therefore,
only one of the ICs is enabled at a time.
• When more than two ICs are used in memory expansion, a decoder should be used to enable the
ICs, so that only one IC must be enabled at a time.
• The corresponding output lines
of the ICs should be connected
together.
Figure 12.14 shows the expansion
of memory to increase word capacity.
A 256×4 memory has 256 word
capacity and can store 256 × 4 =1024
bits. To expand the memory size from
1024 bits to 2048 bits, the above figure
will be used. Eight-address lines,
A0 to A7, are directly connected with
memory IC terminals. The chip select Fig. 12.14 Two 256 × 4 ROM expanded to 512×4 ROM
line is connected with most significant
bit address line and inverted MSB is connected with chip select line of the next IC. Therefore,
memory addresses from 0 to 255 are located first memory IC1 and memory addresses from 256 to
511 are also located in memory IC2. One memory will be selected at a time and data out from one
memory only. The corresponding output terminals are connected together for output. Figure 12.15
shows the connection of four 256 × 4 ROM to develop a 1024 × 4 ROM using 256 × 4 ROMs.
Example 12.1 Draw the diode ROM architecture for Table 12.3.
Table 12.3
Inputs Outputs
A B C F0 F1 F2 F3 F4
0 0 0 1 1 0 1 0
0 0 1 1 1 1 0 0
0 1 0 0 0 0 0 1
0 1 1 1 1 1 0 1
1 0 0 0 1 0 1 0
1 0 1 0 1 1 1 1
1 1 0 1 0 1 0 1
1 1 1 1 1 0 1 0
� Solution
Table 12.3 shows the truth table
of five output functions F0, F1,
F2, F3 and F4. The implementa-
tion of Table 12.3 using Diode
ROM is depicted in Fig. 12.17.
Here, three address inputs A,
B, C are fed to a 3-line to 8-line
address decoder. Based on the
address inputs, a particular row
will be selected and output will
be obtained at output lines. For
example, when A=B=C=0, the
first row will be selected and
output 11010 will be available
at output lines F0, F1, F2, F3
and F4. Fig. 12.17 Diode ROM implementation of Table12.3
Semiconductor Memories 495
Example 12.2 Implement the BCD to Excess-3 code conversion using ROM
� Solution
Table 12.4 show the BCD to excess-3 code conversion table. Figure 12.18 shows the implementation of
BCD to excess-3 converter using diode ROM. For a BCD code on address inputs, a particular row will be
selected and its equivalent gray code will be output at output lines of all columns. For example, excess-3
code of BCD input 0 (0000) is 3 (0011). If A=B=C=D=0 is applied to address decoder, the first row will be
selected and output 0011will be obtained at output lines D3 D2 D1 D0.
Table 12.4 Binary to Excess-3 converter
BCD Gray
A B C D D3 D2 D1 D0
0 0 0 0 0 0 1 1
0 0 0 1 0 1 0 0
0 0 1 0 0 1 0 1
0 0 1 1 0 1 1 0
0 1 0 0 0 1 1 1
0 1 0 1 1 0 0 0
0 1 1 0 1 0 0 1
0 1 1 1 1 0 1 0
1 0 0 0 1 0 1 1
1 0 0 1 1 1 0 0
Example 12.3 Draw a basic ROM array for four-bit binary–to-gray conversion.
manufactured with all of it’s transistors connected. The PROM is programmed by placing it into a
special instrument called as PROM programmer or PROM burner. The original chip is blank, and the
programmer burns in specific instructions. The programmer provides sufficient voltage and current in
the programming mode to burn out the desired fusible links and store 0. If the link is left as it is or intact,
the data 1 is stored. Initially, select the link using the PROM’s address and data lines, and then applying
a high voltage pulse to the device through a special input pin vaporizes the link. The advantage of the
PROM is user programmable but it can only be programmed once. Usually metal links, silicon links and
pn junctions are used to manufacture fuses.
Metal Links Metal links are made of nichrome material. Each bit in the memory array is represented
by a very thin layer link, which is connected between row lines and column lines. During programming,
this thin layer link is either blown off or left intact. The memory cell will be selected by address lines
and then passing about 20–50 mA current through the link to blown off.
Silicon Links These links are developed by a thin layer polycrystalline silicon fuse. Programming
of polycrystalline silicon fuses is done by passing a sufficient amount of current 20–30mA. Due to flow
of current, a high temperature is developed at the fuse location and then the silicon oxidises and forms
an insulation material. Therefore, the link will be opened.
Example 12.4 Implement the truth Table 12.6 using bipolar transistor PROM with fusible links
Fig. 12.30 EPROM Cell (a) avalanche injection (b) removing programming voltage
leaves charge trapped
The accumulated charge on the floating gate can be removed by ultraviolet light. Due to flow of
photo current from floating gate to the silicon substrate, the gate return back to initial condition after
discharging. In this case, EPROM cell will be off and will be at logic ‘0’. Figure 12.31 shows the
ultraviolet erasable PROM.
502 Digital Electronics: Principles and Applications
changes than EEPROM. It is changeable many 100s of thousands of times but slower than RAM to
access.
Flash memory uses a single transistor cell like the EPROM but the structure of the transistor is
different and slightly larger and allows for electrical erasing. Flash memory gets its name because of its
rapid erase and writes times. It is slightly more expensive than EPROM but much less expensive than
EEPROM. The advantage is that a higher density much closer to the EPROM is achieved and therefore
the price per bit is cheaper. Flash memory is typically erased in sectors rather than on an individual word
basis, which makes it less flexible than EEPROM. Another advantage of flash memory over EPROM
is that it can be reprogrammed while residing on board. Typical applications are solid-state disks and
firmware memory. The non-volatility, density, speed, and low power requirements of flash memory
make it an excellent substitute for replacing hard disks in low power computer systems.
Combinational Logic Implementation ROMs can be used any combinational logic func-
tion.Firmware: Programs and data that must be available on power up in microprocessors and micro-
controllers.
Bootstrap Memory A small program can be stored in ROM that directs a computer to load its
operating system from disk.
Data Converter Conversion from one data code to another is easily accomplished with a lookup
table in ROM.
State Machine Design The ROM can be used to design state machines.
RAM can store one bit data. In this figure, address lines select one M bit word out of 2N word. When the
—– —
chip enable input (CE ) is low, the chip will be enabled for read and write operation. The R/W inputs are
—
used as control signal of read and write operation. The R/W input is held at logic ‘1’ for read operation
and at logic ‘0’ for write operation. The timing diagrams of read and write operations of static RAM are
explained below.
— —–
READ Cycle Figure 12.40 shows the static RAM read cycle with address inputs, R/W , CE and
data output signals. Initially address inputs are applied to locate the address from which data will be read
—
and R/W =1 for memory read operation.
—–
As chip enable CE =1, the chip is not
active for read operation. When chip
enable signal is low, the memory chip
is activated. After certain propagation
delay, data will be available at output
terminals. This propagation delay var-
ies in between 30ns to 50ns. tAA is the
RAM access time which is the delay
time between the application of new
address and the output of valid data.
tOE is the time between the activation of
chip enable signal and the appearance Fig. 12.40 Timing diagr am of memory read operation
of valid output data. of static RAM
Fig. 12.42 (a) Logic diagram of RAM memory cell (b) block diagram of RAM memory cell
4-bit word information is stored in each memory location. All first column cells are connected with
common data input line D0. Similarly second, third and fourth column cells are connected with data
input lines D1, D2 and D3 respectively. In the same way all first, second, third and fourth column cells
—
data output lines are connected with OR gates as depicted in Fig.12.43 for output. When R/W = 0, input
—
data D3–D0 will be stored in memory location addressed by A1 A0. If R/W = 1, the stored data in the
memory location addressed by A1 A0 will be available at output terminals Q3 – Q0. If each memory cell
individually accessible, the memory can store 16 bit information, but output will be one bit only. For
this operation, the organisation of 4 × 4 RAM must be modified using another 2 line to 4 line decoder to
select particular column matrix. Then row decoder and column decoder decode one row and one column
every time. Therefore, the cell at the intersection of row and column will be selected for read as well as
write operation.
The basic structure of a 32x32 static RAM memory is illustrated in Fig. 12.44. This static RAM has
eight address lines. Five of the eight address lines (A4 – A0) are used for the row decoder to select one
of the 32 rows and three of the address lines (A7 – A5) are used for the output column decoder. During
memory write operation, the input buffers are enabled and four bits input data D3-D0 are routed through
510 Digital Electronics: Principles and Applications
the input data selector by the address bits A7 A6 A5 and stored into the selected address by the address
bits A4-A0. In the memory read operation, the output buffers are enabled and four data bits from the
—–
selected address come out on the data outputs Q3 – Q0. The chip enable (CE ) must be low for read and
write operation. The advantage of SRAM is that it is easy to use but the disadvantage is the size of the
memory cell, which reduces the density and increases the cost.
the resistance R3 to emitter ED, ED is more positive than ERX and ERY and ED does not conduct. Therefore,
transistors T5 and T6 are not conducting and they are OFF. So DATA signal is at logic level ‘1’ and retain
in this state independently of the state of the flip-flop.
When the cell is addressed by raising both RX and RY to logic level ‘1’, the currents through ERX and
ERY can be diverted to ED. Therefore part of ED current will flow into the base of transistor T5 and DATA
output signal will be the same logic level of T1. Hence, with the read/write at logic level ‘0’, both G1 and
G2 gates are disabled and read operation is performed by proper addressing the cell.
Now, let RX=1, RY=1 and read-write line at logic 1. When data input line is at logic level 1, gates G1
and G2 are enabled. The output of G1 is logic level ‘1’ and output of G2 is logic level ‘0’. Then T3 will be
remain ON but T4 will be turn OFF. The collector of T4 will increases, D2 starts conducting and increases
the emitter voltage ED of T2. Therefore, T2 does not conduct. Hence, the logic level at the collector of
transistor T2 will be the logic level of the data input. When the cell does not addressed, ED and ED– would
not carry any current and the flip-flop will not responded to the writing operation.
–
Therefore T3 is ON and the logic level at D will be 0. If the DATA input is at logic level 0, T3 will be OFF
–
and D will be at logic level 1. For read operation of memory cell, RX is at logic level 1. Then the DATA
–
output terminal is connected to D as T6, T8 and T10 are ON. Hence, the complement of data written into
the cell will be read and available at DATA output terminal.
EDO (Extended data output) DRAM is an improvement of FPM (First page mode) DRAM. Extended
Data Output DRAM latches the data output. While the current address is being read, the memory
controller can be setting up the next address. This memory device can able to access more rapidly as the
addressing and reading are done concurrently. The access time varies from 50ns – 60ns.
Semiconductor Memories 513
ECC (Error correcting code) DRAM is a special type error correcting RAM. This memory device is
commonly used in computer server.
SDRAM (Synchronous Dynamic RAM) are synchronised with the clock speed. The speed of SDRAM
is expressed in MHz. This arranges memory in two banks and uses the system clock for data output
alternating the two banks. This allocates one bank to be setup while the other bank is being read. Double
Data Rate SDRAM (DDRSDRAM) is an improvement over SDRAM and operates from a synchronous
clock but transfers data on both edges of the clock. Synchronous-Link DRAM (SLDRAM) is also
another improvement over DDRSDRAM that runs at potentially higher speeds.
Rambus DRAM (RDRAM) is a proprietary chip. This memory device has more control integrated
into the memory to increase speed and flexibility. RDRAM can be able to transfer approximately
1.6 billion bytes per second. RDRAM consists of RAM controller, the bus for connecting RAM and
digital system or processor.
All memory cells of dynamic RAM must be refreshed periodically after every 2 to 4 ms. The bock
diagram of a 16K×1 dynamic RAM organisation with refresh facility is illustrated in Fig. 12.52. In
refresh operation of dynamic memory, each row is refreshed sequentially. During refresh mode operation,
read and write operation cannot be performed. The output of refresh counter fed into the MUX. When
the refresh control signal S is low, address will be applied to row decoder.
Fig. 12.52 Block diagram of a typical 16K ×1 DRAM with refresh control
The refresh counter output is 0 to 127 sequentially. Therefore, each row will be selected sequentially
and all cells of each row will be refreshed at a time. During refresh operation, the CAS is at logic level
1 and no data is placed on the external data line. After completions of refresh operation, the refresh
mode must be terminated. Then again memory read or writes operation can be performed. Most DRAM
manufacturers supply one-chip DRAM controllers, which encapsulates the refresh and other functions.
consumption as well as size will be reduced. Transistors T5, T6, T7, and T8 are common in four transistor
and six transistor dynamic RAM memory cells. The stray capacitances C1 and C2, are present in circuit
to store the data bit logic level ‘1’ or logic level ‘0’. These capacitances are accessible. When the RX and
CY are at logic level ‘1’, transistors T5 and T6 as well as T7 and T8 are ON.
In the same way, VDD is applied to C2 when T1 is OFF and T3 is ON. In refresh mode, T6 and T12 act as
a load of transistor T3. Similarly, T5 and T11 act as load of T1. The memory cell behaves as conventional
flip-flop which consists of two cross-coupled inverters during the refresh time interval. In this way, the
initial state of memory cell is reinforced.
In refresh mode operation, CY = 0, RX = 1, P =1, and R =1. Then data-input and the data-output
terminals are disconnected from all the memory cells.
After that the complement of the logic level of capacitor C has been transferred through T9, and has
been stored on capacitor CR. The input terminal P is known as precharge input terminal, which connects
with CR and the output DATA line. If P = 1, CR precharges to the complement of voltage level of C.
After completion of precharge, R=0 and W = 1. Then output of inverter, T10, T11 refreshes the charge of
capacitor C.
Initially the refresh-amplifier output is disconnected from T1 and capacitor C. Therefore, T11 does not
initially load capacitor C until after CR is precharged to the proper level. If this precaution does not taken
care, capacitor C may be discharged erroneously.
Example 12.5 Design a 1024 × 8 bit RAM using 1024 × 4 bit RAM
� Solution
To design a 1024 × 8 bit RAM using 1024 × 4 bit RAM IC, two 1024 × 4 bit RAM ICs are required. Here,
memory size is fixed byte but word size is increased from 4 bit to 8 bit. Figure 12.55 shows the connection
diagram of two 1K × 4 RAM ICs to develop 1024 × 8 bit RAM. The address input lines of the ICs are
—
connected together. The chip enable (CE), RAS, CAS and R/W inputs of the ICs are also connected together.
Then number of output lines will be equal to the word size of each IC × the number of ICs used = 4 × 2 = 8.
Example 12.6 Design a 2048 × 4 bit RAM using 1024 × 4 bit RAM.
� Solution
In a 1024 × 4 memory
has 1024 word capacity
and it can store 1024 × 4
= 4096 bits. To expand
the memory size from
1024 × 4 bits to 2048 × 4
bits, two 1024 × 4 RAM
ICs are required. Figure
12.56 shows the con-
nection of two 1024 × 4
RAM to develop a
2048 × 4 RAM. Ten-ad-
dress lines A0 to A9 are
directly connected with
memory IC terminals.
The chip select line is
connected with most
Fig. 12.56 Two 1024¥4 RAMs expanded to design a 2048¥4 RAMs
significant bit address
line A10 and inverted MSB is connected with chip select line of the next IC. So that memory addresses from
0 to 1023 are located first memory IC1 and memory addresses from 1024 to 2047 are also located in memory
IC2. One memory will be selected at a time and data out from one memory only. Therefore, corresponding
output terminals are connected together for output.
register as long as power supply is applied to memory devices. Generally, bipolar and MOS devices are
used to implement static shift registers. These registers require large power and large area for fabrication
of higher capacity. Therefore, dynamic shift registers are fabricated using MOS. In this section, the
operation of dynamic MOS registers are explained.
The clock waveforms of T1 and T4 are depicted in Fig.12.61. If f1=1 and f2=0, the input data can
be transferred to C1 and the voltage level of C2 is transferred to storage capacitor of the next stage
register, C'1. After t2, T1 will be OFF, but the input data will be stored in C1. When f1=0 and f2=0 in
the time interval (t3−t2), both transistors T1 and T4 are OFF, but T2 becomes ON. The complement of
the bit logic level C1 is at T2. At t=t3, f2 becomes 1, and the complement of the bit logic level C1 at T2
can be transferred to C2 as transistor T4 is ON. In this way the circuit as shown in Fig. 12.60 behaves
as a master-slave flip-flop. Transistors T1, T2, T3 and
capacitor C1 act as a master flip-flop in the first stage
inverter. In the second stage, inverter transistors T4,
T5, T6 and capacitor C2 behaves as a slave flip-flop.
The limitation of this circuit is that two-phase clock
waveforms are required.
The charge stored in the capacitor C1 will leak-
off continuously. Therefore, shift registers must be
operate dynamically and the time period of f1 and f2
must be less than 1ms. As a result, this MOS register
is called as dynamic shift register.
In the above circuit, when the stored voltage of C1 is
at logic 1, T2 and T3 will be conducting for the complete
clock cycle, (t5 – t1) and continuously dissipating power, Fig. 12.61 Two phase Clock waveform of
and drawing current from supply voltage. If C1 is at one bit dynamic MOS cell
Semiconductor Memories 523
logic 0, T2 is OFF during the complete cycle. Similarly, T5 and T6 will be conducting for an interval equal
to clock cycle and dissipate power when the capacitor C2 is at logic 1. If C2 is at logic 0, T5 will be OFF
during the complete cycle. Therefore, power dissipation will be more. To reduce the power dissipation
significantly, the circuit must be modified. The modified circuits are Fig. 12.62 and Fig. 12.63.
Figure 12.62 shows the clocked load register stage. In this circuit configuration, gate of transistors T1
and T3 are connected with the clock f1 and the clock f2 is applied to the gate of transistors T4 and T6. In
place of two capacitors in stage-1 as depicted in Fig. 12.60, four capacitors C1, C2, C3 and C4 are used in
stage-1. When the clock f1 =1, the input data will be transferred to C1 and the complement of capacitor
voltage C1 is transferred to C2. While f2 =1, the stored voltage level in C2 is transferred to C3 and its
complement to C4. In this way, the input data will be transferred from C1 to C4, which will be used as
input data of next stage shift register.
The C2 is used to transfer the input data through first stage inverter and transmission gate T4 to C3.
Consider input data is at logic 0 and C2 does not present. If f1 is at logic level 1, the complement of
the input data will be available at output of the inverter. When f1 becomes 0, both T2 and T3 are OFF
and inverter output is isolated from input. When C3 is present in the circuit, C3 can be able to store the
complement of input data. After that f2=1, the logic voltage of C2 will be transferred to C3 as T4 is ON.
For this, C2 must be able to charge C3 and maintain the voltage at logic 1 for sufficient time period.
Therefore, C2 must be very large compared to C3. While input data is at logic 1, C2 may be neglected.
Figure 12.63 shows the MOS dynamic shift register with load-transistor clocking. This is also a
modified circuit of Fig. 12.60. Two-phase clock waveforms of this MOS dynamic shift register are
illustrated in Fig. 12.64. Here, the gate of transistor T3 is connected with clock f2 and clock f1 is applied
to the gate of T6. When data bit stored in C1 or C2 is at logic 0, the corresponding inverter will not conduct.
If data bit 1 is stored in C1 or C2, the corresponding inverter will conduct. When the clock waveforms f1
and f2 are at logic 1 for specified time duration, capacitors C1 and C2 must be charged adequately. The
charging time must be much less than cycle time. As the conduction period of transistors T2, T3, T5 and
T6 are significantly reduced; this clocked load circuit configuration reduces the power dissipation. In this
case, external clock becomes loaded. Due to this, clock driver must be incorporated in circuit.
524 Digital Electronics: Principles and Applications
Fig. 12.64 Two phase Clock waveform of MOS dynamic shift register
at logic 1 or VDD. In the similar way of Fig. 12.60, input data will be transferred from one register stage
to other register stage.
At time t = t1, f1=VDD and input voltage is at logic 1, capacitor C1 will be charged to VDD. T3 will be ON
and capacitor C2 will be charged to VDD. During the charging of C2, T2 will be OFF as the gate voltage
of T2 does not exceed the source voltage by the threshold voltage VT . So transistor T2 and T3 do not act
as an inverter.
When f1 becomes 0V, T3 will be OFF. T2 becomes ON, as the charge stored on C1 is geater than
the threshold voltage VT . Then C2 discharges through T2, and the capacitor C2 voltage will be at logic
0. Hence after the clock pulse interval (t2 – t1), C2 has returned to 0V, that is the complement of the
input bit. Consequently the overall effect is that the circuit also behaves as an inverter like ratio shift
register. Similarly, when f2 changes from logic level 0 to logic level 1 and returns back to logic level
0, the complement of stored charge capacitor C3 will be transferred to C4. In this circuit, configuration
capacitor is burden on the clock input signal, and the capacitor charging current must be supplied from
clock.
Fig. 12.75 The potential distribution of electrodes at t0, t1, t2, and t3
During the time interval t0, only f1 is at a negative voltage, so that depletion regions are formed
only under f1 gates because the clock f1 becomes negative. The charge in depletion regions under f1
is injected from an external source or from the preceding gate f3 gate. In the time interval t1, the clock
530 Digital Electronics: Principles and Applications
f2 also becomes negative while the clock f1 is held negative and the clock f3 is positive. Therefore,
depletion regions are extended from the f1 gate to f2 gate. As a result, the charge is able to spread
throughout the extended region. During the interval t2, the clock f3 becomes negative and the clock
f2 is still negative. But f1 goes positive, thereby the depletion regions under the f1 gate are eliminated
and the new depletion regions under the f3 gate are developed. Consequently, depletion regions are
extended from the f2 gate to f3 gate. Similarly, during the interval t3, the depletion regions under f2 gates
are eliminated and the charge originally under the f2 gate is pushed to the right under the f3 gates. In
this way, the cycle has been completed; charge will be transferred from one region to next region three
electrodes away. After that, the above logic cycle from time interval t0 to t3 will be repeated sequentially.
In this way, three electrodes are used for storage as well as transfer of data in CCD.
An example of CCD memory is Intel 2416 memory IC. This memory is organised as 16384 × 1
bit serial memory and it has 64 recirculating shift registers each of 256 bits. Any one register can be
accessed by 6 bit address inputs and a 1: 64 decoder. In this IC, a four-phase clock waveform is used and
data can be shifted in synchronisation with clock pulses. In this memory, the data cannot be stored in one
position for indefinite time due to gradual disappearance of depletion regions. Therefore, a minimum
time between shifts of data must be present. In Intel 2416, the minimum time is about 9μs. Another
example of CCD memory IC is Intel 2464. The Intel 2464 CCD IC is a 64 K bits of memory on a single
die and it is organised with 256 independent circulating registers of 256 bits each. It is noted that, due
to their low cost, high density, and high reliability, CCDs are very useful for numerous bulk storage
applications.
Rewriteables, and DVD are commercially available for used in computer. Magnetic disks are the current
workhorse for permanent storage. In this section, the Hard Disks, Floppy Disks and Optical disks are
explained briefly.
Magnetic disks are the most popular medium for storing digital data and these disks are direct access
type secondary data storage. In a magnetic disk, ferromagnetic metals or metal oxides are used for
recording and saving data. The ferromagnetism is a permanent alignment of magnetic moments, which
creates a magnetic field emanating from the ferromagnetic particle area. A magnetic disk is made of
metallic film, called platters and is coated with ferromagnetic materials.
The disk or platter surface is sub-divided into concentric circles called tracks. Digital data are
organised into tracks. Each track on the disk has the same total storage capacity. Inner tracks are shorter
and recording density of data is higher on tracks nearer the center and smaller than the tracks near the
outer edge. Then each track is subdivided into different sectors and each sector provides a fixed storage
capacity in number of bytes. Generally, disks are available in the following size 8 inches, 5 ¼ inches,
and 3 ½ inches. Figure 12.77 shows a typical magnetic disk with 64 sectors and 1024 tracks.
A magnetic hard disk may be consists of one or more aluminum platters with a magnetisable coating.
Figure 12.78 shows a typical hard disk with four platters. Here four platters are packed vertically one
over the other called disk pack. In the disk pack, digital data is stored on the both the surfaces of each
disk platter except the upper surface of the top platter and lower surface of the bottom platter as these
surfaces have some tendency to collect dust and other forms of contaminations. Consequently, the disk
pack with 4 individual disks has eight storage surfaces and each surface has a read/write head. The
capacity of disk pack in total number of bytes stored is = number of bytes per sector × number of sectors
per track × number of tracks per surface x number of surfaces. The capacity can also be expressed as
bytes sectors tracks
Capacity = No. of Surfacce
sector track surface
Table 12.11 Comparison of magnetic disk drive, floppy disk drive and optical disk drive
Parameters Magnetic disk drive Floppy disk drive Optical disk drive
Storage media Magnetic disk, Disk pack, Magnetic diskette 5.25 inch, Optical disk, CD-ROM
fixed disk 3.5 inch and 8.5 inch
Access time 10–100 milisecond 100-600 milisecond 30–100 milisecond
Data transfer 200,000 to million bytes per 10,000 to 30,000 bytes per 150,000 to 500,000 bytes per
second second second
Capacity 10 million to 15 billion bytes 360,000 to several million 700 million to few billion bytes
per drive bytes per drive per drive
Advantages and Large capacity, Fast direct ac- Small, slower and smaller Large capacity, high quality
disadvantages cess but relatively expensive capacity but less expensive storage of data Fast direct ac-
cess but relatively expensive
Semiconductor Memories 535
CD-RW CD-RW stands for Compact Disk –Rewriteable. This CD uses both laser and magnetic head
to read and write the data. The stored data can be erased and rewritable. CD-RW is recorded using lasers
to heat magnetised areas and uses a different alloy for the recording layer. Therefore, CD-RW can not
be replaced CD-R and CD-RW blanks are much more expensive than the CR-R blanks. This CD is used
as backing up hard disks, stored data from video scanners, keyboards, and other equipments.
536 Digital Electronics: Principles and Applications
ranging from 7 bits to 15 bits. Each stored word has a matchline that indicates whether the search word
and stored word are identical or are different. The matchlines are fed to an encoder that generates a
binary match location corresponding to the matchline that is in the match state. An encoder is used in
CAM systems, if only a single match is expected. In some CAM applications where more than one
word may match, then a priority encoder is used instead of a simple encoder. A priority encoder selects
the highest priority matching location to map to the match result, with words in lower address locations
receiving higher priority. In addition, there is a hit signal that flags the case in which there is no matching
location in the CAM. The overall function of a CAM is to find a search word and return the matching
memory location. The capacity of different CAM chips varies from 8K to 8M. Presently, the largest
commercially available single-chip CAMs are 18 Mbit implementations. It is a fact that a typical CAM
cell consists of two SRAM cells. As per thumb rule, usually the largest available CAM chip is about half
the size of the largest available SRAM chip.
12.10.2 CAM Architecture
A small model of CAM architecture is shown in Fig. 12.84. This schematic diagram of CAM shows
individual core cells, differential searchlines, and matchline sense amplifiers (MLSAs). It is depicted
in Fig. 12.84 that CAM consists of 4 words, with each word containing 3 bits arranged horizontally. In
this figure, CAM stands for CAM cells, SL stands for searchline, and ML stands for match line. Always,
there is a match line corresponding to each word (ML0, ML1, ML2, and ML3) feeding into matchline sense
amplifiers (MLSAs). There is a differential searchline pair corresponding to each bit of the search word
—– —–
(SL0, S L0…… SL2, SL2 ). The CAM search operation starts with loading the search-data word into the
search-data registers followed by precharging all matchlines high and putting them all temporarily in
the match state. After that, the searchline drivers send the search word onto the differential searchlines,
and each CAM core cell compares its stored bit against the bit on its corresponding searchlines. The
Fig. 12.84 Schematic block diagram of a model CAM with 4 words having 3 bits each
538 Digital Electronics: Principles and Applications
matchlines on which all bits match remain in the precharged-high state. Then MLSA detects whether
its matchline has a matching condition. Afterwards, the encoder maps the matchline of the matching
location to its encoded address.
NOR Cell The CAM implementation using NOR cell consists of the complementary stored bit, (D
– —–
and D), and the complementary search data on the complementary searchline, SL and S L , four transis-
tors M1 to M4 to maintain minimum-size and high cell density. The transistors implement the pulldown
path of a dynamic XNOR logic gate with D and SL inputs. Each pair of transistors either M1 and M3 or M2
and M4 forms a pulldown path from the matchline, ML. The mismatch of SL and D activates one of the
pulldown paths, connecting ML to ground. The correct match of SL and D disables both pulldown paths
after disconnecting ML from ground. The NOR nature of this cell can be justified when multiple cells are
connected in parallel to form a CAM word by shorting the ML of each cell to the ML of adjacent cells.
The pulldown paths are connected in parallel resembling the pulldown path of a CMOS NOR logic gate.
The match condition on a given ML is that each individual cell in the word has a match.
Fig. 12.85 (a) 10-T NOR-type CAM cells and (b) 9-T NAND-type CAM cells
NAND Cell The NAND cell based CAM implements the comparison between the complementary
–
stored bit, (D and D), and the complementary search data on the complementary search line,(SL and
—–
S L ) using transistors M1, MD and MD– to maintain minimum-size and high cell density. For example of
the bit-comparison operation of a NAND cell, assume SL=1 and D=1. When the transistor MD is ON,
Semiconductor Memories 539
it passes the logic “1” on the SL to node B. The node B is the bit-match node which is logic “1” if there
is a match in cell. If the node B is logic “1”, transistor M1 becomes turn ON. The transistor M1 is also
turned ON in the other match condition when SL = 0 and D = 0. In this case, the transistor MD– passes
logic high to raise node B. When SL ≠ D, the result is a miss condition and the node B is logic “0” and
the transistor M1 is OFF. The node B is a pass-transistor implementation of SLD function. The NAND
nature of this cell can be justified when multiple cells are connected serially. The MLn and MLn+1 nodes
are connected to form a CAM word.
Ternary Cells Usually the NOR and NAND cells are binary CAM cells. These cells can store either
a logic “0” or a logic “1”. But ternary cells can store a logic “0”, a logic “1” and “X ” value. The “X ”
value is a don’t care, which represents both “0” and “1”, and allow a wildcard operation. The wildcard
operation means that an “X ” value stored in a cell causes a match regardless of the input bit. Table 12.12
shows the ternary encoding for NOR cell and ternary encoding for NAND cell is given in Table 12.13.
– –
The two bits are represented by D and D. It may be noted that the D and D are not necessarily comple-
mentary, but the complementary notations are maintained for consistency with the binary CAM cell. Two
bits can represent four possible states, but ternary storage requires only three states as the state where D
–
and D are both zero, is not used in this cell. To store a ternary value in a NOR cell, a second SRAM cell
–
is used as shown in Fig. 12.86. D is connected to the left pulldown path and D is connected to the right
pulldown path. Hence, the pulldown paths are independently controlled. A don’t care state, “X ” can be
–
stored when both D and D are equal to logic “1”, and both pulldown paths are disabled. A logic “1” is
– –
stored by setting D = 1 and D = 0 and logic “0” is stored by setting D = 0 and D = 1.
Fig. 12.86 (a) NOR-type Ternary core cells (b)NAND type Ternary core cells
540 Digital Electronics: Principles and Applications
Table 12.12 Ternary Encoding For NOR Cell Table 12.13 Ternary Encoding For NAND Cell
Stored Stored– Search bit Value Stored Search Bit
—
Value D D D M SL SL
0 0 1 0 1 0 0 0 0 1
1 1 0 1 0 1 1 0 1 0
x 1 1 0 0 x 0 1 1 1
x 1 1 1 1
12.10.4 Matchline Structures
The matchline is one of the key structures in CAMs. Usually NOR Matchline and NAND Matchline struc-
ture are used. In this section, only NOR Matchline is discussed. Figure.12.87 shows the schematic diagram
of NOR Matchline structure, how NOR cells are connected in parallel to form a NOR matchline, ML.
Any NOR search cycle operates in three phases such as searchline precharge, matchline precharge, and
matchline evaluation. Firstly, the searchlines are precharged low to disconnect the matchlines from ground
by disabling the pulldown paths in each CAM cell. When the pulldown paths are disconnected, transistor
precharges the matchlines high. Then the searchlines are driven to the search word values, triggering the
matchline evaluation phase. When there is a match, the ML voltage stays high as there is no discharge path
to ground. While there is a miss match, there is at least one path to ground that discharges the matchline.
The matchline sense amplifier (MLSA) senses the voltage on ML and creates a corresponding full-rail
output match result. The main characteristic of the NOR matchline is its high speed of operation.
Magnetic bubble devices memories were introduced in the late 1970s, but these are less popular than
RAM, and ROM ICs. Magnetic bubble technology lies in between magnetic disk and semiconductor
memory technology. These memories have no moving part and are non-volatile. Generally, magnetic
bubbles are developed on certain magnetic materials such as garnet crystal by applying magnetic field
which is perpendicular to the surface of the sheet of magnetic materials. The magnetic fields strengthen
some regions in the material and weaken others regions. Data are represented in bubble–storage by the
presence or absence of bubbles, which represents logic “1” or logic “0” .
The CCD memory devices stored data on capacitors as charge like DRAM. The data storage of CCD
memory is arranged in shift register configuration. The charge will be shifted from one CCD cell to the
other CCD cell. Just like DRAMs, data will be lost with switch off power supply. The detailed operation
of CCD memory devices is explained in Section 12.8.
The non-volatile RAM (NVRAM) is new version of RAM. NVRAM consists of a high speed static
RAM and each RAM cell has corresponding cell of an EEPROM with access-time of 200–300ns. Each
—–
NVRAM IC has a special pin, labelled as non-volatile enable, NE . The stored data in the RAM section,
—– —–
can be transferred to EEPROM section, when both NE and WE write are logic level “0”. The data in the
RAM section can be transferred to ROM section in about 10ms. To read data from EEPROM section,
—– —–
both NE and WE signal must be logic level “0”. Usually, this operation is performed, when power is
switched off.
The other memory devices are content addressable memories (CAMs), programmable logic arrays
(PLAs) and programmable array logic (PAL). The content addressable memory is a special purpose
random access memory device which can be accessed by searching for data content. The content-
addressable memory (CAM) compares input search data with a table of stored data, and returns the
address of the matching data. Usually, CAM is a memory that implements the lookup-table function.
The detailed operation of CAM is discussed in Section 12.10.
Canonical SOP and Canonical POS forms are used to implement any combinational logic functions.
To implement these circuits, logic gates are used. In programmable design of digital systems, an array
of logic cells is used. Actually, cells can be able to provide a universal logic function. In this design,
signal routing is done through switch box approach and RAM holds the routing patterns, which is
reprogrammable. The advantages of programmable design are less time required to design, easily
reworked on design system, design costs are low, and production time decreases. This technique has
limited flexibility, and this is suitable for only low volume production.
The other approach of combinatorial logic circuits and sequential logic circuits design is application
of Programmable Logic Devices (PLDs). A programmable Logic Device (PLD) is an IC that contains
a large number of logic functions, which are interconnected on the chip. The interconnection process is
user programmable and it is similar to PROM. Actually, the basic concepts of PLD have been developed
by combining combinatorial logic and ROM technologies. Generally, flexible architecture and fixed
architecture are used for programmable logic devices. Three basic forms of PLD’s are Programmable
ROM (PROM), Programmable Array Logic (PAL), and Programmable Logic Arrays (PLA).
Programmable read only memory (PROM) devices are developed using fixed architecture. PROM is
a fixed architecture programmable logic device and can be used as memory devices. The PROM is
not too much flexible with respect to PAL and PLA. In PAL, the OR array is fixed and AND array is
programmable. The PAL is more flexible than the PROM and is probably the most used of the fixed
architecture devices. The PLA is the most flexible of the programmable logic devices, as both AND
array and OR array are programmable. Therefore, in the logic circuits design using PLA, the additional
542 Digital Electronics: Principles and Applications
flexibility is not needed. PLD ICs are most commonly used in application specific digital circuit design
due to flexibilities, low development cost, and low power consumption. The detail architecture and
operation of PLDs such as PROMs, PLAs, and PALs are explained in Chapter 13.
SUMMARY
In this chapter, the basic concept of semiconductor memories has been explained. The memory organisation and
operation of various semiconductor memories, namely ROM, PROM, EPROM, EEPROM, SRAMs, DRAMs are
discussed. Expansion of ROM and RAM are also incorporated in this section. Sequential memory, Dynamic shift
register and Charge-Coupled Device (CCD) have been introduced. Magnetic storage devices such as floppy disks, hard
disks and optical disks are explained briefly in this chapter. The basic concept of content addressable memory (CAM)
is incorporated.
REVIEW QUESTIONS
12.1 Explain the basic concept of one bit memory cell and mention applications of memory cell.
12.2 What the types of memory? Write the difference between ROM and RAM. What is nonvolatile
memory?
12.3 Discuss memory organisation with an example. What is the bit storage capacity of a ROM with a
512 × 4 organisation? How many address bits are required for a 2048 bit memory?
12.4 What is the difference between PROM and ROM? Draw the internal structure of typical ROM 32
× 32 memory array and explain its operation.
12.5 Explain memory expansion of ROM with examples. How many 16K × 1 ROMs are required to
achieve a memory with a word capacity of 16K and a word length of eight bits?
12.6 Draw the diode, bipolar and MOS ROM architecture for Table 11.12.
Table 11.12
Inputs Outputs
A B C F0 F1 F2
0 0 0 1 1 0
0 0 1 1 1 1
0 1 0 0 0 0
0 1 1 1 1 1
1 0 0 0 1 0
1 0 1 0 1 1
1 1 0 1 0 1
1 1 1 1 1 0
12.7 Implement the BCD to Excess-3 code conversion using ROM.
12.8 What are the types of ROMs? Write a block diagram of a ROM and explain it’s operation. What are
the advantages and limitations of PROM?
12.9 Implement the following logic functions F1, F2 and F3 as given below using PROM
Semiconductor Memories 545
F1=m(0, 1,4,5,7,11)
F2=m(2, 7, 8, 9,11)
F3=m(4,5, 10,12,14,15)
12.10 IC 2716 is 2K × 8 EPROM IC. Find the number of 2716 and other ICs to implement
(a) 4K byte (b) 2K × 16 ROM (c) 4K × 16ROM
12.11 Write the difference between the following
(a) PROM and ROM
(b) EPROM and EEPROM
(c) ROM and RAM
12.12 Explain difference between static and dynamic RAM. What is the reason for the refresh operation
in dynamic RAMs.?
12.13 Draw the structure of a 4 × 4 Static RAM and explain it’s operation. How many 16K × 1 RAMs
are required to achieve a memory with a word capacity of 64K and a word length of eight bits?
12.14 Write short notes on the following
(a) Bipolar RAM cell (c) SRAM
(b) Six transistor MOS memory cell (d) DRAM
12.15 Draw the block diagram of 16K × 1-DRAM structure. Explain the operation of DRAM using timing
diagram. List the comparison between SRAM and DRAM.
12.16 Design the following RAM structure
(a) 1024 × 8 bit RAM using 1024 × 4 bit RAM
(b) 4096 × 4 bit RAM using 1024 × 4 bit RAM
12.17 Write short notes on the following
(a) Three transistor dynamic MOS RAM (b) Four transistor dynamic MOS RAM
12.18 What is sequential memory? What are the types of dynamic MOS shift register? Explain any one
dynamic MOS shift register.
12.19 Explain the operation of CCDs with diagrams.
12.20 Write short notes on the following
(a) Floppy disk (c) Optical disk
(b) Hard disk (d) Content addressable memory
12.21 A disk pack has 4 plates with 6 read/write heads and 400 tacks on each surface. Each track on a disk
surface is divided into 100 sectors of 512 bytes each. Determine
(a) number of cylinders in the disk pack
(b) number of tracks in the disk pack
(c) the total storage capacity of the disk pack
12.22 Design a PROM structure for the following functions
F1= m(0,1,8,11,12,15), F2= m(2,3,6,7,8,9,12,13)
F3= m(1,3,7,8,9,11,12,15) and F4= m(0,1,4,8,11,12,15)
12.23 Design a PROM structure for implementation of following logic functions
– – –
F1= ABC + ACD, F2= ACD + BC + A D, and F3 = ABC + A CD,
12.24 Explain briefly the applications of ROM.
12.25 A disk pack has 8 plates with 14 read/write heads and 400 tacks on each surface. Each track on a
disk surface is divided into 100 sectors of 512 bytes each. Determine the total storage capacity of
the disk pack.
CHAPTER
13
PROGRAMMABLE
LOGIC DEVICES
13.1 INTRODUCTION
Integrated circuits (ICs) are built on a semiconductor substrate, usually one of single-crystal silicon. The
circuit, often called a chip, is packaged in a hermetically sealed plastic case, with leads extending from it
for input, output, and power-supply connections. Integrated circuit functions are virtually limitless and
used in various applications. Improvements in IC manufacturing technology have led to increasingly
dense integrated circuits. Therefore, smaller and denser chips will be able to provide speed benefits as
these chips have high-speed devices. Generally, the integrated circuits are manufactured by the following
fabricating steps: film formation, impurity doping, photolithography, etching, and packaging.
Digital integrated circuits contain one to millions of logic gates, flip-flops, multiplexers, demultiplexers,
adders, comparators etc. in a few square millimeters. The small size of these circuits allows high
speed, low power dissipation, and reduced manufacturing cost compared with board-level integration.
Sometimes the typical logic design task consists of interconnecting standard fixed function IC’s to
form more complex circuits and systems. This process requires many IC’s, which increases the cost
of the design due to large space and power requirements. Therefore, the need for application specific
integrated circuits (ASICs) is generated. ASICs can be used to meet the specific requirements and can
be manufactured by IC manufacturer as per user specifications. The advantages of ASICs are less space
requirements, less power requirements, and better security but initial development cost is very high.
Integrated circuits can be designed by using standard product ICs and application specific ICs (ASIC).
Figure 13.1(a) and (b) show the different options available to chip designer for final implementation of
combinatorial and sequential logic circuits.
Application specific ICs (ASICs) are semi-custom gate array, semi custom standard cell, and full
custom type.
� Solution
The largest minterm of Boolean logic
functions is 7. Therefore, it is 3 variable
functions. To implement the Boolean logic
functions F1= Σ m(0, 2, 5,7) , F2= Σ m(1, 3,
4) and F3= Σ m(0, 2, 3, 5, 7) a 8 × 3 bit
PROM is required. Figure 13.9 shows the
PROM structure for implementing Boolean
functions F1, F2 and F3.
Example 13.2 Implement the following logic functions F1, F2, F3 and F4 as given below using
PROM
F1 = Σm(0, 1,2,3,4,5,7); F2 = Σm(2,4,7,9,11)
F3 = Σm(10,12,14,15); F4 = Σm(1,2,3,5,7,9,13)
� Solution
The largest minterm of the four simultaneous logic functions is 15. So a 4 line to 16 line decoder is used to
decode minterms m0 to m15. To implement the Boolean logic functions F1= Σm(0, 1, 2, 3, 4, 5,7), F2= Σm(2, 4,
7, 9, 11), F3= Σm(10,12,14, 15) and F4= Σm(1,2,3,5,7,9,13) a 16 × 4 bit PROM is required. Figure 13.10 shows
the implementation of F1, F2 F3 and F4 using PROM.
� Solution
Table 13.2 shows the comparison of two 2-bit binary numbers. Here, the first data is A1 B1 and second data
is A0 B0. When A1B1 is greater than A0 B0, G = 1. If A1B1= A0 B0, E = 1. When A1B1 is less than A0 B0, L=1.
The implementation of 2-bit comparator using PROMs is depicted in Fig.13.11. Four inputs A1, B1, A0, B0
generates 16 minterms using 4 line to 16 line decoder. The Boolean logical expressions of L, E and G are
as follows
— —— —
L = A0 A1 + A0 B0 B1 + B 0 A1 B1
— —— — — — — —
E = A1 B1 A0 B0 + A1 B1 A0 B0 + A1 B1 A0 B0 + A1 B1 A0 B0 and
— — ——
G = A0 A 1 + A0 B0 B1 + B0 A1 B1.
First Data Second Data minterms Less Than Equal Greater than
A1 B1 A0 B0 M L E G
0 0 0 0 m0 0 1 0
0 0 0 1 m1 1 0 0
0 0 1 0 m2 1 0 0
0 0 1 1 m3 1 0 0
0 1 0 0 m4 0 1 1
0 1 0 1 m5 0 0 0
0 1 1 0 m6 1 0 0
0 1 1 1 m7 1 0 0
1 0 0 0 m8 0 0 1
1 0 0 1 m9 0 1 1
1 0 1 0 m10 0 0 0
1 0 1 1 m11 1 0 0
1 1 0 0 m12 0 0 1
1 1 0 1 m13 0 0 1
1 1 1 0 m14 0 1 1
1 1 1 1 m15 0 0 0
554 Digital Electronics: Principles and Applications
� Solution
The decimal number 0 to 9 can be displayed by the binary coded decimal inputs. Figure 13.12 shows the
display of decimal numbers 0
to 9 in seven segment displays.
For example, the segments
a, b, c, d, e, and f will be
bright for decimal number 0.
Similarly, other numbers will
be display. Table 13.3 shows
the different segments will be
bright for decimal number 0 Fig. 13.12 7 segment display of decimal numbers
to 9. The outputs a, b, c, d, e,
f and g are expressed in terms of mean terms as given below:
a = m(0,2,3,5,7,8,9),
b = m(0,1,2,3,4,7,8,9),
c = m(0,1,3,4,5,6,7,8,9)
d = m(0,2,3,5,6,8),
e = m(0,2,6,8),
f = m(0,4,5,6,8,9) and
g = m(2,3,4,5,6,8,9).
A BCD to 7-segment decoder can be implemented with a ROM as shown in Fig. 13.13 using 16 × 8=128 bit
ROM. As only seven columns are used, one column must be in don’t care state
Programmable Logic Devices 555
� Solution
Truth table of binary to ASCII code conversion is shown in Table 13.4. The outputs A6 , A5 , A4 , A3 , A2 , A1
and A0 are expressed in terms of mean terms as given below. The implementation of Binary to ASCII code
conversion using 16 × 8 = 128 bit ROM is depicted in Fig. 13.14. As only seven columns are used, one
column must be in don’t care state.
A6 = m(10,11,12,13,14,15)
A5 = m(0,1,2,3,4,5,6,7,8,9)
556 Digital Electronics: Principles and Applications
A4 = m(0,1,2,3,4,5,6,7,8,9)
A3 = m(8,9)
A2 = m(4,5,6,7)
A1 = m(2,3,6,7,11,12,15)
A0 = m(1,3,5,7,9,10,12,14)
� Solution
In the first row of Table 13.5, the current input to the ROM is A1= 0, A0= 0 X = 0 and the ROM output word is
A1+ = 0, A0+ = 1 and Y = 1. After the application of clock pulse, the ROM outputs A1+ = 0, A0+ = 1 are transferred
to the inputs of ROM A1 and A0 . When the ROM input is A1= 0, A0= 1, X = 0, the ROM output word is A1+ = 1,
A0+ = 0 and Y = 0. The outputs A1+, A0+ and Y are expressed in terms of mean terms as given below:
A1+ = m(1,3,4)
A0+ = m(0,2,5,7)
Y = m(0,2,3,5,7).
The PROM can be used to implement the Table 13.5 with the help of additional logic element, D flip-flops.
Here, D flip-flops are used for transferring data from the outputs of ROM to the input of ROM on the positive
edge of the clock pulse. Figure 13.15 shows the implementation of Table 13.5 using PROM.
13.3 PROGRAMMABLE
LOGIC
In programmable logic of PROM,
blowing the fusible link at all inter-
sections of the logic array the device
is programmed as per requirement. A
typical arrangement of AND, OR and
Ex-OR gates is shown in Fig.13.16.
–
Here, input X and it’s complement X
are connected to a AND gate through
bipolar or MOS transistor and fusible
link. Whe D gate. Therefore, output Fig. 13.16 (a) Programmable logic of AND gate
is in don’t care state. Figure 13.16 (b)
shows the connection of product terms
with OR gate. Output of OR gate is
in SOP form. If fuse link does not
blown, S=P. When fuse is not blown, Fig. 13.16 (b) Programmable logic of OR gate
S will be in don’t care state. Generally,
output of OR gates are connected
with XOR gates with fusible link
in programmable logic. The typical
connection of XOR gate is depicted
in Fig. 13.16 (c). When the fuse is in
Fig. 13.16 (c) Programmable logic of XOR gate
intact state, the input X of XOR gate is
grounded and it behaves as transmission gate which means output O=S. If the fuse is blown, the input X
–
is always in high state or logic 1. Then output O is complement of inputs. So O = S . These Programmable
logic of AND, OR and XOR gates are commonly used in all programmable logic devices.
are implemented using ‘k’ number of AND gates and ‘m’ number of OR gates. The typical structure of
PLA AND array and PLA OR array are explained in this section.
13.4.1 PLA AND Array
A typical structure of AND array is shown in
Fig.13.18. It has ‘k’ AND gates with product
outputs P0 through Pk–1. Each AND gate has ‘2n’
— — — —–
inputs D0,D0, D1, D1, D2, D2....... Dn–1, Dn–1. As each
AND gate has all input variables and the entire
fusible link are intact, the output of unprogrammed
— — — —–
AND gate will be D0 D0 D1D1D2D2.......Dn–1Dn–1.
After programming, each AND gate can be used
to generate a product term with proper selection of
input variables. Actually product terms are formed
by selectively blowing fuses at intersection of data
inputs and AND gate. When all intersection fuses
of AND gate are blown, AND gate output is in
Fig. 13.18 Structure of AND array don’t care state.
Fig. 13.20 Structure of a typical PLA with two input and four outputs
Fig. 13.21 Implementation of logic functions F1, F2, F3, and F4 using PLA
Programmable Logic Devices 561
ICs, the data pattern according to design specification are generated by the manufacturer. In fusible link
programmable PLA, all fuses links are intact at the time of manufacturing. During programming some
fuse links are blown by applying voltages at the inputs and outputs of the device to develop specified
logic pattern in IC. This type of PLA is not reprogrammable.
The design procedure of a PLA based circuit is given below:
Step-1 Write the truth table of digital logic circuit, which will be implemented.
Step-2 Draw the K-map for each output with in variations of input variables and derive the simpli-
fied boolean logic expressions in SOP form.
Step-3 Simplify the Boolean logic expressions to get minimum SOP form.
Step-4 Determine the number of product terms and their logical expressions. Then find the input
connections of AND gate to generate all required product terms.
Step-5 Determine number of OR gates to implement output functions and find the input connection
of OR array to generate SOP form outputs.
Step-6 Find the requirement of programming of X-OR gates for invert or non-inverting the SOP
output.
Step-7 Lastly, the PLA will be programmed as per requirement of AND array and OR array to
implement the digital circuits. Some examples of PLA are incorporated in this section.
Example 13.7 Derive the logic expression of PLD as shown in Fig. 13.25.
� Solution
Figure 13.25 shows the structure of a typical PLA. There are three inputs A, B, C and six product lines P0 to
–
P5. Dot sign in the AND array means that product line is connected with inputs. As P0 is connected with A ,
– – ––– – –– –
B and C , the product term P0 = A B C . Similarly, other product terms are P1 = A BC, P2 = AB C , P3 = ABC ,
–
P4 = AB C and P5 = ABC. Outputs are available from F1, F2, F3, and F4 through OR gate. It is depicted in
Fig.13.25 that the OR gate is connected with each product line. After programming some fuses are blown
and remaining fuses are intact. The output of OR gate is sum of product terms. As the first OR gate is
–––
connected with P0, P3, and P5, output F1 will be sum of these three product terms. So F1=P0+P3+P5 = A B C +
–
ABC + ABC. Similarly, other output functions can be expressed using product terms as given below
Example 13.8 Design a PLA structure using AND and OR logic for the following functions.
F1= m (0,1,2,3,4,7,8,11,12,15)
F2= m (2,3,6,7,8,9,12,13)
F3= m (1,3,7,8,11,12,15)
F4= m (0,1,4,8,11,12,15)
� Solution
Figures 13.26 (a), (b), (c) and (d) represents the K-map of Boolean logic functions F1, F2, F3 and F4
respectively. The Boolean logic expressions of F1 from K-map is
1 2 3
–– – –
F1 = A B + C D + CD
Similarly, other logic expressions are
4 5 3 6 7 2 8 9
– – –– –– –– –– –––
F2 = A C + AC , F3 = CD + AC D + A B D, and F3 = C D + AC D + A B D
Therefore, there are nine product terms in the above four logic functions. Each prime implicants are numbered.
––
Some of prime implicants like C D and CD are common in functions. To generate nine product terms, nine
AND gates are needed. The implementations of all these Boolean logic functions using PLA AND array and
OR array are shown in Fig. 13.27.
Programmable Logic Devices 565
Example 13.9 Design a PLA structure to implement NAND, NOR, EXOR and EXNOR functions.
� Solution
Firstly, the Boolean function of NAND, NOR, EXOR and EXNOR are expressed in terms of Products before
implementation using PLA. The logical expression of two inputs NAND, NOR, EXOR and EXNOR are
–— –—— – – – – –—— – –
F1 = A B , F2 = A + B = A B , F3 = A B = AB + A B, and F4 = A B = A B + AB respectively.
To implement NAND, NOR, EXOR and EXNOR functions, four product terms P0, P1, P2 and P3 are required.
–– – –
These product terms are P0 = A B , P1 = A B, P2 = AB , and P3 = AB. The implementation of NAND, NOR,
EXOR and EXNOR functions using PLA is depicted in Fig.13.28.
� Solution
The implementation of two-bit comparator using PROM is already explained in Example 13.3. If PLA is
used to implement the two-bit comparator, fuse map will be different as all product terms are not available in
a typical PLA device. Consider the first data is A1 B1 and second data is A0, B0. When A1B1 is greater than A0,
B0 , G = 1. If A1B1= A0, B0, E = 1. When A1B1 is less than A0, B0 , L = 1. The logical expressions of L, E and
G are L = m(1, 2, 3, 6,7,11), E = m(0, 5,10, 15) and G = m(4, 8, 9,13,14,15) and can be expressed using
product terms as given below:
1 2 3 4
— — —— — — — —
E = A1B1A 0B0 + A 1B1A 0B0 + A1B1A0B0 + A1B1A0B0
5 6 7 8 9 10
— —— — — — ——
L = A0 A1 + A 0B0 B1 + B0A1B and G = A0 A 1 + A0 B0 B1 + B0 A 1 B 1
There are ten prime implicants as given above. Figure 13.29 shows the implementation of 2-bit comparator
using PLA.
Programmable Logic Devices 567
Example 13.11 Design a PLA structure for implementation of following logic functions using
PLS100:
– – – –
F1 = AB + A CD, F2 = ACD + BC + A D, F3 = AB + C D, and F4 = ABC + A CD
� Solution
Figure 13.30 shows the PLS 100, which has 16 inputs, 8 outputs and 48 product terms. The output functions
F1,F2 , F3, and F4 are function of four input variables A, B, C and D. Therefore, four inputs are applied to
PLS 100 and eight product terms are required to implement above logic functions. The fuses of Ex-OR gates
are to be kept intact to maintain these inputs at ground level for active high outputs. The implementation of
– – – –
Boolean functions F1 = AB + A CD, F2 = ACD + BC + A D, F3 = AB + C D, and F4 = ABC + A CD is depicted
in Fig. 13.30.
568 Digital Electronics: Principles and Applications
Fig. 13.33 (a) Simple PAL circuit with dedicated high assertion level output
Fig. 13.33 (b) Simple PAL circuit with dedicated low assertion level output
Fig. 13.33 (c) Simple PAL with dedicated high assertion level output
Programmable Logic Devices 571
Fig. 13.33 (d) Simple PAL with dedicated high assertion level output
Fig.13.33 (e) Simple PAL with dedicated low assertion level output
Figure 13.33(d) has eight AND gates of 32 inputs with respect of seven AND gates of Fig.13.33 (a)
and (b). This circuit has no tristate driver. The output of OR gate is connected with a buffer. So the output
of this circuit is dedicated high assertion level. Figure 13.33(e) is identical to the circuit Fig.13.33(d)
except it has low assertion level output as the inverted driver is connected with output of OR gate.
Figure 13.33(f ) shows the register output configuration, which is commonly used in sequential logic
– –
circuit. In this circuit the feedback is taken from output of D flip-flop, Q. Here, both Q and Q are
–
available as Q is connected with a driver circuit. Figure 13.33(g) is one PAL with programmable macro
cell output. This circuit can be configured in such a way that combinational and register circuits can be
implemented using this circuit.
PAL16R8, PAL16R6, and PAL16R4. The pin diagram of PAL16L8, PAL16R8, PAL16R6, and
PAL16R4 are depicted in Fig. 13.34. Depending on the type of PAL device, there are a variable number
of combinational and registered outputs are available from the device. These devices are also capable
of replacing SSI/MSI integrated circuits to reduce package count and space, consequently improving
reliability of digital circuits.
(a) (b)
(c) (d)
Fig. 13.34 (a) Pin diagram of PAL16L8 (b) Pin diagram of PAL16R8
(c) Pin diagram of PAL16R6 (d) Pin diagram of PAL16R4
Programmable Logic Devices 573
The logic circuit of PAL16L8 is depicted in Fig.13.35. It consists of eight separate logic circuits
and the sum of products AND-OR architecture, which is composed of 64 programmable AND gates
and eight fixed OR gates. This PAL circuit has ten dedicated inputs I0 to I9 and six bi-directional input
output lines B1 to B6, which can be individually configured as inputs or outputs. This circuit also has two
completely dedicated output lines and can be used to implement any combinational logic circuit.
In some PAL ICs, both combinational logic circuit and flip-flops exist to implement sequential logic
circuits. Figure 13.36 shows the logic circuit of a small registered PAL16R4 IC. It has separate eight
programmable logic circuits. The top two and bottom two circuits are simple combinational logic
574 Digital Electronics: Principles and Applications
circuits. It also consists of four D flip-flops. Each D flip-flop is loaded on the low to high transition of
the clock input. The outputs of flip-flops are capable to use as feedback inputs into the array to facilitate
design of synchronous state machines. A power–up reset function has been incorporated in PAL16RX
series ICs to reset all internal registers to active low after specified time duration. The PAL 16R8 has
eight output registers and the PAL 16R6 has six output registers. The logic diagram of PAL 16R8 and
PAL 16R6 are depicted in Fig. 13.37 and Fig. 13.38 respectively.
The PAL16XX family of devices is field programmable, enabling the designer to quickly generate
custom patterns using standard programming equipments. The SNAP software package supports easy
Programmable Logic Devices 575
design entry for the PAL16XX series as well as other PLD devices. Other industry standard CAD tools,
SLICE, PALASM, ABEL and CUPL also support the PAL16XX series. All software packages allow
Boolean and state equation entry format. ABEL, CUPL and SNAP are also accept data in schematic
capture format.
PAL 22V10 is a CMOS flash erasable programmable array logic device. It is implemented with sum
of product (AND-OR) logic architecture and the programmable macro cell. The programmable macro
cell provides the capability of defining the architecture of each output individually. The logic circuit
diagram of PAL 22V10 is depicted in Fig. 13.39. It has ten logic sections and each logic section has 8 to
16 AND gates. The top AND gate of each section is independent programmable enable. This circuit has
12 inputs and ten programmable input/outputs. It can be used to design combinational logic circuits and
sequential (synchronous and asynchronous) logic circuits. There is some provision of asynchronous reset
(AR) and synchronous preset (SP) of all register outputs as depicted in Fig. 13.40. Each logic section
may be specified as registered or combinational. Therefore, polarity of each output S0 S1 may be selected
Programmable Logic Devices 577
properly to allow complete flexibility of output configuration. Table 13.6 shows the configuration table
of each section. In combinatorial mode operation, S0= 0, S1= 1 for active low output and S0= 1, S1= 1 for
active high output. During registered mode operation, S0= 0, S1= 0 for active low output and S0= 0, S1= 1
for active high output. Figure 13.41 shows the register mode and combinational mode of macro cell.
Fig. 13.41 Combinatorial mode: (a) S0=0, S1=1 active low output and (b) S0=1, S1=1 active high
output; Registered mode: (c) S0=0, S1=0 active low output and
(d) S0=1, S1=0 active high output
Programmable Logic Devices 579
Example 13.12 Design a PAL circuit to implement the following combinational logic functions
F1= m(3,5,7,8,10,12,14); F2= m(7,11,13,14,15)
� Solution
The K-map of combinational logic functions F1, and F2 are illustrated in Fig. 13.42 (a) and (b) respectively.
– – –
The Boolean logic expression of F1 from K-map is F1 = AD + A CD + A BD. Similarly, the logic expression
of F2 is F2 = BCD + ACD + ABD + ABC. To implement the logic functions F1 and F2, three and four
product terms are required. The implementation of above logic functions using PAL 16L8 are depicted in
Fig. 13.43.
� Solution
A 4-bit binary counter has 16 different states. The counter has one clock input terminal and one overflow
terminal. The counter counts zero to fifteen sequentially. After count fifteen, the counter will reset to zero.
The block diagram of a 4-bit synchronous counter is given in Fig. 13.44. Clock (CLK) and present state d3 d2
d1 d0 are used as inputs of the counter. The next state output and overflow are the output of the counter. Table
13.8 shows the truth table of synchronous counter.
Programmable Logic Devices 581
— ——–
D0 = d 0CLK + d0C L K
— ——– —
D1 = d 0C L K + d1d0CLK + d 1d0
— ——– — — — —
D2 = d2d1d0CLK + d 2C L K + d 2d 1 + d 2d 0
— ——– — —
D3 = d3d2d1d0CLK + d 3C L K + d 3d 0
— — — — ——–
and over flow can be expressed as OF = d3d2d1d0CLK = D3 = d 3 + d 2 + d 1 + d 0 + C L K . Figure 13.45 shows
the implementation of 4 bit synchronous counter using PAL16R6.
words, Boolean logic equations can be fabricated within each macrocell. These boolean logic equations
can also be able to amalgamate the state of binary inputs into a binary output and may be able to store
that output in the flip-flop.
Generally, SPLDs use fuses or non-volatile memory cells such as EPROM, EEPROM and Flash
memory. SPLDs are also known as programmable Logic Arrays (PLA), Programmable Array Logic
(PAL), Field-Programmable Logic Arrays (FPLA), Generic Array Logic (GAL), and Programmable
Logic Devices (PLD). SPLD ICs are available in different integrated circuit (IC) packages, such as
single in-line package (SIP), dual in-line package (DIP), discrete package (DPAK), small outline
package (SOP), and quad flat package (QFP). Some SPLD manufacturers are Altera, Atmel, Cypress,
Latice, Philops, and Vantis. Now a days SPLDs can be used as a substitute of 74 series TTL ICs and
applied in communication, industrial and commercial applications.
CPLDs are also known as PEEL Array (Programmable Electrically Erasable Logic Array), EPLD
(Erasable Programmable Logic Device), EEPLD (Electrically-Erasable Programmable Logic Device)
and MAX (Multiple Array Matrix). These devices are manufactured based on CMOS EEPROM
technology and are available in 24, 28, and 44 pin packages in plastic Dual In-line Package (DIP),
plastic leaded chip carrier (PLCC), Quad Flat Pack (QFP), ceramic Pin Grid Array (PGA). A number
of CPLDs are available by different manufacters namely Altera, Atmel, Cypress, Latice, Philips,
Vantis and Xiliux etc. But Alteras CPLD products MAX 3000, MAX 7000, MAX 9000 and Xiliux
CPLD product XC9500 are most commonly used ICs in electronic industry.
Figure 13.46 shows the block diagram of CPLD. It consists of SPLDs, I/O blocks and programmable
wires. The connection between SPLDs and I/O block through programmable wires is depicted in
Fig. 13.47. A SPLD block is basically Programmable Array Logic (PAL) or Programmable Logic
Arrays (PLA) and Macrocells. Therefore, the base architecture of CPLD is versatile multiple-level
PLA or PAL architecture rich in input latches, buried registers, and sum-of-product logic functions.
A Macrocell consists of registers and a combinational path. It also provides feedback to the
Interconnect Array and I/O cells. The block diagram of a typical Macrocell is shown in Fig. 13.48.
This Macrocell consists of product terms, multiplexers and flip-flops. CPLDs have non-volatile
characteristics and low power consumption. When the power is removed, the program will still be
there. Generally, CPLDs are used in memory interface, low power applications, control operations
and bus control, etc.
584 Digital Electronics: Principles and Applications
Fig. 13.47 Connection between SPLDs, I/O block and programmable wires of a CPLD
Programmable Logic Devices 585
points than FPGAs using antifuses and EEPROM/EPROM technologies. On the other hand, SRAM-
based FPGAs have numerous advantages. SRAM are easily reprogrammable and their configurations
can also be changed. These devices have numerous different configurations, such as multi-mode systems
and reconfigurable computing machines. In SRAM-based FPGA, SRAM cells are scattered throughout
the FPGA. Figure 13.49 shows the configuration of memory cell. Here the n-transistor gate provides
–
either read or writes operation. The actual control of FPGA can be done by Q and Q.
Field Programmable Gate Array (FPGA) is the workhorse of the programmable logic industry. FPGA
are constructed by interconnected logic cells. FPGA can also replace discrete logic. Discrete logic is the
devices, which are interconnected SSI ICs with wires. It is also volatile. It requires reprogramming after
each power cycle. Xilinx logic cell array is well-known FPGAs. The third generation FPGA is the Xilinx
4000 as its structure is depicted in Fig.13.50. The Xilinx logic cells are embedded in a general routing
Programmable Logic Devices 587
Fig. 13.54 (a) Programmable switch matrix (b) Six pass transistors per
switch matrix interconnect point
Programmable Logic Devices 589
SUMMARY
In this chapter, the basic concept of digital system design using standard product ICs and application specific ICs
(ASICs) has been explained. PROM, PLA and PAL are most commonly used programmable logic devices to implement
sum of product expressions of digital logic circuits in ASIC design. PLA architecture is programmable AND and OR
array; PAL architecture is programmable AND and fixed OR array, but PROM is fixed AND array and programmable
OR array. These PLD devices are manufactured by mask, fusible link and floating gate programming technology. In
this chapter, applications of PLDs for implementing both combinational and sequential digital systems have been
incorporated. The concepts of Simple Programmable Logic Devices (SPLDs), Complex Programmable Logic Devices
(CPLDs) and Field Programmable Gate Array (FPGA) have also been discussed in this chapter.
REVIEW QUESTIONS
13.1 Define standard product ICs and ASICs. What are the types of ASICs? Write the advantages of ASICs
with respect to standard product ICs.
13.2 What are the types of ROMs? Write a block diagram of a ROM and explain it’s operation. What are
the advantages and limitations of PROM?
13.3 Implement the following logic functions F1, F2 and F3 as given below using PROM
F1= m (0, 1,4,5,7,11)
F2= m (2, 7, 8, 9,11)
Programmable Logic Devices 591
Table 13.9
13.6 Draw a block diagram of a PLA and explain it’s architecture. Write differences between PLA and
PROM. What is the design procedure of a PLA based circuit?
13.7 Design a PLA structure using AND and OR logic for the following functions
F1= m(0,1,8,11,12,15), F2= m(2,3,6,7,8,9,12,13)
F3= m(1,3,7,8,9,11,12,15) and F4= m(0,1,4,8,11,12,15)
13.8 Design a PLA structure to implement NAND, and EXOR functions.
13.9 Design a PLA structure for implementation of following logic functions using PLS100
– – –
F1 = ABC + A CD, F2 = ACD + BC + A D, and F3 = ABC + A CD
13.10 Define PAL. Draw the architecture of PAL and explain it’s operation briefly. Write the difference
between PLA, PROM and a PAL.
13.11 Describe the steps for developing the fuse map for a PAL. Draw the logic diagram to implement
2 - bit comparator using PAL.
13.12 Explain the internal Structure of PAL ICs and explain briefly.
13.13 Design a PAL circuit to implement the following combinational logic functions:
F1=m (1,2,3,5,7,8,10,12,14) and F2=m (7,11,13,14,15)
13.14 Design a 4 bit synchronous binary counter using PAL.
13.15 What is SPLDs and CPLDs? Explain the operation of CPLD with a suitable diagram. Write the
names of CPLD ICs.
13.16 Explain the difference between the followings
(i) PROM and PAL (ii) PROM and PLA (iii) SPLD and CPLD (iv) PAL and PLA
13.17 Write short note on the following
(i) Application of CPLD (ii) Application of FPGA
(iii) Routing of FPGA (iv) Architecture of FPGA
13.18 Design a BCD counter using PLD device.
13.19 Implement the sequential Table 13.1 using suitable PLA device.
13.20 Implement the BCD to Excess-3 code converter using PROM, PLA and PAL.
CHAPTER
14
COMPUTER AIDED DIGITAL
SYSTEM DESIGN
14.1 INTRODUCTION
Generally, SSI and MSI ICs are used to design small digital system, when circuits are simple. When size
is increased and system becomes very complex, the design feasibility is less using SSI and MSI ICs.
Then some computer added design tools could be used to design. Therefore, computer added design
(CAD) tools are developed to design complex logic circuits and the design work will be much simpler. A
lot of works of the digital system design process can be done automatically in CAD tools and the design
work will be very fast and efficient using these tools. Therefore, Hardware Description Languages
(HDLs) have been developed to explain the complex digital circuits at behavioral, register, and structural
levels modeling of digital circuits using VHDL and to verify logic designs of digital systems through
simulation. Most commonly used HDLs are Very High Speed Integrated Circuit Hardware Description
Languages (VHDL) and Verilog HDLs. In this chapter, the basic operation of VHDL and Verilog HDL
code are incorporated.
14.2 COMPUTER AIDED DIGITAL SYSTEM DESIGN
Generally, the specifications of digital systems in the form of system functions and input-output behaviors
of the system are available before design. The designer initially designs the digital systems with the
help of his design experiences and intuitions. This initial design is actually the general structure of the
intended hardware. Then this design idea passes through different stages before final implementation
using hardware. In all design stages, the designer evaluates and verifies the results. For this, the design
circuit will be tested giving one set of inputs data and the output results must be compared with specified
output. If any error exists in system, the design must be modified to remove errors. The modified design
circuit will be evaluated and also be verified with required results. This procedure will be repeatedly done
until error does not exist in the designed system. If this design process is implemented using hardware
in each stage of design, it is too much time consuming and practically impossible. Therefore, hardware
implementation process is very tedious and the design circuit will be very costly. So COMPUTER
AIDED DESIGN (CAD) tools are developed to make the design process easy and fast. In computer-
aided design of digital systems, the designers simulate the behaviors of a design of digital circuit without
its hardware implementation. After simulation, the simulation results are compared with required results
and check that the design satisfy the required specifications. If the results are not satisfied, the computer-
Computer Aided Digital System Design 593
Functional Simulation
After synthesis, the synthesised circuit can be tested to verify its functional correctness. Therefore, the
functional simulator of CAD tools simulates the circuit function of the logic equations to verify the
functionality of the circuit. The output of the functional simulation can be obtained in the truth table
form or the timing diagram form. So, the truth table and the timing diagram are used to verify whether
the computer aided design circuit is correct or not. When the output does not satisfy the requirement, the
design must be modified through program code and the above process will be done repeatedly until the
desired functional operation is obtained.
Logic Synthesis and Optimisation
After developing the functionally correct design of a digital system, it is required to optimise the design of
the digital circuit. For this logic synthesis and optimisation, tools are used to optimised the digital system
Implementation of Digital system
The next step of ‘logic synthesis and optimisation’ is the implementation of the design of digital system.
The CAD tool determines the placement of all logic elements defined in the netlist into the target chip
CPLD or FPGA. It also determines routing wires in the chip so that all logic elements are connected
properly inside the chip.
Timing Simulation
To obtain the expected performance of the circuit, propagation delays along the different paths in
the circuit are analysed. Then fitted circuit in CPLD or FPGA chip is tested to verify the functional
correctness and timing diagram of digital system. From the timing diagram, the effect of propagation
delays must be studied and it must be verified that the digital system provides the required performance
in terms of propagation delays. Simulation tool is used for timing simulation.
Programming and Configuration
The designed digital circuit is implemented in a CPLD or FPGA chip by programming the configuration
switches which configure the logic elements and set up the required wiring connections in side the chip.
code description of how output from a device relates to the input of that device. Generally, AHDL code
is generated using any text editor.
EDIF stands for Electronic Design Interchange Format. It has been predominantly used to store electronic
netlists and schematics in Electronic Design Automation (EDA) industry. This CAD tool operates in
neutral format. JHDL is stands for Java Hardware Description Language and it is based on JAVA program.
The digital components and their connections in a digital logic circuit can also be described using this
language. Hydra is an HDL based on the functional programming language Haskell.
VHDL is the VHSIC Hardware Description Language. VHSIC is an abbreviation for Very High
Speed Integrated Circuit. It can describe the behavior and structure of digital logic circuits like ASICs,
CPLDs, FPGAs and conventional digital circuits. The VHDL was developed in 1986 and was published
in IEEE Standard named as VHDL 1076 in 1987 after a lot of modifications. Therefore, VHDL is an
international standard language for designing electronics circuits in EDA industry. A revised standard
IEEE 1164 was published in 1993. This version is also called as VHDL ’93 and this is the most popular
language for electronics circuit designers. VHDL allows the designer to designs digital systems using
top down, bottom up or middle out methodology. VHDL can be used to describe hardware at the gate
level or in a more abstract way. Simulation and synthesis are the two main kinds of tools of VHDL.
Verilog is a Hardware Description Language. In Verilog, HDL text format is used to describe electronic
circuits and systems. Verilog can be used for verification of electronic circuits design through simulation,
and timing analysis.The Verilog HDL is an IEEE standard language and its-number is1364. The IEEE
standard 1364 provides the Programming Language Interface (PLI). This language is a collection of
software routines, which permit a bidirectional interface between Verilog and other languages. The first
IEEE standard Verilog HDL was published in 1995 as IEEE Std. 1364-1995 and its revised version
was also published in 2001 as IEEE Std. 1364–2001. This software tool is now used extensively in
the design of integrated circuits, and any digital systems, such as ASICs, CPLDs, and FPGAs. In this
chapter, most commonly used hardware description languages: VHDL and Verilog HDL are described
with examples.
14.4 HARDWARE DESCRIPTION LANGUAGE (HDL)
The Hardware Description Language (HDL) is a computer programming language used for formal
description of digital logic circuits. They can describe the circuit’s operation, its design and organisation,
and tests to verify its operation by simulation. HDLs are standard text-based expressions of the structure
and behaviour of digital electronic systems. In contrast to any high-level programming language, HDL
syntax and semantics include explicit notations for expressing time and concurrency, which are the
primary attributes of hardware.
The hardware programmed logic for designing digital systems has similarity with the statements
of BASIC or any other high-level computer language. As each step of programmed logic corresponds
to hardware, the programming logic is known as hardware description language. One of the popular
hardware description language is Register Transfer Language (RTL). In this section, RTL hardware
description language is discussed briefly.
HDL is a very convenient tool for describing hardware in which data is transferred from one register
to the other. The notation A←B states that the content of register B is transferred to A register, but the
content of source will not be altered. The length of register can be represented by modification in the
register transfer statement. For example, a 4-bit A register A=A[4], A[3], A[2], A[1] and a 4-bit B register
B=B[4], B[3], B[2], B[1]. Then register transfer statement A ← B means that A[4] ← B[4], A[3] ← B[3],
A[2] ← B[2], and A[1] ← B[1].
596 Digital Electronics: Principles and Applications
The OR operation and AND operation on the content of B and C registers are represented by A ←
B C and A ← B C respectively. The OR operation between B and C transferred to A is represented
by A ← B C. The notation A ← B C also states that A[4] ← B[4] C[4], A[3] ← B[3] C[3], A[2]
← B[2] C[2], and A[1] ← B[1] C[1]. The notation ‘=’ is used for the connection between register
output signals and output lines. For example, the Z=B states that outputs of register B are connected to
the output vector Z.
In HDL, the branch statements are two types such as conditional and unconditional branch. The
unconditional branch is represented by → (Level), where ‘Level’ is the statement number. For example,
the statement → (5) notation means Go To 5. The conditional branch is represented by (F1, F2, F3….Fn)/
(S1, S2, S3….Sn) where F1, F2, F3….Fn are the logic functions and S1, S2, S3….Sn are statement numbers.
At a time any one of Fi will be true. When F1 is true, then S1 statement will be executed. If F1 is false,
the next statement is executed.
Conditional transfer notation also exists in HDL. The behaviour “ If A>B, then transfer content of A to
B” can be represented by B*GREATER(A:B) ← A. The control section uses the counter to keep track of
counting. The counting will be either up counting or down counting as per requirement. The statements
used for up counting or down counting are COUNT←INC (COUNT) and COUNT←DNC (COUNT). The
declaration statements are used in HDL. The commonly used declaration statements are as follows:
1. MODULE : Name of Digital System
2. INPUTS: A; B
3. MEMORY: A[8]; B[8]
4. OUTPUTS: C[8]; OUT
5. ENDSEQUENCE
6. END
7. BUSES: IBUS[8];
In HDL, there is some provision to develop connections between the bus and register for receiving
data from the bus and sending data on to the bus. The data connected to the bus will be appear on the
bus during the entire clock period. For example, IBUS ← B ^ C states that the result of ANDing of each
bit of registers B and C will be available on the bus during the entire clock period.
� Solution
MODULE : DATA TRANSFER
MEMORY: A[4]; B[4]; C[4]; D[4]; E[4]
INPUTS: B[4]
OUTPUTS: Z[4]
1. A←B
2. C ← A–
3. D←C
Computer Aided Digital System Design 597
4. E ← A B
5. IBUS ← E
6. Z = IBUS
ENDSEQUENCE
END.
14.5 VERY HIGH SPEED INTEGRATED CIRCUIT HARDWARE
DESCRIPTION LANGUAGES (VHDL)
VHDL is a Hardware description Language used for modeling digital circuits from simple gates to
complex systems. This software can be used for simulation and designing digital systems using gates,
combinational logic circuits, flip-flops, counters, RAM and ROMs, and interconnection of components.
VHDL is an abbreviation for VHSIC Hardware description language and VHSIC is an acronym for Very
High Speed Integrated Circuits.
In early 80’s VHDL, software has been developed and it’s roots are in the ADA language. VHDL is
globally accepted by thousands of electronics engineers to design sophisticated electronics products. In
1987 VHDL becomes IEEE standard ‘IEEE-1076’ after number of revisions and modifications. It is a
very powerful language with different operators and numerous language constructs and can be used to
describe very complex behavior of digital systems.
Digital system design using VHDL consists of two design units, namely primary design unit and
secondary design unit. The entity declarations, the package declarations and configuration declarations
are the primary design unit. The secondary design unit is the architecture body and package body, which
are related with the primary design unit. Library is a collection of primary and secondary design units.
VHDL consists of IEEE library, work library, STD library and user library. Any designed digital system
usually contains one or more than one library. In this section a introduction to VHDL’93 software of
IEEE standard 1164 and its application in behavioral, data flow and structural model of digital logic
circuits have been discussed.
14.5.1 Data Objects
There are three types of data objects namely signal, variable, and constant. The data object SIGNAL
represents logic signals on a wire in the circuit. This signal does not have any memory. When source of
the signal is removed, the signal will not have any value. A variable object remembers its content and is
used for computations in a behavioural model. A constant object must be initialized with in a value and this
value cannot be changed with time. The example of signals, variables, and constants are given below:
SIGNAL a: BIT;
VARIABLE b: INTEGER;
CONSTANT one: STD_LOGIC_VECTOR(2 DOWNTO 0) : = “001”;
14.5.2 BIT and BIT VECTOR
The BIT and BIT_VECTOR types are always predefined in VHDL. The values ‘0’ and ‘1’ are used
to represent BIT. Actually, the BIT_VECTOR is a vector of type BIT. The examples of BIT and
BIT_VECTOR types are
SIGNAL a: BIT
SIGNAL b : BIT_VECTOR (7 DOWNTO 0);
a <= ‘0’
b <= ‘00001000”;
598 Digital Electronics: Principles and Applications
14.5.5 ENTITY
All digital design must be expressed in terms of ENTITY. The ENTITY in VHDL specifies the name of the
ENTITY and it also refers to any digital device namely AND, NAND, OR, NOR, XOR, XNOR, and NOT
gates, flip-flops, ALU, etc. An ENTITY declaration specifies the name of the entity; the ports of ENTITY and
all ENTITY related operations. Sometimes, digital systems consist of more than one ENTITY.
The keyword ENTITY signifies the starting of an ENTITY statement. Each entity is uniquely assigned a
name and its input and output signals through PORT. Each PORT is associated with the two keywords IN
and OUT to represent input signals and output signals respectively. The following keywords ENTITY,
IS PORT IN, OUT, INOUT and END are used in VHDL code for any design ENTITY. The Syntax of
an ENTITY is as follows
ENTITY entity-name IS
PORT (list of input port names, list of output port names and their types);
END entity-name;
The example of an ENTITY and_gate is given below:
LIBRARY ieee;
USE ieee.std_logic_1164.ALL;
ENTITY and_gate IS
PORT (
a: IN std_logic;
b: IN std_logic;
c: IN std_logic;
d: OUT std_logic );
END and_gate;
Here, the name of ENTITY is and_gate. The entity has four ports in the PORT. Three ports are for IN
mode and one port is of OUT mode. The three data input ports (a,b,c) of and_ gate are std_logic type and
the data output port (d) is also std_logic type. Sometimes, bi-directional (INOUT) ports are also used in
an ENTITY. The keyword word END signifies the end of the ENTITY declaration. The symbol colon
(:) is used for separator and the symbol semicolon (;) is used as terminator.
14.5.6 ARCHITECTURE
The ARCHITECTURE describes the actual implementation of the functionality of the ENTITY. It
contains the statements, interconnected components to represent the behaviour of the ENTITY and
the structure of the ENTITY. An ARCHITECTURE is related with the ENTITY and it describes the
behavior of that ENTITY. The syntax for the architecture varies, depending on the model. Generally,
dataflow model, behavioral model and structural model ARCHITECTURE are used in VHDL to design
600 Digital Electronics: Principles and Applications
digital system. An ARCHITECTURE body has declarative part and statement part. The keywords
ARCHITECTURE, OF, IS, BEGIN and END are used for any ARCHITECTURE body. The syntex of
ARCHITECTURE body is given below:
ARCHITECTURE architecture_name OF entity_name IS
declarations;
BEGIN;
statements;
END architecture_name;
Data Flow Model
In dataflow modeling of ARCHITECTURE, concurrent statements are used and also executed
concurrently. Therefore, the ordering of these statements does not affect on the output. The concurrent
statements are expressed using concurrent signal assignment, conditional signal assignment and selected
signal assignment. The syntax of dataflow model is
ARCHITECTURE architecture-name OF entity-name IS
signal-declarations;
BEGIN
concurrent-statements;
END architecture-name;
Concurrent Signal Assignment
The concurrent signal assignment statement assigns a numeric value. A signal assignment can be
identified by the symbol <=. The syntax of concurrent signal assignment is
signal <= expression;
The above statement means that after evaluating an expression the result will be a signal. This
statement will be executed when input signals of expression changes. The actual assignment of the
value to the signal will be assigned after a propagation delay. The expression may be any arithmetical
expressions and logical expressions.
a <= ‘0’;
c <= a XNOR (NOT b);
Conditional Signal Assignment
The conditional signal assignment statement selects one of the different values to assign to a signal
conditionally. The output signal value changes due to change in input signal values or conditions. The
syntax of conditional signal assignment is
signal <= value1 WHEN condition ELSE
value2 WHEN condition ELSE
………………………
…………………………
and the example of this statement is given below:
SELECT <= input0 WHEN s0= ‘0’AND s1=‘0’ ELSE
input1 WHEN s0= ‘1’AND s1=‘0’ ELSE
input2 WHEN s0= ‘0’AND s1=‘1’ ELSE
input3;
Computer Aided Digital System Design 601
The signal ‘SELECT’ will get a numeric value assigned to it depending upon the values of s0 and s1.
This statement will be executed whenever the input signals s0 and s1 change. When s0=0 and s1=1, the
SELECT value will be the input2. Therefore, the signal assigned statement is sensitive with s0 and s1.
Selected Signal Assignment
In selected signal assignment statement, signal will get any one of several different values assigned to
it based on the value of a select expression. In this statement, all possible choices for the expression
are incorporated and the keyword OTHERS is used to denote all remaining choices. This statement can
be executed when input signals of the expression changes. The syntax of selected signal assignment
statement is
WITH expression SELECT
signal <= input_1 WHEN valuel,
input_2 WHEN value2
………………….
………………….
input_n WHEN OTHERS;
When the output of expression is equal to value1, input1 is assigned to signal. If the output of
expression is equal to value2, input2 can be assigned to signal. This will be repeated for value3 to
value(n-1). When OTHERS values are generated from expression, input_n will be assigned to signal.
Structural Model
In structural modeling, several components are interconnected with input signals. Therefore, all the
components must be defined in ENTITY and ARCHITECTURE body. The component statement is used
to declare each component, which are used in the netlist. Then the declared components are instantiated
with the actual components in the digital circuit using the PORT MAP statement. After that, signals are
used to connect the components together according to the netlist. The syntax of structure modeling is
ARCHITECTURE architecture-name OF entity-name IS
component-declarations;
signal-declarations;
BEGIN
PORT MAP-statements;
concurrent-statements;
END architecture-name;
Component Declaration
Each COMPONENT declaration statement must be within a ENTITY and an ARCHTECTURE. The
COMPONENT declaration statement declares the name of a component and component interfacing
within netlist of digital circuit. The keywords COMPONENT, IS, PORT, END COMPONENT are used
in COMPONENT declaration. The syntax of COMPONENT is
COMPONENT component-name IS
PORT(Iist of input ports, list of output ports and their types);
END COMPONENT;
and an example of component is
COMPONENT and IS
602 Digital Electronics: Principles and Applications
END PROCESS;
Variable Declarations
Variables are always declared within a PROCESS. The variable assignment statement assigns a value to
a variable. The result of an expression may also be used to assign a value to a variable. Whenever any
value is assigned to the variables, this statement can be executed. The syntax of variable assignment is
signal:= expression;
and its example is
c := a+b;
Sequential-Statements
In the sequential assignment statement, a value to be assigned to a signal. This statement is expressed
just like concurrent statements but this statement will be executed sequentially. The syntax of sequential
statement is
signal <= expression;
and the example of this statement is
d <= a AND (b AND c);
14.5.7 GENERIC
Generics are a general mechanism to pass information into an entity. For example, the values of rise
time and fall time delays may be passed into the entity with generics. Generics of an entity are declared
with the GENERIC keyword before the PORT list declaration for the entity. The syntax of GENERIC
is
ENTITY entity-name IS
GENERIC (identifier: type);
The identifier is used in GENERIC declaration wherever a constant is expected with in entity. It is a
Computer Aided Digital System Design 605
constant, but this is only a readable data type. An example of GENERIC is illustrated below:
ENTITY and IS
GENERIC (rise, fall: TIME:=10ns);
PORT(a,b: IN bit;
c:OUT bit);
END and
Here, rise and fall time delays of signals are 10ns. This time delay information will be passed into the
entity through GENERIC.
14.5.8 PACKAGE
A PACKAGE provides a mechanism to hold data to be shared among several entites. A PACKAGE
consists of two parts: a package declaration section and a package body section. Generally, the package
declaration and body are stored together in a separate file. This file name must be same as package
name. The package declaration statements may be shared between different entites and also provide the
interface of the package which is visible in entites. The package body specifies the actual behavior of the
package like the architecture of a model. Actually, the package body consists of function declaration and
procedure declarations. The syntax of PACKAGE declaration and PACKAGE BODY are given below:
PACKAGE declaration
PACKAGE package_name IS
type _declarations;
signal _declarations;
variable _declarations;
component _declarations;
function _declarations;
procedure _declarations;
END package_name
PACKAGE BODY
PACKAGE BODY package_name IS
function _declarations;
procedure _declarations;
END package_name
Example 14.2 Write entity declaration and architecture body of AND gate and draw the timing
diagram.
� Solution
The and_2.vhd file shows the entity declaration and architecture body of two input AND gate. In this file
architecture body uses PROCESS and IF–THEN-ELSE statements to express AND logic. In the and_2a.vhd
file, the alternative architecture body of AND gate is expressed by the expression c<=a AND b. Figure 14.2
shows the simulation result of AND gate with input signals a, b and output signal, c. It is depicted in Fig.
14.2 that inputs are a=1 and b=1 at time 18.75ns and output c is equal to 1.
606 Digital Electronics: Principles and Applications
Example 14.3 Write entity declaration and architecture body of two input OR gate and draw the
timing diagram.
� Solution
The entity declaration and architecture body of two input OR gate are depicted in OR_2.vhd file and OR_
2a.vhd file. In OR_2.vhd file architecture body uses PROCESS and IF –THEN-ELSE statements to express
OR logic. The alternative architecture body of OR gate is represented in the OR_2a.vhd file. The simulation
results of OR gate with input signals a, b and output signal, c are illustrated in Fig.14.3.
608 Digital Electronics: Principles and Applications
Example 14.4 Write entity declaration and architecture body of NAND gate and draw the
simulation-timing diagram.
� Solution
The NAND_2 shows the entity declaration and architecture body of two input NAND gate. In this file,
architecture body uses PROCESS and IF –THEN-ELSE statements to express NAND logic. The simulation
results with input signals a, b and output signal, c are depicted in Fig.14.4.
Example 14.5 Write entity declaration and architecture body of NOR, XOR, and XNOR gates and
draw their simulation timing diagrams.
� Solution
The NOR_2, XOR_2 and XNOR_2 file show the entity declaration and architecture body of two input NOR,
XOR, and XNOR gates respectively. Here, PROCESS and IF –THEN-ELSE statements are used to express
the architecture body of NOR, XOR, and XNOR gates. The simulation results of NOR, XOR, and XNOR
gates with input signals a, b and output signal c are shown in Fig.14.5, Fig.14.6 and Fig.14.7 respectively.
Example 14.6 Write entity declaration and architecture body to implement the following
combination logic expressions
x = f1(a,b,c,d )= ab+cd
y = f2(a,b,c,d )=abc+da–
and z = f3(a,b,c,d )=ac– + bd using VHDL code.
� Solution
The entity declaration and architecture body to implement the combination logic expressions x = f1(a,b,c,d )
= ab + cd; y = f2(a,b,c,d )=abc + da–; and z = f3(a,b,c,d ) = ac– + bd are given in Comb_logic. Figure 14.8 shows
the logic circuit diagram and the simulation results with input signals a, b, c, d and output signals x, y, z are
shown in Fig. 14.9.
Fig. 14.8 Logic circuit of f1(a,b,c,d)= ab+cd , y = f2(a,b,c,d)=abc + da– , and z = f3(a,b,c,d)=ac–+bd
Computer Aided Digital System Design 613
� Solution
The entity declaration and architecture body using structural modeling of Fig.14.10 are given below.
COMPONENT and PORT MAP declarations are used to implement the structural modeling of Fig.14.10 .
ENTITY fig_14.10model IS
PORT ( a, b, c, d: IN std_logic;
o1: OUT std_logic);
END fig_14.10model;
ARCHITECTURE structural OF fig_14.10model IS
COMPONENT and2
PORT (x, y: IN std_logic;
z: OUT std_logic);
END COMPONENT;
COMPONENT or2
PORT ( p, q: IN std_logic;
r: OUT std_logic);
END COMPONENT;
SIGNAL s1, s2: std_logic; Fig. 14.10
BEGIN
A1: and2 PORT MAP (a, b, s1);
A2: and2 PORT MAP (c, d, s2);
A3: or2 PORT MAP (s1, s2, o1);
END structural;
Example 14.8 Write the VHDL code for a 4:1 multiplexer and draw its timing diagram.
� Solution
The mux_4_to_1.vhd shows the VHDL code of a 4:1 multiplexer. This multiplexer has four input signals:
input_0, input_1, input_2, and input_3 which are 4-bit data; one two bit select input, s and a 4 –bit data
output signal. In ENTITY std_logic_vector (3 DOWNTO 0) represents 4 –bit data bus and std_logic_vector
614 Digital Electronics: Principles and Applications
(1 DOWNTO 0) also represents 2 –bit select input bus. PROCESS and CASE statements are used to express
the architecture body of multiplexer to select a particular input from four inputs based on select signal. When
select input s =00, output will be equal to input_0. If select input s =11, output will be equal to input_3.
Figure 14.11 shows the timing diagram of 4:1 multiplexer. From 0 to 4 ns, select input is 11. Then input_3
will be selected for output and output is equal to 1111. During 4ns to 10ns, select input is 10 and output is
equal input_2 as depicted in simulation result. The logic diagram of 4:1 multiplexer in netlist form is shown
in Fig. 14.12.
� Solution
The entity declaration and architecture body of a 2:4 decode is given in decoder_2_4. At this
time, the decode architecture body uses PROCESS and CASE statements to express decoder
logic. When input signal, i = 00, output will be 0001. This is expressed by the expression.
WHEN “00” => O = “0001”; with in PROCESS statement.
616 Digital Electronics: Principles and Applications
Example 14.10 Write the VHDL code for a D flip-flop with level triggered and edge triggered.
� Solution
The entity declaration and archi-
tecture body of a level triggered
D flip-flop is illustrated in D_
flip_flop.vhd. To check the level
change, enable signal is used in Fig. 14.13 Logic diagram of level triggered D flip flop
the sensitivity list of PROCESS statement. When enable =1, data output will be equal to data input. This is
expressed by the VHDL code
IF (enable=‘1’) THEN
data_output<=data_input; Figure.14.13 shows the level triggered D flip-flop.
Computer Aided Digital System Design 617
The D_flip_flop_clock.vhd file shows the entity declaration and architecture body of a positive edge triggered
D flip-flop. Attribute ‘event is used to determine clock edges. By checking the clock signal has a particular
value, and if the clock signal has instantly changed, it can be expressed that an edge has occurred on the
clock signal. In edge triggered D flip-flop, the clock is used to transfer the input data to the output terminal,
on the rising edge of clock. To detect the rising or positive edge of clock input, ‘event is used in architecture
body of flip-flop. When the
value of clock is ‘1’ and the
value just changed, a positive
edge will be obtained. Then
output will be equal to input data
as shown in D_flip_flop_clock.
vhd. The logic symbol of edge
triggered D flip-flop is depicted Fig. 14.14 Logic diagram of edge triggered D flip flop
in Fig.14.14.
Example 14.11 Write the VHDL code for a ALU to perform logical operations: AND & OR and
arithmetic operations: addition and subtraction.
� Solution
The alu.vhd represents the entity declaration and architecture body of ALU to perform logical operations:
AND and OR and arithmetic operations: addition and subtraction. The input signals, a, b are 4 bit data
bus, selection input signal is two bit and output signal, result is 4 bit. PROCESS and CASE statements
are used for modeling of ALU. When selection input is equal to 00, result will be the output of a AND b.
If selection value is 10, result will be the addition of a and b. Depending upon the selection input result
will be any one output of the following operations: a AND b, a OR b, a + b and a − b. Figure.14.15
shows the logic diagram of ALU.
618 Digital Electronics: Principles and Applications
� Solution
The entity declaration and architecture body of JK flip-flop are illustrated in JK_flip_flop.vhd. The inputs of
–
JK flip-flop are J, K, CLOCK and RESET and output signals are Q and Q_BAR (Q ). The function of JK flip-
flop is logically represented by PROCESS and CASE statements in architecture body of JK_flip_flop.vhd.
Two intermediate signals,
output_state and ‘i’ are also
used in architecture body.
The ‘i’ is assigned for two
input signals J and K and it
is expressed by i <=J&K;.
When RESET=1, output_
state is 0. Attribute rising_
edge (CLOCK) is used to
detect the positive edge of
input CLOCK pulse. After
detection the positive edge
of CLOCK, the value of
output_state will be 1 or 0
or not output_state depend-
ing upon the J and K input
signals. This is modeled by
CASE statement as shown
in JK_flip_flop.vhd. Then
output of JK flip flop can be
obtained from the follow-
ing statements: Q<=output_
state and Q_BAR<= NOT
output_state. Figure 14.18
shows the timing diagram
of JK flip-flop and logic
diagram of JK flip-flop is
depicted in Fig. 14.19.
Computer Aided Digital System Design 621
� Solution
Tri-state (high impedance Z ) is often used in buses of microprocessors and microcomputers. The value ‘Z’ is
assigned to out signal of tri-state output. The entity declaration and architecture body of Tri-state buffer regis-
ter are given in Tristate_buffer_regis-
ter.vhd. The input signals of Tri-state
buffer register are 8-bit data input,
and enable and data output signal is
data_output. The architecture of Tri-
state buffer register is logically rep-
resented by PROCESS statements.
The data_output depend on the status
of enable input signal. When enable
input signal =1, data_output will be
data_input. If enable input signal is
at logic level 0, data output will be
high impedance state (Z ). The logic
diagram of Tri-state buffer register is
depicted in Fig. 14.20.
622 Digital Electronics: Principles and Applications
Fig. 14.20(a)
Example 14.15 Write entity declaration and architecture of four bit register.
� Solution
The Four_bit_register.vhd file shows the entity declaration and architecture of a four bit register. In Four_
bit_register.vhd file, architecture body uses PROCESS and IF–THEN-ELSE statements to express the
function of register. The input signals of PROCESS are data_input, clock, load and clear. Q_temp is also
Computer Aided Digital System Design 623
a four-bit vector signal which is assigned in architecture of register. The process variable is function of all
input signals. The output signal is Q which is four-bit vector output Q[0] to Q[3]. If clear input is 0, Q_temp
becomes 0. When clock=1 and detect the positive edge of clock input represented by clock’ event. If load=1
then data_input will be fed to Q_temp. After completion of process, the content of Q_temp will be output at
Q. Figure 14.21 shows the logic diagram of four bit register.
Example 14.16 Write the VHDL code for a four bit shift register.
� Solution
The entity declaration and architecture body of four bit shift register are given in Four_bit_shift_ register.
vhd. The inputs of shift register are data_input, clock, shift and data output signal is Q. The architecture
of shift register is logically represented by PROCESS statements. The data output signal Q depend on the
status of shift input signal. When shift input signal=1, clock=1 and positive edge of clock is detected, data
input signal is shifted through Q_temp[3] to Q_temp[0]. At end of process for each positive edge triggered
clock pulse, the content of Q_temp[0] is output at Q. The logic diagram of four bit shift register is depicted
in Fig. 14.22.
Computer Aided Digital System Design 625
Fig. 14.22 (a) and (b) Logic diagram of four bit shift register
626 Digital Electronics: Principles and Applications
Example 14.17 Write the VHDL code for a four bit counter
� Solution
The VHDL code for a four bit counter is given in Four_bit_binary_counter.vhd. There are three inputs
clock, clear, count and an output vector Q[3]…Q[0]. Q_temp is an logic vector signal which is assigned in
architecture of counter. If clear=1, Q_temp becomes 0 as Q_temp = Q_temp - Q_temp. Hence, the counter
is reset at 0000. When clock be applied and at positive edge triggered of each clock pulse, the counter is
incremented by 1 as Q_temp = Q_temp +1 and Q_temp becomes 0001 after first clock pulse. At end of
process, during first clock pulse, output Q will be Q_temp. The logic diagram of four bit counter is depicted
in Fig. 14.23.
Computer Aided Digital System Design 627
Fig. 14.23 (a) and (b) Logic diagram of four bit counter
� Solution
The Parity function can be built from XOR gates. Assume a, b, c and d are four input signals and parity
generator output is p. The VHDL code for parity generator is given in Parity.vhd. The intermediate signals
x and y are used in parity generator. The signal x is generated from the XOR operation of a and b, but y is
generated after XOR operation of x and c. Then parity p is generated from XOR operation of y and d. Figure
14.24 shows the schematic logic diagram of parity generator.
628 Digital Electronics: Principles and Applications
Fig. 14.24 Logic diagram of parity generator with four bit inputs
The Boolean logic expression, x= ab+c can be represented by assign declaration as given below:
assign x= (a&b)|c);
In data flow model, assign keyword can also be represented in the form of
assign x=s?a:b;
The above statement means that x is equal to a, when S=0. If x is equal to b, s will be 1. Another
example is that the output (b) is invert of input (a). The invert operation can be expressed as assign
b=!a; and the complete module of invert circuit is
module invert_ckt(a,b);
input a;
output b;
assign b=!a;
endmodule.
The data flow model of Fig. 14.20 can be written as
module com_logic(a,b,c,d,e);
input(a, b, c, d );
output(e);
assign e= ((a&b)| (c&d ));
endmodule
The keyword psedge and needge are used for positive and negative edge triggering. The key word
reg is used to hold the value of a data object. The keyword initial ensures sequential execution of
Verilog HDL code. The syntax of initial is
initial
begin
statement_1;
statement_1;
…….
…….
statement_n;
end
Example 14.20 Write the structural mode of three inputs AND gate in Verilog HDL and draw its
timing diagram.
� Solution
The and_3.v shows the Verilog code of three inputs
AND gate. The input signals of AND gate are a,
b, c and output is x. In Verilog HDL, three input
and gate is expressed as and(x,a,b,c). Figure 14.27
shows the logic symbol of three input AND gate Fig. 14.27 Logic symbol three inputs AND gate
and it’s timing diagram is depicted in Fig. 14.28. At
time 9.81ns, a = 0, b = 1, c = 0 and output x = 0. The
result of AND gate at any instant between 0 to 20ns, can be verified from timing diagram.
Example 14.21 Write the Verilog structural code to perform the following operations as given
below:
— —— ——
o1 = ab, o2 = a + b, o3 = a b, o4 = a b, o5 = a–
� Solution
— —— ——
The Verilog code for performing o1 = ab, o2 = a + b, o3 = a b, o4 = a b, o5 = a– operations is given in gates.v.
Here, a and b are inputs and outputs are o1 , o2 , o3, o4, and o5. The nand, nor , xor, and xnor operations of two
binary input signals a, b are expressed as nand(o1,a,b), nor(o2,a,b), xor(o3,a,b), xnor(o4,a,b) respectively.
To get invert of a, not(o5,a) is used. The logic circuit of gates.v is depicted in Fig. 14.29.
Example 14.22 Write the Verilog structural code for Fig. 14.30.
� Solution
The Verilog code for Fig. 14.30 can be written as given in logic_ckt.v. The above logic circuit has four
inputs a, b, c. d and three outputs o1, o2, o3. In this code, two intermediate variables gate1 and gate2 are
used to represent output of and gate and or gate respectively through keyword wire. The output o1, o2,
and o3 are obtained from the following expressions: xnor(o1,gate1,d); nand(o2,a,gate2); and xor(o3,ab,c);
respectively.
634 Digital Electronics: Principles and Applications
Fig. 14.30
Example 14.23 Write the data flow model of Fig. 14.31 using Verilog HDL code.
Fig. 14.31
Computer Aided Digital System Design 635
� Solution
The data flow model of Fig. 14.31 is illustrated in Fig_14_25.v. The simplified logic equations of Fig.14.30
are x = ab + cd and y = (a + b) (c + d ). Using assign statements, these boolean logic equations can be expressed
as assign x=(a|b)| (c&d ); and assign y=(a|b)&(c|d ); .
Example 14.24 Write the Verilog code to design a 4 to 1 multiplexer using behavioral model.
� Solution
The mux4_to_1.v represents the Verilog code of 4:1 multiplexer. In behavioral model of multiplexer, always
and case declarations are used. There are two select inputs a, b and four input data d 0, d 1, d 2, d 3 and one
output x. When a = 1,b = 1 output x = d 3. Similarly, the other three combinations of a and b can be evaluated
and output x must be assigned any value of d 0,d 1,and d 2 depending upon the values of a and b. Using
case({a,b}) statement, all four combinations are generated and accordingly output x is evaluated. Figure
14.32 shows the logic diagram of multiplexer and its timing diagram is given in Fig. 14.33.
636 Digital Electronics: Principles and Applications
� Solution
The verilog code of 1:4 demultiplexer is given in demux_1_to_4.v. The select signal is a input vector[1:0]
and output x is also vector form [3:0]. Case({select}) statement generates four combinations 0, 1, 2, and 3.
When select=11 or 3, output will be 1000. Similarly, x will be evaluated for the other three combinations
of a and b. Figure 14.34 shows the logic diagram of 1 to 4 demultiplexer and simulation results of 1 to 4
demultiplexer is depicted in Fig. 14.35.
Computer Aided Digital System Design 637
Example 14.26 Write the Verilog HDL code for a full adder and the timing diagram of full adder.
� Solution
The Verilog HDL code of a full adder is given in full_adder.v. In a full adder, two binary input, data a and
b, can be added with the carry input signal, c. The sum and carry are the output of full adder and they can
be expressed as sum = a⊕b⊕c and carry = ab+bc+ac. Using assign statements, the Boolean logic equations
for sum and carry can be written as assign Carry=(a&b)|(b&c)|(c&a); and assign sum=a^b^c; respectively.
Figure.14.36 shows the logic diagram of full adder and simulation result is shown in Fig. 14.37.
638 Digital Electronics: Principles and Applications
Example 14.27 Write the VHDL code for a edge triggered D flip-flop.
� Solution
The d_flip_flop_clock.v verilog code describes a D flip-flop with positive edge triggered. The keyword
always is used in this flip-flop circuit. On positive edge of each clock pulse, the input data of D flip flop can
be transferred to the output terminal. If the value of clock, c is ‘1’ and the value just changed, a positive edge
Computer Aided Digital System Design 639
will be obtained. At that time, output will be equal to input data. To detect the rising or positive edge of clock
input, always @ (posedge c) is used in module body of flip-flop The logic symbol of positive edge triggered
D flip-flop is depicted in Fig. 14.38 and the simulation result of D flip flop is given in Fig. 14.39.
SUMMARY
In this chapter, the basic concept of computer aided design of digital systems are discussed. It is very convenient,
accurate, easy and fast to design digital systems using CAD tools. Therefore, various computer aided design (CAD)
tools are developed. Commonly used CAD tools are RHDL, AHDL, EDIF, JHDL, Hyda HDL, Meta HDLs, Verilog
HDL, VHDL, and ABEL Hardware Description Languages. Presently, VHDL and Verilog HDL computer aided
design software are widely used in industry to design complex digital logic circuits. The VHSIC Hardware Description
Language (VHDL) is an industry standard language used to describe hardware most appropriately. A basic introduction
to VHDL and how it can be used to model the behavior of devices and design of digital systems has been explained
in this chapter. Verilog is a hardware description language and it is simpler than VHDL. A very brief introduction to
Verilog HDL has been incorporated in this chapter. The examples of structure model, data flow model, and behavior
model of VHDL and Verilog HDL are also discussed in this chapter.
640 Digital Electronics: Principles and Applications
REVIEW QUESTIONS
14.1 Explain computer aided design process of digital systems. What are the advantages of CAD design?
What are the CAD tools are used in digital system design?.
14.2 Explain data flow modeling of VHDL ARCHITECTUTE with an example.
14.3 Write the entity declaration of three input AND, OR, and XNOR gates in VHDL.
14.4 Write a VHDL code to design a 8:1 multiplexer.
14.5 Write VHDL codes for
(a) 1:8 demultiplexer
(b) Full adder
(c) Flip flop with level triggered
(d) 4 bit register
Computer Aided Digital System Design 641
Fig. 14.40
642 Digital Electronics: Principles and Applications
Fig. 14.41
CHAPTER
15
LABORATORY EXPERIMENTS
15.1 INTRODUCTION
Laboratory experiments on digital electronics help the students to improve the concept of digital electronics
principles and their applications. It is also helpful to develop skill for connecting electronics components to
construct electronics circuits and checking their performance. In most cases it is found that the laboratories
utilise the commercial experiment kits for learning concept skill and process. Some digital kits are already
available in the market, but they are not being able to fulfill all requirements. Therefore, it is required to
design experiments in such a way that students can measure the desired performance of all electronics
components, which are used in electronic circuits. Figure 15.1 shows the flow chart for developing any
experiment. Generally, the following steps are followed for designing experiments:
• Choose a title of experiment from the course content of digital electronics.
• Analyse the experiment on the basis of concept, skill and process.
• Write the aim and objectives of the experiment.
• Design the circuits for experimentation unit.
• Select suitable values of the components, measuring devices, controlling devices and power sup-
ply for constructing the experimental circuits.
• Perform experiment for measuring correct result.
• Prepare the tables for data entry.
• Supply usable formula for the calculation of final result.
While designing the experimental unit, the following points are to be considered.
• Easy method of transferring concept.
• Easy method of implementation process learning.
• Easy method of practicing skills.
• Performing experiments within optimum time.
• Must not contain any distracting element.
• Proper selection of positions of the probing or observing points.
• Determine the prime parameter, which is to be measured.
• Easy to handle by both students and teachers.
• Proper labeling is required in the layout of the experimentation unit.
• Connections must be firm.
• Must contain the trouble-shooting manual.
• Must have ready stocks of spares.
• The cost of production of the experimentation unit must not exceed the same for commercial product.
• Must be better in performance in respect of the objective of the experiments.
644 Digital Electronics: Principles and Applications
Conclusions A brief conclusion summarising the work done, theory applied, and the results of the
completed work should be included here. A short concluding section should accompany every report in
which the report is summarised for the benefit of the reader and recommendations are made. The conclusion
must have a logical argument based on strong evidence that answers the problem posed in the experiment.
Use measurement results (with the uncertainty) for evidence. Recommendations explain work that you
would do differently to get better performance in the experiment. Make additional recommendations
pertaining to the problem posed. Make additional recommendations about the laboratory equipment.
Materials Required
Component Name Quantity
Transistor - BC548 4
Diode - IN4007 6
Resistor 15K 2
10K 6
4.7K 3
1K 6
680 1
470 2
Power supply (0 – 5V) 1
Bread board 1
Connecting wire 20
648 Digital Electronics: Principles and Applications
Circuit Diagram
Procedure
1. Construct the circuits as per circuit diagram given in Fig. 15.3(a) to Fig. 15.3(e).
2. Low level refers to 0V and high level refers to input voltage +5V.
3. Switch on the input according to truth table as given below.
4. Verify output and compare with the truth table as given in Table 15.1(a) to Table 15.1(e).
Laboratory Experiments 649
Truth Table
Table 15.1(a) Inverter Table 15.1(b) Diode AND logic
Input Output Inputs Output
Vi V0 VA VB V0
0 1 0 0 0
1 0 0 1 0
1 0 0
1 1 1
Materials Required
Component Name Quantity
NAND gate IC7400 1
NOR gate IC7402 1
NOT gate IC7404 1
AND gate IC7408 1
OR gate IC7432 1
EX-OR gate IC7486 1
Power supply (0-5V) 1
Bread board 1
Connecting wire 20
650 Digital Electronics: Principles and Applications
Circuit Diagram
Fig. 15.4 (a) AND gate, (b) OR gate, (c) NAND gate, (d) NOR gate,
(e) Ex-OR and (f) Inverter
Procedure
1. Connect the circuits as per circuit diagram shown in Fig. 15.4(a) to Fig. 15.4(f).
2. Low level refers to 0V and high level refers to input voltage +5V.
3. Switch on the inputs according to truth tables as given below.
4. Note down the outputs for all the possible combinations of inputs.
5. Verify output and compare with the truth table as given in Table 15.2(a) to Table 15.2(f).
Truth Table
Table 15.2(a) Truth table of AND gate Table 15.2(b) Truth table of OR gate
A B A.B A B A+B
0 0 0 0 0 0
0 1 0 0 1 1
1 0 0 1 0 1
1 1 1 1 1 1
Table 15.2(c) Truth table of NAND gate Table 15.2(d) Truth table of NOR gate
–— ———
A B AB A B A +B
0 0 1 0 0 1
0 1 1 0 1 0
1 0 1 1 0 0
1 1 0 1 1 0
Materials Required
Component Name Quantity
NOT gate IC7404 2
AND gate IC7408 2
OR gate IC7432 2
EX-OR gate IC7486 2
Power supply (0 –5V) 1
Bread board 1
Connecting wire 20
Circuit Diagram
Fig. 15.5 Half adder (a) using EX-OR and AND gates, (b) using AND and OR gates
Truth Table
Table 15.3 Truth table of half adder Table 15.4 Truth table of full adder
Inputs Outputs
Minuend Subtracted Difference Borrow
(A) (B) (D) (Bout)
0 0 0 0
0 1 1 1
1 0 1 0
1 1 0 0
Inputs Outputs
Borrow (Bin) Minuend (A) Subtracted (B) Difference (D) Borrow (Bout)
0 0 0 0 0
0 0 1 1 0
0 1 0 1 0
0 1 1 0 1
1 0 0 1 0
1 0 1 0 1
1 1 0 0 1
1 1 1 1 1
Materials Required
Circuit Diagram
Procedure
1. Connect the ICs as per circuit configurations shown in Fig. 15.10, Fig. 15.11, Fig. 15.12,
and Fig. 15.13.
2. Low level refers to 0V and high level refers to input voltage +5V.
3. Give the inputs according to truth tables as given below.
4. Observe the logic outputs of flip-flops for all the possible combinations of inputs.
5. Verify the output and compare with the truth table result.
Truth Table
Table 15.8 Truth table of S-R latch using NOR gates
Input Output
–
D Q Q
0 0 1
1 1 0
Circuit Diagram
Fig. 15.14 The 8-bit Serial In– Parallel Out shift register IC 74164
Fig. 15.15 The 8-bit Serial In– Serial Output shift register IC 7491
Laboratory Experiments 657
Fig. 15.16 8-bit Parallel In– Parallel Out shift register IC 74LS273
Procedure
1. Rig up the ICs as per circuit diagram and pin configuration of ICs given in Fig. 15.14, Fig. 15.15,
and Fig. 15.16.
2. Low level refers to 0V and high level refers to input voltage +5V.
3. Clear all flip-flops by applying 0V to the clear input.
4. Apply the data into the serial input one bit per clock pulse in Fig. 15.14, and Fig. 15.15. Feed the
input data in parallel form for Parallel In – Parallel Out shift register.
5. Observe the logic outputs of flip-flops at QA to QH for all the possible combinations of inputs.
6. Observe the output after each clock pulse and compare with the result shown in Table 15.12 and
Table 15.13.
Table
Table 15.12 Serial In-Parallel Out
Inputs Outputs
Clock Serial QA QB QC QD QE QF QG QH
0 0 0 0 0 0 0 0 0 0
1 1 1 0 0 0 0 0 0 0
2 1 1 1 0 0 0 0 0 0
3 1 1 1 1 0 0 0 0 0
4 1 1 1 1 1 0 0 0 0
5 1 1 1 1 1 1 0 0 0
6 1 1 1 1 1 1 1 0 0
7 1 1 1 1 1 1 1 1 0
8 1 1 1 1 1 1 1 1 1
Table 15.13 Serial In Serial Out
Inputs Outputs
Clock Serial QA QB QC QD QE QF QG QH
0 0 0 0 0 0 0 0 0 0
1 1 1 0 0 0 0 0 0 0
2 0 0 1 0 0 0 0 0 0
3 0 0 0 1 0 0 0 0 0
4 0 0 0 0 1 0 0 0 0
5 0 0 0 0 0 1 0 0 0
6 0 0 0 0 0 0 1 0 0
7 0 0 0 0 0 0 0 1 0
8 0 0 0 0 0 0 0 0 1
658 Digital Electronics: Principles and Applications
Circuit Diagram
Fig. 15.17 (a) Logic diagram of IC 7447 and (b) seven segment display
Laboratory Experiments 659
Truth Table
Table 15.14 Truth table for seven segment display
Procedure
1. Construct the circuits as shown in Fig. 15.17(a) and Fig. 15.17(b).
2. Low level refers to 0V and high level refers to input voltage +5V.
3. Switch on the input according to truth table as given above.
4. Verify the display output and compare with the truth Table 15.14.
Materials Required
Circuit Diagram
Procedure
1. Connect the circuits as per circuit diagram shown in Fig. 15.19, Fig. 15.20 and Fig. 15.21.
2. Low level refers to 0V and high level refers to input voltage +5V.
3. Connect the clock input.
4. Observe the output and compare with the sequence table
Count Sequence
Table 15.15 Sequence of mod 16 counter
State Q3 Q2 Q1 Q0
0 0 0 0 0
1 0 0 0 1
2 0 0 1 0
3 0 0 1 1
4 0 1 0 0
662 Digital Electronics: Principles and Applications
State Q3 Q2 Q1 Q0
0 0 0 0 0
1 0 0 0 1
2 0 0 1 0
3 0 0 1 1
4 0 1 0 0
5 0 1 0 1
6 0 1 1 0
7 0 1 1 1
8 1 0 0 0
9 1 0 0 1
Aim: Counters are connected in cascade to construct higher mod counters with smaller mod coun-
ters. In cascade counters, the last stage output of one counter is fed to another counter. The aim of this
experiment is to implement the mod-16 and mod-32 counters using the cascade connection of mod-2
and mod-8 and mod-4 and mod-8 counters respectively.
Materials Used
Component Name Quantity
J-K Flip-Flop 74LS73A 4
CLOCK generator 1
Power supply 0 – 5V 1
Bread board 1
Connecting wire 20
Laboratory Experiments 663
Procedure
1. Connect the circuits as per circuit diagram shown in Fig. 15.22, and Fig. 15.23.
2. Low level refers to 0V and high level refers to input voltage +5V.
3. Connect the clock input properly.
4. Observe the output waveforms at output terminals as shown in Fig. 15.24 and Fig. 15.25.
Circuit Diagram
Materials Used
Component Name Quantity
D Flip-flop 74LS175 3
CLOCK generator 1
OR gate IC7432 2
Power supply 0 – 5V 1
Bread board 1
Connecting wire 20
Circuit Diagram
Materials Used
Component Name Quantity
D Flip-flop74LS175 2
CLOCK generator 1
AND gate IC7408 2
OR gate IC7432 2
Inverter IC7404 1
Power supply 0 – 5V 1
Bread board 1
Connecting wire 20
Laboratory Experiments 667
Circuit Diagram
Procedure
1. Connect the circuit as per circuit diagram shown in Fig. 15.28.
2. Connect ground and VCC of each flip-flop to power supply.
3. Connect the clock input properly and apply input on X.
4. Observe the output voltage at output terminals and compare with Table 15.18.
AIM: Implement a up-down counter for the state diagram as shown in Fig. 15.29 using T flip-flops.
668 Digital Electronics: Principles and Applications
Circuit Diagram
Assume A=‘En’ stands for counter enable and B=‘dir’ represents direction of up-down counter. There
are four states S0=00, S1=01, S2=10 and S3=11 and two outputs O1 and O2. The sequential circuit consists
of two T flip-flops and the state transition table is given in Table 15.19. The excitation functions of T
flip-flops are as follows
Laboratory Experiments 669
–— –— ———
T1 = ABQ0 + ABQ0 = A(BQ0 + BQ0) = AB Q0 and T0 = A
and the output functions are
O1 = AQ1 and O0 = AQ0
The implementation of the sequential circuit (up-down counter) using T flip-flops and combinational
logic circuit elements is shown in Fig.15.30.
Table 15.19(a) The state table Table 15.19 Table 15.19(b) The excitation table of T flip-flops
Inputs (AB)
Present state 00 01 10 11
(Q1Q0)
00 00/00 00/00 11/11 01/01
01 01/00 01/00 00/00 10/10
10 10/00 10/00 01/01 11/11
11 11/00 11/00 10/10 00/00
Next State(Q1* Q0*)/Output(O1, O0)
Procedure
1. Construct the circuit as shown in Fig. 15.30.
2. Connect the clock input properly and apply inputs on A and B.
3. Observe the output voltage at output terminals and compare with table 15.19.
Materials Required
Component Name Quantity
Transistor BC548 2
Diode IN4007 1
555 timer IC 4
Resistor 100K 2
15K 4
10K 4
1K 4
Capacitance 10µF 2
0.01µF 2
Power supply 0 – 5V 1
CRO 1
Bread board 1
Connecting wire 20
Circuit Diagram
Fig. 15.33 Duty cycle reduction of astable multivibrator using 555 timer IC
Laboratory Experiments 671
Procedure
1. Connect the ICs as per circuit configuration shown in Fig. 15.31, Fig. 15.32, Fig. 15.33, 15.34
and Fig. 15.35.
2. Apply the power supply and see the output waveform using CRO.
3. Draw the output waveforms on a graph paper.
4. Calculate the theoretical time period using the following expressions
a. T1= 0.693 R1 C1 and T2= 0.693 R2 C2 for Fig. 15.31
b. T1= 0.693 (R1+R2) C1 and T2= 0.693 R2 C1 for Fig. 15.32
c. T1= 0.693 R1C1 and T2= 0.693 R2 C1 for Fig. 15.33
d. T1= 1.1R1 C1 for Fig. 15.34
5. Verify the theoretical and practical time period.
672 Digital Electronics: Principles and Applications
Table
Table 15.20 Time period and frequency of multivibrator
T1 T2 T = T1 + T2 Frequency
Materials Required
Component Name Quantity
IC741 1
DAC0800 1
Resistor 10K 8
5K 4
Capacitance 0.1µF 2
0.01µF 1
Power supply 0 – 5V 1
–10V 0
10V 1
Bread board 1
Connecting wire 20
Circuit Diagram
Materials Required
Component Name Quantity
IC741 7
IC 7445 1
Resistor 10K 6
5K 2
Power supply 0–5V 1
–12V0 + 12V 1
Bread board 1
Connecting wire 20
Circuit Diagram
Procedure
1. Connect the ICs as per circuit configuration given Fig. 15.38.
2. Low level refers to 0V and high level refers to input voltage +5V.
3. Set the reference voltage, V at +5V.
4. Slowly increase analog input voltage and observe the corresponding logic outputs of comparators.
5. Verify the output and compare with the truth table as shown in Table 15.23.
Laboratory Experiments 675
Table 15.23 Analog input, comparator output and digital output of flash converter
Analog input voltage Comparator outputs Digital output
Vi C7 C6 C5 C4 C3 C2 C1 b2 b1 b0
0 ≤Vi<V/14 0 0 0 0 0 0 0 0 0 0
V/14<Vi<3V/14 0 0 0 0 0 0 1 0 0 1
3V/14<Vi<5V/14 0 0 0 0 0 1 1 0 1 0
5V/14<Vi<7V/14 0 0 0 0 1 1 1 0 1 1
7V/14<Vi<9V/14 0 0 0 1 1 1 1 1 0 0
9V/14<Vi<11V/14 0 0 1 1 1 1 1 1 0 1
11V/14<Vi<13V/14 0 1 1 1 1 1 1 1 1 0
13V/14<Vi ≤V 1 1 1 1 1 1 1 1 1 1
Netlist Viewer
Procedure
1. Create a new project file for register, counter and RAM separately.
2. Write VHDL code in the corresponding files and save as shift_reg.vhd, counter.vhd and SRAM.
vhd respectively.
3. Compile the files for analysis and synthesis, fitter, assembler, and timing analyser using compile tool.
4. Edit data input files as text file or vector waveform file or hexadecimal file
5. Use the Quartus II Simulator to simulate project files. Before running a simulation, specify input
vectors as the stimuli for the Simulator The Simulator uses these input vectors to simulate the
output signals.
6. View the RTL Viewer, Technology map viewer and simulation results.
7. Verify the output simulation results.
SUMMARY
In this chapter, the development of instruction manual for laboratory experiments have been discussed. To perform
the experiments on logic gates, combinational logic circuits, latches, flip-flops, register, seven segment display and
decoder driver, counters, sequential circuits, multivibrators, digital to analog converter, and analog to digital converter,
the required materials, circuit diagrams and procedure are incorporated. The VHDL code for simulation of 4-bit shift
register, 4-bit counter and 4×4 SRAM are also illustrated in this chapter.
REVIEW QUESTIONS
1. Justify that transistor is used as a switch in a inverter circuit as shown in Fig. 15.3.
2. Write the truth table when any one diode of Fig. 15.3 is opened.
3. Draw a transistor schematic of NOR gate, and write it’s truth table.
4. Draw a CMOS inverter. Why does CMOS technology dominate in VLSI manufacturing?
5. Design a circuit using combinational logic to double the output frequency.
Laboratory Experiments 679
Fig. 15.47
6. What is a multiplexer?
7. Design a full-adder using a decoder.
8. What is the difference between latches and flip-flops?
9. What are the types of flip-flops? What is D-FF?
10. How can you convert an S-R flip-flop to a J-K flip-flop?
11. How can you convert a J-K flip-flop to a D flip-flop?
12. What is Race-around problem? How can you rectify it?
13. How to convert D-latch into J-K-latch and J-K-latch into D-latch?
14. Write an VHDL code for behavioral models of the following flip-flops:
(a) J-K flip-flop (b) D flip-flop (c) T flip-flop
15. Write some applications of shift register IC 74164.
16. Convert D-latch into divider by 2. What is the max clock frequency the circuit can handle if T_setup=
6ns, T_hold = 2ns, T_propagation = 10ns?
17. Consider two counters to count 16. First circuit is synchronous and second is “ripple”. Which circuit
has less propagation delay?
18. How to design a divide-by-3 counter with equal duty cycle ?
19. Design a 2-bit up/down counter with clear using gates.
20. What is MOD counter? Design a mod-9 and mod-12 counter using 7491 IC.
21. What is the difference between asynchronous and synchronous counters?
22. Draw the internal structure of a timer. Explain some applications of timer in monostable mode.
23. What are the modes of operation of a timer?
24. Classify DAC.
25. Why an inverted R-2R ladder network DAC is better than R-2R ladder DAC?
26. 8-bit ADC with parallel output converts input signal into digital numbers. Design a ADC circuit that
finds MAX of every 10 numbers at the output of the ADC.
27. Implement comparator that compares 2-bit numbers A and B. The comparator should have 3 outputs:
A > B, A < B, and A = B. Design the comparator in two ways:
- using combinational logic circuits;
- using multiplexers. Write VHDL code for your schematic at RTL and gate level.
Fig. 15.48
680 Digital Electronics: Principles and Applications
28. Describe the operation of DAC? What are the most important parameters of DAC? Do we really
need both INL and DNL to estimate linearity?
29. Compare briefly all types of ADC that you know.
30. For an 8-bit flash A/D converter with an input range from 0V to 2.55V, describe what happens when
the input voltage changes from 1.27V to 1.28V .
APPENDIX
A
IEEE STANDARD SYMBOLS
The Institute of Electrical and Electronic Engineers (IEEE) has developed a standard set of logic symbols to
represent digital electronics circuits. The IEEE standard graphic symbols for logic functions are compatible with
standard 617 of International Electrotechnical Commission. Fundamental circuit diagram symbols corresponding
to SSI, and MSI ICs describe the logic function of ICs in a consistent and logical manner. But the detail logic
function representation of VLSI ICs is impractical, so that symbolic methodology can be used to indicate the
functions of major components. Professional digital electronics circuits designer should be familiar with IEEE
standard symbols as they are most commonly used in the manufacturer’s data sheets during design of digital
systems. In this section, IEEE standard symbols have been described to familiar with logic symbols which are
commonly used in digital system design.
Fig. A.2 Functional logic symbols of AND, NAND, OR, NOR, Buffer, Inverter,
EX-OR and EX-NOR gates
Symbol Function
& AND gate
≥1 OR gate
=1 Exclusive OR
= Logic identity
2k An even number of inputs must be active
2k+1 An odd number of inputs must be active
1 The input must be active
or A buffer or element with more than usual output capability. Symbol is oriented in
the direction of signal flow
Schmitt trigger, element with hysteresis
X/Y Code converter
MUX Multiplexer
DMUX Demultiplexer
S Adder
P-Q Subtracter
CPG Look-ahead carry generator
p Multiplier
COMP Magnitude comparator
ALU arithmetic logic unit
Retriggerable monostable
Appendix A 683
Nonretriggerable monostable
1
SRGm Shift register, m=number of bits
CTRm Counter, m=number of bits, cycle length 2m
CTR DIVm Counter with cycle length m
RCTRm Asynchronous ripple counter, cycle length 2m
Logic negation at input, External 0 produces internal 1
Logic negation at output, internal 1 produces External 0
Signal flow from right to left. If not otherwise indicated, signal flow is from left
to right
Bidirectional signal flow
Dynamic inputs active on indicated transition
Positive Logic Positive Logic Polarity Indication
1 0 H
0 1 L
1 0 H
0 1 L
Nonlogic connection A label inside the symbol usually defines the nature of this
pin
Input of analog signals
A.3 DECODERS
The IEEE standard for logic symbols allows a decoder’s logic function to be displayed as part of the symbol. The
symbols are used as basic concept of internal qualifying symbols, general qualifying symbols, internal values,
input weights, output values, and enable input. Individual input and output signals may be labelled with symbols
inside the logic-symbol outline to describe the signal characteristics.
The top of a logic symbol may contain an alphanumeric label to denote the general function performed by the
device. The decoders and encoders use the standard symbol X/Y, where X is the input code and Y is the output code.
Each input combination of coder produces an internal value. The internal values of a 3 to 8 decoder are 0 to 7. Each
output may have a qualifying label listing the internal values that cause the output to be asserted. In a decoder , each
output is asserted for just one internal value. An enable input has the qualifying label EN which control the function
684 Appendix A
of the device. While EN is asserted, output is active low available at output terminals. When EN is not asserted, an
enable input imposes the external high –impedance state on the three-state outputs. The IC 74×138, IC 74×139
and IC 74×328 have active –low outputs.
Fig. A.4 IEEE standard symbol for decoder (a) IC 74x328 (b) IC 74 ×138 (c) IC 74 ×139
Fig. A.5 IEEE standard Tri-state buffer symbols (a) non inverting active-high enable (b) inverting active-
high enable (c) non-inverting active-low enable (d) inverting active-low enable
Appendix A 685
The IEEE standard symbols for the IC 74 × 541 and IC 74 × 245 are shown in Fig. A.7. In this figure, the enable
and direction inputs can be applied to all elements of the device. The common control block controls all identical
elements. The other common features of IC 74 × 541 and IC 74 × 245 are hysteresis symbol, right – pointing or
left-pointing triangle, arrows and identical elements. Hysteresis symbol represents that inputs have hysteresis.
The right-pointing or left-pointing triangle is used to represent amplification signals. In case of three-state buffers,
output has more fan-out capacity. The arrows represent the direction of signal flow when it is not strictly left or
right. One or two identical elements in the array must be drawn in detail as shown in Fig. A.7. The other elements
must be identical to the first element.
(a) (b)
Fig. A.7 IEEE standard symbols for Tri-state buffer (a) IC 74 × 541 and (b) IC 74 × 245
686 Appendix A
The IEEE standard demultiplexer symbols for the MSI demultiplexer ICs are illustrated in Fig. A.9. The notation
0
G represents AND dependency with 0 to 7 signals. Any one output channel will be selected depending on the
7
weighted input signals and there are three inputs. The IC 74×139 consists of two independent demultiplexers. Each
0
demultiplexer has enabled input signal and bit grouping G . It is depicted in standard symbol of IC 74×155,
3
there is a common control block which is used to control two different demultiplexer sections. The input labelled 4
has an AND dependency with G4 so that the selected output is asserted when only both inputs are asserted.
Appendix A 687
(a) (b)
Fig. A.10 IEEE standard symbols for (a) adders IC 74¥283 (b) comparators IC 74¥85
688 Appendix A
Fig. A.12 IEEE standard symbols for registers (a) IC 74 ¥ 373 (b) IC 74 ¥ 377
(c) IC 74 ¥ 166 and (d) IC 74 ¥ 194
A.9 COUNTERS
IEEE standard symbols of counters are shown
in Fig. A.13. The general qualifying symbol
CTR represents counter and DIV16 indicates
that the counter is a divide-by-16 counter
and labels [1] to [8] indicate the arithmetic
weight of each counter bit. The common
control block is used to explain the counter
functions and it has the following control
signals content input, content output, mode
dependency. When the content input signal
bearing the label CT=m is asserted, the value
‘m’ is loaded into the device. In the counter
symbols, CT represents count but in general it
indicates content. In content output, an output
bearing the label CT=m is asserted when the
content of the device is m. In IC 74 × 161, the Fig. A.13 IEEE standard symbol for counters
output 3CT=15 is asserted when the counter (a) 74 ¥161 and
is in state 15. (b) 74 ¥169
The mode dependency of counter is indicated by Mi which is used as enable function. When Mi signal is
asserted, counter perform normal operations. But if Mi signal is not asserted¸ the affected signals have no effect on
the device’s function and ignored.
When the device is asserted, an input labelled with a + causes the device to count up once. While input labelled
with a – causes the device to count down once. The counter counts up on the rising edge of the signal if M2, G3
and G4 are asserted. In IC 74×169, if M2, M3, G5 and G6 are asserted, counter operates in up counting mode. If M2,
M4, G5 and G6 are asserted, counter operates in down counting mode.
690 Appendix A
Fig. A.14
Appendix A 691
A.11 ALU
The IEEE symbol for a 4-bit ALU IC 74×181 is shown in Fig. A.15. In common control block, the first five
inputs form a mode control word which is represented by M. The weights of the mode control bits are powers of
2 and they are designated by a number in the range 0 to 31. As per IEEE standard, a separate table accompanies
the logic symbol to define the functions performed in each mode. The output signals CP, CG and CO are enabled
in modes 0 to 15. This IC has four individual ALU blocks which are labelled with the weight of the bits.
B
PIN DIAGRAM
OF LOGIC GATES
Fig. B.1 Pin diagram of (a) IC 7408 (b) IC 7432 (c) IC 7404 (d) IC 7402 (e) IC 7400 ( f ) IC 7486
APPENDIX
C
GLOSSARY
Active-High The input or output terminal is activated or enabled when the terminal is at HIGH logic level.
Active-Low The input or output terminal is activated or enabled when the terminal is at LOW logic level.
Analog System This is an electronic system which consists of analog devices to perform different operations.
AND A Boolean operation of two variables indicated by ‘.’. This is represented by A.B
AND Gate This is a logic circuit whose output is 1 if and only if all its inputs are 1.
Adder This is a logic circuit which can add two numbers.
ASCII Code American Standard Code for Information Interchange. It is seven bit alphanumeric code and used
for alphanumeric characters.
Absorption This theorem allows a term or factor to be absorbed into another term or factor.
Arithmetic-Logic Unit (ALU) A logic circuit that performs arithmetic and logical operations on two binary
numbers.
Asynchronous Counter In this counter, all the flip-flops are not triggered simultaneously but each flip-flop
output is used as the clock input of the next flip-flop.
Architecture Body Architecture body describes the actual implementation of the functionality of the ENTITY.
It contains the statements, interconnected components to represent the behaviour of the ENTITY and the structure
of the ENTITY.
Analog-to-Digital Converter (ADC) An electronic circuit that converts an analog signal to a corresponding
digital output signal.
Accuracy It is the limit within which the output of a D/A converter is obtained.
Acquisition Time The time required following a sample command for the output to reach its final value within
specified error±0.1%.
Aperture time The time required for the sample and hold switch opening from 10% open to 90%open.
Astable Multivibrator It is a digital circuit which oscillates between two unstable states which are quasi-stable
states. It is also known as free-running multivibrator.
Access Time The time required for reading or writing a memory location.
Address The binary code which identifies the location of a word in memory.
Address Bus A address code which comes out from microprocessor and fed to memory and I/O devices. The
address bus is unidirectional.
Address Decoder It is a n-line-to-2n lines decoder which is used to select a specified memory location.
Binary It has two states 1 or 0.
Binary Number System The number system with base 2 and it has two symbols 1 and 0.
Bit Digits of a binary system which is 0 or 1.
694 Appendix C
Binary Coded Decimal (BCD) This code represents decimal numbers in which each decimal digit is repre-
sented by its 4-bit binary code.
Boolean Algebra The algebra of binary variables with operators NOT, AND, and OR.
Boolean Function A function of two valued binary variables. This function has only the value 1 or 0.
Boolean Variable A variable which has only two values either 1 or 0.
Bipolar Logic Logic circuits using bipolar junction semiconductor devices.
BCD Counter This a mod-10 counter that counts from 0000 to 1001, i.e., 0 to 9 decimal numbers.
Binary Counter A group of n flip-flops is connected in such a way that counts binary numbers equivalent to
the number of pulses. After counting 2N number pulses, recycle will be started.
Behavioural Model In behavioural model, statements are executed sequentially just like high level computer
programming language. The PROCESS statement is the main body of this model. In this model sequential state-
ments like sequential statements, variable declarations, if-then-else statements, case, loops, for loop, and while loop
statements are generally used to model the behaviours of digital circuits.
Bistable Multivibrator It is a digital circuit which has two stable states. Its state changes from one stable state
to another stable state when trigger pulse is applied. FLIP-FLOP is example of Bistable multivibrator.
Cut-off State of a transistor when collector current of transistor is zero.
Current Sink Logic In any logic family, the output of a logic circuit sinks current from the input of the logic
circuit.
Current Source Logic In any logic family, the output of a logic circuit sources or supplies current to the input
of the logic circuit.
CMOS (Complementary Metal-Oxide Semiconductor) This MOS device uses one p-channel and one n-
channel MOSFET to make an inverter circuit. This logic family belongs to the category of unipolar digital IC.
Carry Look Ahead Addition The Carry Look Ahead Addition involves two Boolean functions namely
Generate(G) and Propagate(P) for addition of two binary numbers.
Code Converter It is combinational a logic circuit which converts data from one binary code to another binary
code
Combinational Logic The combinational logic circuit generates outputs depending upon inputs. It can be
constructed using logic gates and there is no feedback from output to input.
Comparator A device that compares two binary numbers and produces an output i.e., greater than, or equal or
less than.
Clock A train of rectangular or square pulses. Usually clock frequency is constant and the operation of any syn-
chronous sequential circuit is synchronised with clock.
Counter It is a digital circuit which can count the number of pulses.
Cascade Counters Counters are connected in cascade to develop higher mod counters using small mod coun-
ters. In this counter, the last stage output of one counter is fed to another counter.
Computer Aided Design (CAD) Tools CAD tools are developed to make the design process easy and fast. In
computer-aided design of digital systems, the designers simulate the behaviours of a design digital circuit without
its hardware implementation.
Complex Programmable Logic Device (CPLD) A programmable logic device which contains a large number
of equivalent gates.
Custom Logic Device The logic circuit is fabricated on a single chip.
Appendix C 695
CAM (Content Addressable Memory) The Content-Addressable Memory (CAM) is a special purpose RAM
device which compares input search data with a table of stored data, and returns the address of the matching data.
Usually CAM is used to implement the lookup-table function.
CCD (Charge Coupled Device) This is actually an array of MOS dynamic shift register sequential memory.
These devices are low cost, very simple construction and versatile. The fabrication procedure of CCD on a semi-
conductor substrate involves very few operations than MOSFET and bipolar technology.
Control Bus This is a bus which is used for handling control signals.
Decoder A device (combinational logic circuit) is used to decode a coded binary word. This logic circuit has n
inputs and one output out of 2n outputs.
De-multiplexer The logic circuit that performs inverse of multiplexing.
D-FLIP-FLOP A FLOP-FLOP whose output follows the input D, when clock pulse is applied.
Decimal Number The number system with base 10 and it has ten symbols 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9.
Digital system This is an electronic circuit which processes digital signals represented by binary forms.
DeMorgan’s Theorems The complement of a sum (OR operation) is equal to the product (AND operation)
of the complements. The complement of a product (AND operation) is equal to the sum (OR operation) of the
complements.
Digital Logic Family This is a group of logic circuits which are built based on standardized integrated circuit
technology. The example of digital logic family are resistor transistor logic (RTL), Direct Coupled Transistor Logic
(DCTL), Transistor-Transistor Logic (TTL), and Complementary Metal-Oxide-Semiconductor Logic (CMOS), etc.
Don’t Care Condition This is an input-output condition which is never occurred during normal operating
condition. We represent the Don’t care condition by X . The value of X will be either 0 or 1.
Dynamic Memory In a dynamic memory, data can be stored on capacitors and to retain data every cell has
to be refreshed periodically. One transistor is used to build memory cell and required less space. These memories
consume less power compared to static RAMs.
Data bus A bus which is used for carrying data between CPU and memory or between CPU and I/O devices.
Digital-to-Analog Converter (D/A converter) An electronic circuit that converts digital input signal to a
corresponding proportional analog voltage or current.
Data Flow Model In dataflow modelling of ARCHITECTURE, concurrent statements are used and also ex-
ecuted concurrently.
Down Counter A counter counts in downward direction from maximum value to 0.
EBCDIC It stands for Extended Binary Coded Decimal Interchange. It is an 8 bit code and used by IBM computers.
Even Parity A binary number with an even number of 1s.
EX-OR Gate In a two input EX-OR gate, output is logic 1 when both the inputs are unequal and logic 0 when
they are unequal.
EX-NOR Gate In a two input EX-NOR gate, output is logic 1 when both the inputs are same.
Enable An input to a latch which be asserted for the flip-flop. When the enable input of latch is high, the output
of latch changes depending upon inputs.
Excitation Table A tabular form representation of the present state-next state of flip-flop with respect to clock.
Edge-triggered FLIP-FLOP A FLIP-FLOP changes its states on the positive or negative edge of a clock pulse.
Encoder This is a combinational logic circuit that generates outputs, i.e., opposite of decoder.
Erasable Programmable ROM (EPROM) In EPROM, a special charge storage mechanism is used to enable
or disable the switching elements of memory. So all switching elements can be programmed electrically and can be
erased by exposure to Ultra-Violet light. Usually CMOS technology is used for manufacturing EPROM.
Electrically Erasable PROM (EEPROM) EEPROM is similar to EPROM but this type of ROM can be
completely erased electrically. There is a limit on the number of times of data erased and programmed. Therefore,
EEPROMs are not used in place of RAM.
696 Appendix C
Least-Significant Bit (LSB) LSB is the right-most bit of a binary number. It has the least weight.
Least-Significant Digit (LSD) LSD is the right most digit of a number.
Logic Circuit An electronic circuit that operates on digital signals in accordance with a logic function.
Large Scale Integration (LSI) More than 1000 but Less than 10000 transistors in an IC.
Logic Adjacent Two terms (minterm or maxterm) can be simplified by using logic adjacency. This can also be
applied to 2n terms, where n=1,2,3…
Logic Adjacency This is a logic simplification theorem in two binary terms to be reduced to one such as (A +
– –
B) (A + B ) = A or (AB + AB ) = A.
Latch Latch is a bistable device and it has two states: Set and Reset for indefinite time period. When the Enable
input of Latch is high, the output of Latch changes depending upon inputs.
Level Triggered A device (Latch) which uses either a high or low level signal for transition to the next sate.
Left Shift Register In a shift register, data is shifted in the left direction with respect to clock pulses.
Linearity It is measured from the difference between the actual output voltage and the expected output voltage
of a D/A converter. It is generally specified as ± ½ LSB.
Maxterm It is a logical term which consist of all the literals in the ORed form in logic function.
Minterm It is a logical term which consist of all the literals in the ANDed form.
Most-Significant Bit (MSB) MSB is the left-most bit of a binary number. It has the maximum weight.
Most-Significant Digit (MSD) MSD is the left-most digit of a number.
Medium Scale Integration (MSI) More than 100 but less than 1000 transistors in an IC.
Multiplexer A logic circuit that selects one of ‘n’ input lines and connects it to one single output line.
Maximum Frequency ( fmax ) Maximum clock frequency is the highest clock frequency at which the flip-flop
can be triggered.
Memories Memories can be building up by flip-flops or capacitors in semiconductor memories and magnetism in
magnetic storage. The storage element is called a cell. Each storage element can store either logic ‘1’ or logic ‘0’.
Memory Read Operation To transfer data from the memory to the microprocessor through memory read
operation, 16-bit address bus is used to read from memory.
Memory Write Operation To transfer data from data bus to memory, a memory write operation is required.
Monostable multivibrator A digital circuit which has one stable states and one quasi-stable state. It generates
an output pulse for a fixed time duration when a trigger pulse is applied and then returns to stable state. This is also
known as one-shot circuit.
Mealy Machine In Maly machine, the outputs directly depend both on the present inputs and on the state infor-
mation. The behaviour of Moore machine is defined by equations
Next state=F(Present state, Inputs) and Output=G(Present state, Inputs).
Moore Machine In Moore machine, the outputs depends directly only on the state information. The behaviour
of Moore machine is defined by equations
Next state=F(Present state, Inputs) and Output=G(Present state).
Mask-Programmable ROM (ROM) ROMs are non-volatile memories as initially data is stored in memory
through programming and stored data will not be changed when power supply is removed.
NOT A Boolean operator which changes from 1 to 0 and 0 to 1. This is denoted by an overbar or 1.
Noise Unwanted electrical signals may be present in digital circuits and then digital circuit’s starts malfunction.
Noise Immunity This is circuit’s ability to tolerate noise voltages on its inputs.
Noise Margin It is quantitative measure of the noise immunity.
Negative Edge Triggered A device in which the transition occurs at the negative or falling edge of the clock signal
Next State decoder The part of a state machine that uses logic operations on the present state of a machine and
its input to produce a code, which in turn generates the next state of the machine in the memory.
698 Appendix C
One’s Complement The number can be obtained by complementing each bit of a binary number.
Octal Number The number system with base 8 and it has eight symbols 0, 1, 2, 3, 4, 5, 6 and 7.
Odd parity A binary number with odd number of 1s.
OR A Boolean operation of two variables indicated by ’ +’. This is represented by A+B
OR Gate It is a logic circuit whose output is 1 if any one input is 1.
Open-Collector Output The output of a digital circuit which is the collector terminal of a Bipolar Junction
Transistor (BJT) not connected to any other point inside the IC.
One-shot Same as monostable multivibrator.
Positional Numbers Number composed of symbols called digits in which the digits have a value based on
position.
Products of Sum (POS) This is a form of logic function in which OR terms are ANDed together.
Priority Encoder This is an encoder which generates output corresponding to the highest priority number when
two or more numbers are applied simultaneously.
Positive Edge Triggered A device in which the transition occurs at the positive or rising edge of the clock signal.
Parallel in Parallel out register In this shift register, data will be loaded in parallel and data output in paral-
lel form.
Parallel in Serial out register In this shift register, data will be loaded in parallel but data output in serial form.
Pressetable Counter It is a programmable counter which has the capability to start counting from any
desired state.
Programmable Logic Device A logic device in which a large number of logic elements are fabricated on a
single chip with programmable interconnections.
Programmable Read Only Memory (PROM) PROMs are fixed architecture logic devices.
Programmable Array Logic (PAL) Fixed architecture logic devices with programmable AND array followed
by fixed OR array.
Programmable Logic Array (PLA) Fixed architecture logic devices with programmable AND array followed
by programmable OR array.
Programmable Logic Device (PLD) A programmable logic device which contains a large number of intercon-
nected logic gates.
PACKAGE A PACKAGE provides a mechanism to hold data to be shared among several entites. A PACKAGE
consists of two parts: a package declaration section and a package body section.
Programmable Design In this design, an array of logic cells is used and signal routing is done through switch
box approach and RAM holds the routing patterns, which is reprogrammable.
Pulse stretcher Same as monostable multivibrator.
Quine-McClusky Method It is a tabular method for logic simplification.
Quasi-stable State This state is not a stable state. Monostable multivibrator is temporarily triggered to move to a
quasi-stable state, and then it return back to its stable state after certain time depending upon the circuit elements.
Quantisation The quantisation of analog signal is to divide the complete amplitude range of analog signal into
number of equal intervals.
Quantisation error The error involved in the quantisation process.
Radix or Base The difference in positional value between two digits which are next to each other in a positional
number system.
Radix Point The point which separates digits with a positional value greater than 1 from those with a positional
value less than 1.
Reset It is represented by not asserted, inactive, false or OFF state
Appendix C 699
Register It is an digital circuit which can store ‘n’ bits data and each bit is stored in a flip-flop.
Right Shift Register In a shift register, data is shifted in the right direction with respect to clock pulses.
Ring Counter It is a shift register in which the output of the last flip-flop is connected to the input of the first
flip-flop.
Random Access Memory (RAM) In this memory, the access time is same for all memory location.
Refresh The process of recharging the memory cells in a dynamic memory.
ROM Access Time The propagation delay between address inputs and data outputs of a ROM in each READ
operation.
Routing This is the process of interconnecting logic blocks.
Ripple Counter See Asynchronous counter.
Retriggerable Monostable Multivibrator A monostable multivibrator that will response to a triggered pulse
when it is in quasi-stable state.
Resolution The resolution of D/A converter refers to the smallest change in the analog output voltage. It is
equivalent to the value of the Least Significant Bit (LSB).
Schmitt trigger This is a comparator circuit with upper and lower triggering voltages. It exhibits hysteresis ef-
fect. It produces a rapid oscillation free transition at output from a slow changing input signal.
Small Scale Integration (SSI) Less than 100 transistors in an IC
Switching speed The operating Speed of an electronic switch which changes from OFF to ON or ON to OFF.
Generally this is measured in terms of the propagation delay time.
Saturation State of a transistor when collector current of transistor is maximum.
Sum Of Products (SOP) This is a form of logic function in which AND terms are ORed together.
Set It is represented by asserted, active, true or ON state
Set-Reset Memory Cell In a basic memory cell, Set places the cell in an asserted state and Reset places it in
a not-asserted state.
Set up Time The minimum time that input signal must be present on input terminal of flip-flop prior to the trig-
gering edge of the clock pulse.
Sequential Logic The logic circuit whose outputs are produced in the sequence in which input signals are applied.
Subtractor It is a logic circuit used for subtraction.
Stable State A state in which a digital circuit remains until a triggering signal is applied.
S-R FLIP-FLOP This FLIP-FLOP has two inputs S and R. The state of the FF does not change when S= R = 0.
This is set when S= 1 and R = 0 and reset when S= 0 and R= 1. S= R= 1 is not allowed.
Shift Register It is an digital circuit which can accepts binary data from input source and then shifts these data
through flip-flops but one bit data at a time.
Serial in Parallel out register In this shift register, data will be loaded serially and data output in parallel form.
Serial in Serial out register In this shift register, data will be loaded serially but data output is also in serial form.
Synchronous Counter In this counter, all the flip-flops are triggered (clocked) simultaneously.
Self Starting and Self Correcting Counter If the counter should not be able to start from any predefined
state or correct state, the self starting and self correcting counter corrects its counting state.
State Table The tabular form representation of sequential circuit.
Sequential Circuit Any sequential circuit consists of a combinational logic circuit and memory elements.
State Diagram This is a graphical approach of representing how the finite state machine changes from one
state to another state.
State Equation The state equation of a sequential circuit is a Boolean expression which represents the condi-
tions of flip-flop state transition.
700 Appendix C
Sequential Machines Machines in which output depends on the immediate inputs to the machine but always
depends on the previous condition of the machine. Any sequential machine has a set of conditions for output.
State The condition of a sequential machine.
SPLD (Simple Programmable Logic Device) A programmable logic device which can be used for smaller
logic circuits, such as PLA, and PAL.
Standard Cell Design The standard cell design technique uses a set of predefined blocks, such as adders,
multiplexers, demultiplexers etc. This technique has less flexibility than full custom.
Structural Model In structural modelling, several components are interconnected with input signals. Therefore
all components must be defined in ENTITY and ARCHITECTURE body. The component statement is used to
declare each component, which are used in the netlist.
Sample and Hold Circuit A sample and hold circuit samples the input signal at the required instant and then
holds it when analog to digital conversion process is going on.
Settling Time The time required for the output of a D/A converter to come to and stay within ± ½ LSB of the
full scale analog output voltage when the input changes from all 0s to all 1s.
Successive Approximation ADC In this ADC, a comparator, a DAC, digital control logic and successive ap-
proximation register(SAR) are used for conversion process. The conversion time for this type of analog to digital
converter is always the same regardless of the value of the input analog signal.
Static RAM(SRAM) A static RAM memory cell consists of flip-flops. Flip-flops are set or reset and retain the
data until it’s charge or power is removed. Static RAMs are manufactured by using bipolar transistors, MOS and
integrated injected logic circuitry.
Sequential Memory In sequential memory, data can be written and read sequentially. Shift register is an ex-
ample of sequential memory.
Twos Complement A binary number can be obtained after adding one to the one’s complement of a binary
number.
Ten’s Complement It is 9’s complement of a decimal number plus one.
Truth table It is a table which represents outputs for all possible combinations of inputs to a logic circuit.
Tristate Output The output of a logic circuit has three states 1, 0, or high-impedance states.
Totem-pole Output A circuit with active devices used to pull up the output voltage of a logic circuit from LOW
to HIGH in response to the inputs.
T-FLIP-FLOP A FLOP-FLOP in which the state toggles on the clock if T is asserted.
Universal Gate A gate which can perform all the basic logic operations, such as NAND, and NOR.
Unipolar Logic Logic circuits using unipolar field-effect transistors (MOSFETs).
Up-Down Counter A counter counts in both upward and downward direction, depending upon the control
signal.
Up Counter A counter counts in upward direction from 0 to maximum value.
Very Large Scale Integration (VLSI) More than 10000 transistors in an IC
Variable Map It is extension of Karnaugh Map to develop a map for more variables.
VHDL It is the VHSIC Hardware Description Language. VHSIC is an abbreviation for Very High Speed Inte-
grated Circuit. It can describe the behaviour and structure of digital logic circuits like ASICs, CPLDs, FPGAs and
conventional digital circuits.
Verilog HDL It is a Hardware Description Language. In Verilog, HDL text format is used to describe electronic
circuits and systems. Verilog HDL can be used for verification of electronic design circuits through simulation, and
timing analysis.
Volatile Memory The memory that loses its contents when power is turned off.
APPENDIX
D
ANSWERS OF MULTIPLE
CHOICE QUESTIONS
CHAPTER - 1
1. (a) 2. (d) 3. (a) 4. (a) 5. (a) 6. (a)
7. (a) 8. (c) 9. (d) 10. (d) 11. (d) 12. (b)
13. (a) 14. (b) 15. (b).
CHAPTER - 2
1. (a) 2. (a) 3. (d) 4. (a) 5. (b) 6. (a)
7. (a) 8.(c) 9. (c) 10. (b) 11. (d) 12. (b)
13. (d) 14. (a) 15. (a) 16. (a) 17. (b) 18.(a)
19. (a) 20. (d)
CHAPTER - 3
1. (b) 2. (a) 3. (a) 4. (d) 5. (a) 6. (a)
7. (a) 8.(a) 9. (a) 10. (d) 11. (b) 12. (b)
13. (b) 14. (a) 15. (a) 16. (c) 17. (a) 18.(a)
19. (a) 20. (a) 21.(a)
CHAPTER - 4
1. (a) 2. (a) 3. (b) 4. (c) 5. (d) 6. (a)
7. (a) 8.(b) 9. (b) 10. (c) 11. (d) 12. (a)
CHAPTER - 5
1. (c) 2. (c) 3. (b) 4. (a) 5. (a) 6. (c)
7. (a) 8. (d) 9. (a) 10. (d) 11. (c) 12. (a)
13. (a) 14. (d) 15. (d).
CHAPTER - 6
1. (b) 2. (a) 3. (b) 4. (b) 5. (a) 6. (b)
7. (d) 8. (d) 9. (b) 10. (c) 11. (c) 12. (a)
13. (a) 14. (a) 15. (b) 16. (b)
702 Appendix D
CHAPTER - 7
1. (c) 2. (a) 3. (a) 4. (a) 5. (d) 6. (a)
7. (c) 8. (c) 9. (d) 10. (a) 11. (b) and (c) 12. (c)
13. (a) 14. (a) 15. (a) 16. (d) 17. (c) 18.(d)
19. (a) 20. (a)
CHAPTER - 8
1. (c) 2. (a) 3. (a) 4. (d) 5. (b) 6. (b)
7. (a) 8. (d) 9. (a) 10. (d) 11. (b) 12. (c)
13. (b) 14. (d) 15. (c) 16. (a) 17. (c) 18.(b)
19. (a) 20. (d) 21. (c) 22. (d) 23. (c) 24. (b)
25. (c) 26. (a) 27. (a) 28.(d) 29. (a) 30. (c)
31. (c) 32. (a) 33. (c) 34. (c) 35. (a) 36. (c)
37. (b) 38.(b) 39. (a) 40. (a)
CHAPTER - 9
1. (a) 2. (a) 3. (a) 4. (a) 5. (a) 6. (a)
7. (a) 8.(a) 9. (a) 10. (d) 11. (a) 12. (b)
CHAPTER - 10
1. (d) 2. (a) 3. (b) 4. (b) 5. (a) 6. (a)
7. (b) 8. (a) 9. (d) 10. (b) 11. (a) 12. (b)
13. (c) 14. (b) 15. (c) 16. (b) 17. (c) 18. (c)
CHAPTER - 11
1. (b) 2. (a) 3. (b) 4. (a) 5. (d) 6. (a)
7. (c) 8. (c) 9. (d) 10. (b) 11. (c) 12. (b)
13. (c) 14. (a) 15. (a) 16. (c) 17. (c) 18. (a)
19. (c) 20. (d)
CHAPTER - 12
1. (c) 2. (a) 3. (a) 4. (d) 5. (d) 6. (a)
7. (a) 8.(c) 9. (a) 10. (b) 11. (a) 12. (a)
13. (b) 14. (a) 15. (b) 16. (a) 17. (a) 18. (b)
19. (b) 20. (b) 21. (c) 22. (c) 23. (d) 24. (a)
25. (a) 26. (c) 27. (a) 28.(a) 29. (a) 30. (c)
31. (d) 32. (c) 33. (a) 34. (a) 35. (a)
CHAPTER - 13
1. (a) 2. (a) 3. (d) 4. (b) 5. (b) 6. (c)
7. (a) 8. (d) 9. (a) 10. (a) 11. (a) 12. (c)
13. (a) (b) 14. (c) 15. (b) 16. (b) 17. (a) 18.(a)
19. (a) 20. (a) 21. (a) 22. (b) 23. (a)
CHAPTER - 14
1. (a) 2. (a) 3. (a) 4. (a) 5. (b) 6. (a)
7. (c) 8. (a) 9. (b) 10. (c)
INDEX
Asynchronous counters 326 Bipolar DAC and ADC 478 Classification of sequential
Absorption laws 49, 52
Asynchronous inputs (Preset Bipolar SRAM 506 circuit 357
Acquisition time 439
and clear) 273, 276 Bistable multivibrators 397, Clock oscillator using
ADC 439
Asynchronous sequential 398 BJTs 398
Addend 234
circuit 378 Bit and bit vector 597 Clocked J-K flip-flop 278
Adder 172
Augend 235 BJT characteristics 81 CMOS Characteristics Logic
Advance memory 540
Availability 77, 804 Boolean level, Noise margin, Fan
Advantages of TTL and
CMOS 116 algebra 46, 47 out, Fan in, Propagation
equation 131 delay 111–112
Algorithmic state
machines(ASM) 384
B CD adder 243 expression 55 CMOS gates 107
BCD DAC 438 laws 49, 64 CMOS inverter 108
Analog system 2
BCD to binary converter 216 notations 47 CMOS NAND, AND, NOR,
Analog to digital
BCD to decimal decoder 182 postulates 49 OR 109–110
converter 441
BCD to Excess-3 decoder 209 variables 48, 694 CMOS shift register stage 526
Analog voltage 1
BCD to nine’s Bridge faults 230 Code conversion using Logic
AND gate 48, 50
complement 215 Buffer gate 90 gates 209
AND operation 48
BCD to Seven segment Buffer register 310 Combinational logic circuits
Aperture time 440
display 180 Buffer 61 using gates 651
Applications of DAC and
Behavioral model 602, 631 Bus realisation 96 Combinational logic
ADC 481
Bidirectional Shift Bus 96 design 172
Applications of decoder 178
register 304 Combinational logic 122
Applications of
Binary coded decimal Commutation laws 49, 51
demultiplexer 208
BCD 29 Commutative laws 51
Applications of flip-flops 289
Binary adder using
Canonical POS 129, 130
Comparator 255
Applications of Canonical SOP 129
decoder 179 Comparison between PROM,
multiplexer 198, 233 Canonical forms 123
Binary addition 20, 234 PAL and PLA 579
Applications of shift Carry look ahead addition 244
Binary arithmetics 20 Comparison of flip-flops 289
register 315 Cascade counters 340, 662
Binary digit weight 442 Comparison of logic
Architecture 599 Cascade Demultiplexer 201
Binary division 22, 250 family 85
Arithmetic logic units Cascading decoders 177
(ALU) 251 Binary multiplication 21 Cascading multiplexer 197 Complements laws 49,51
ASCII code 35 Binary multiplier 247 Complex programmable logic
Cascading Priority
ASICs 546 Binary number system 6 devices 583
encoders 190
Binary number 6 Computer aided design
ASM block 386 Cascading SR flip-flops 272
Binary subtraction 21, 238 tools 599
ASM chart 385 CD-R, CD-RW 560
Association laws 49, 51 Binary to BCD converter 218 CD-ROM 560 Conditional output box 386
Astable multivibrators 397, Binary to decimal 7 Characteristics of digital logic Configurable logic block 587
398, 400 Binary to Gray code 31, 214 family 77 Consensus theorem 69–71
Asynchronous decade Binary to gray 31 Characteristics of TTL 96 Construction of Karnaugh
counters 323 Binary to hexadecimal 17 Charge coupled device Maps 144
Asynchronous up-down Binary to octal 13 CCD 527 Contact bounce
counters 324 Binary weighted DAC 450 Classification of counter 318 elimination 291
704
Content addressable memory, Digital logic family 76 Encoders 183 Fraction decimal number to
CAM 536 Digital number systems 4 Entity 599 binary 9
Conversion Canonical POS to Digital system design 592 EPROM 548, 549 Frequency division 290
Canonical SOP 129–130 Digital to analog Error correcting code 40 Frequency measurement 344
Conversion Canonical SOP to converter 443 Essential Prime Full adder 235, 236
Canonical POS Canonical Digital voltage 1 implicants 143 Full custom design 546
SOP to Canonical Diode transistor logic Even parity 39–40 Full subtractor 239
POS 129 (DTL) 83 Excess-3 code 32 Function generator 505
Conversion one flip-flop to Direct –coupled transistor Exclusive NOR gate 60 Functional simulation 594
other 283 (DCTL) 82 Exclusive OR gate 59
Count down counter 318 Disadvantages of TTL and Extended capacity DAC 454
Counter ICs 326 CMOS 116 Gate sensitivity 230
Counter 326 Display 182 Fall time 100 Gates 46–50
Counters 290, 689 Distribution laws 49, 52 Fan in 79 General positional numbers 5
Counting ADC 466 Don’t cares 150 Fan out 79, 96 Generic 604
Current mode DAC 455 Double Complements laws 51 Fault detection 226 Glitch 220
Current parameters 77–78 DRAM 506–512 Fault of combinational Gray code 30
Drift current 441 logic 226 Gray to Binary code 212
D flip-flop with asynchronous Duality principle 69 Field programmable gate Gray to binary 31
inputs 276 Duel slope ADC 466 array 585 Group 139, 140
D latch with enable 269 Dynamic characteristics 446 Finite state machine 359
D latch 269 Dynamic hazards 220, 225 Five variables Karnaugh
D to T flip flop 285 Dynamic MOS register 521 Maps 142
Half adder / subtractor 241
Half adder 234
DAC 672 Flash converter 472
Half subtractor 238
Flash memory 503
Dark detector 423 E BCDIC Extended
Flip-flop ICs 292 Hamming distance 41
Data flow model 600 binary coded decimal
Decade counters 331, 345 Flip-flop 271, 280 Hamming code 40–42
interchange 37
Hard disk 532
Decimal number 5 ECL Emitter coupled logic 85 Flip-flops 654
Decimal point 5 Edge triggered D flip-flop 275 Floppy disks 533 Hardware description language
Decimal to binary 8 Edge triggered J-K flip- Four bit adder/subtractor 241 (HDL) 595
Decimal to hexadecimal 15 flop 279 Four bit by Four bit Hazard free 225
Decimal to octal 12 Edge triggered S-R flip- multiplication 249–250 Hazards 220
Decimal to Eccess-3(XS3) 32 flop 271 Four bit sign magnitude Hexadecimal number 14
Decision box 386 Edge triggered T flip-flop 281 number 234 Hexadecimal to binary 16
Decoder 174 EEPROM 487–504 Four bit sign magnitude Hexadecimal to octal 17
Effective aperture delay subtraction 238 High threshold logic
Delay time 100
time 441 (HTL) 86
DE-Morgans theorem 49, Four bit subtractor 238
Eight bit ALU 252 Hold time 288
53-55 Four bit binary adder 243
Eight line to one line
Demultiplexer 201 Four bit digital
multiplexer 194
Design entry 593 Eight to three encoder 187
comparator 257 Implementation of
Design of ASM 387 Eight to three Priority Four digit display 182 Boolean functions using
Design of asynchronous encoders 187 Four to 1 line multiplexer 193 PROM 549
sequential circuit 302 Electric eye alarm 422 Four to 2 line Priority Implementation of sequential
Design of counters 337 Elements of Combinational encoders 186 circuits using PROM 551
Design of synchronous logic 122 Four to two encoder 186 Implicant 159
sequential circuit 361 Elimination of Static-0 Four transistor Dynamic MOS Implication table 375
Digital systems 2-3 hazards 223 RAM 515 Instruction manual 644
Digital clock 345 Elimination of Static-1 Four variables Karnaugh Integrated injection logic
Digital comparators 255 hazards 222 Maps 141 (IIL) 86
Index 705
Interfacing TTL and CMOS frequency 288 Odd parity 39 logic array 558
Intersection laws 49, 50 Maxterm 123 One bit digital logic 546
Inversion operation 47 McClusky method of comparator 255 switch matrix 588
Inverter circuit 81 minimisation 159 One to eight Programming PLA ICs 562
Inverter with feedback 263 Melay machine 358 Demultiplexer 204 PROM devices 548
Memory cell 263 One to four PROM 486, 498
J -K flip-flop with Memory operation 488 Demultiplexer 202 Propagation delay time 287
asynchronous inputs 279 Memory organisation 488 One to sixteen Propagation delay 100
J-K flip-flop 279 Memory 291 Demultiplexer 205 Pulse sequencer 423
J-K master slave flip-flop 279 Metal oxide One’s complement 25 Pulse train 198
J-K to D flip flop 286 semiconductor 102 OP AMPs as astable 411 Pulse width 287
J-K to S-R flip flop 284 Metronome 423 OP AMPs as bistable 408
J-K to T flip flop 285 Minimal SOP form 159 OP AMPs as monostable 413 Quantisation 441
Johnson counters 317 Minimisation of simultaneous OP AMPs 411, 406 Quine McClusky method of
functions 154 Open collector output minimisation 159
K arnaugh Maps 137 Minterms 123, 131 gates 90, 91, 94
R -2R ladder circuit 451
Minuend 238 Operating characteristics of
Race around condition 277,
L aboratory instruction 644 Missing pulse detector 422 flip-flops 287
299
Latch 264 Mod n counter 335 Operational amplifiers 433
Radix point 6
Monostable Optical-disks 534
Least Significant bit RAM expansions 518
multivibrators 431 OR gate 57
(LSB) 319 RAM 506
Moore machine 358 OR operation 48
Least Significant digit Ratioless Dynamic MOS
(LSD) 15 MOS characteristics 107 Output equation 364
register 524
Left Shift register 304 MOS ROM 497 Over flow 27
Reflected code 30
MOS SRAM 517
Literal 122
MOSFET 102
Package 605 Register transfer language 595
Logic circuits using diode and Packed BCD 29 Register 290, 295, 656
MSI ICs 208
transistors 646 Parallel addition 246 Repetitive division 8, 12, 15
Logic circuits using gates 651 MSI Medium scale Parallel converter 483
integration 77 Resistor Transistor logic
Logic circuits 64 Parity generator 39
Multi emitter transistor 83 (RTL) 82
Logic function 131 Parity 38
Multiplexers 190 Resolution 557
Logic gates 46 Partitioning 374
Multivibrator 693 Retriggerable monostable
Logic level 47, 97 Path sensitisation 229 multivibrator 397, 431,
Logic simplification using PIPO Shift register 304
Boolean algebra 132
N
bit adder 259
PISO Shift register 310
699
NAND gate 54 Right Shift register 304
Logic simplification using K PMOS (P channel
Negative logic AND/OR Ring counters 316
Maps 146 MOSFETs) 108
gates 70 Rise time 101
Low level input voltage, input Positive logic AND gate 70
Negative logic 70 ROM access time 493
current, output voltage and Positive logic OR gate 70
Nine’s complement 215 ROM expansions 491
output current 78
NMOS NAND NOR gate 106 Positive logic 70 ROM multiplier 505
Low noise margin 79 Power dissipation 78, 101
NMOS(N channel ROM 498
LSI Large scale integration 77 Presettable counters 342
MOSFETs) 105
Prime implicants 162
Noise immunity 77
M agnetic disks memory 530
Noise margin 99
Priority encoders 186 S-a-0 fault 228
Mask-programmable Product of Sums 123 s-a-1 fault 228
NOR gate 54
ROM 548 Programmable Sample and hold circuit 438
NOT gate 55
Master-slave S-R flip-flop 273 array logic 568 Saturation time 100
Matchline structure 540 O
ctal number 12 counters 344 Schmitt trigger 423
Maximum clock Octal to binary 13 design 546 Schottky TTL 84
706
Self correcting counter 342 Sixteen to four encoder 185 T flip-flop with asynchronous Two state machine 262
Self starting and self correcting Source current 102 inputs 281 Two to one Multiplexers 191
counters 664 Specification of ADC 474 T flip-flop 286 Two variables Karnaugh
Self starting counter 343 Specification of DAC 437 T latch with enable 281 Maps 137
Sensitisation 229 Speed of operation 77 T to J-K flip flop 285 Two’s complement adder 241
Sequence generator 666 S-R flip-flop with preset and Tabular method of Two’s complement
Sequential circuit 302, 365 clear 272–274 minimisation 159 subtractor 241
Sequential logic 262 S-R flip-flop with asynchronous Two’s complement 25
Tautology 49–50
Sequential memory 520 inputs 273
Ten line to four line Priority
Serial adder 245 S-R latch with enable 268
Serial data to parallel data S-R latch NAND NOR 265
encoders 186 Unidirectional Shift
S-R to J-K flip flop 283 Ten’s complement 216 register 304
conversion 317
S-R to T flip flop 283 Ternary cells 539 Union laws 49
Settling time 440
SRAM 506, 676 Three transistor Dynamic MOS Universal gate 61
Set-up time 288
SSI Small scale integration 77 RAM 517 Universal shift register 311,
Seven bit hamming code 40
Standard cell design 547 Three variables Karnaugh 313
Seven segment
State diagram 362 Maps 124
display 180, 181, 658
reduction 363 Time delay 316
Shift register counters 316
equation 364 Time period 325
V ariable mapping 157
Shift register 303 Verilog HDL 629
table 362 Timer 555 419, 436
Sign magnitude number 24 VHSIC Hardware description
Static -1 hazards 222 Totem pole output gates 88
Sign magnitude binary Static characteristics 444, 446 Transistor in cut-off 47 language (VHDL) 597
subtracter 242 Static hazards 220 Voltage controlled
Sign magnitude 24 Transistor in saturation 46
Structure model 601, 700 oscillators 419
Simple programmable logic Transistor transistor logic
Stuck-at fault 228 Voltage to frequency
devices 582 (TTL) 83
Subtraction using 2’s converter 468
Simplification of logic complement 26 Tristate output 95
Voltage to time converter 469
circuits 64 Subtractor 238-239 Truth table 55
Simultaneous function 154 Subtrahend 239 TTL Logic gates 83
Simultaneous up-down Successive approximation TTL NAND gate 86, 93 Weighted BCD codes 32
counter 324 ADC 470 TTL to CMOS, TTL to TTL, Wired logic capability 80
Single slope ADC 466 Sum term 122 CMOS to CMOS, CMOS to Wired logic symbol 80
Sinking current 103, 113 Sum of Products 123 TTL 114
SIPO Shift register 306 Switched capacitor DAC 456 Two 4 bit binary number
SISO Shift register 308 Synchronous decade division 251
X NOR gate 60
counters 331 XOR gate 59
Six variables Karnaugh Two bit by two bit
Maps 168 Synchronous counters 328, multiplication 248
Sixteen line to 1 line 333 Two bit digital Z (High impedance) 95
multiplexer 195 Synthesis 593 comparator 255 Zero suppression 181