Table Of Content2000 Solved Problems in
Digital Electronics
About the Author
S P Bali has been associated with the field of electronics for over 45 years. As a professional trainer, he has
directed job-oriented courses on Audio/Video Appliances and Consumer Electronics in Haryana and Delhi. He has
over twenty years of teaching experience, inducting new entrants into the field of electronics and teaching basic
and diploma level courses in Military College of Electronics and Mechanical Engineering (MCEME), Secunderabad.
He has contributed articles to magazines and authored three other books, namely, Colour Television: Theory and
Practice (TMH), Consumer Electronics and Solid State Devices and Circuits.
His fields of interest are A/V Appliances, Consumer Electronics, Electronic Devices and Circuits and Electrical
and Electronic Instruments and Instrumentation.
2000 Solved Problems in
Digital Electronics
S P Bali
Tata McGraw-Hill Publishing Company Limited
NEW DELHI
McGraw-Hill Offices
New Delhi New York St Louis San Francisco Auckland Bogotá Caracas
Kuala Lumpur Lisbon London Madrid Mexico City Milan Montreal
San Juan Santiago Singapore Sydney Tokyo Toronto
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 McGraw-Hill
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.
Copyright © 2005, by Tata McGraw-Hill Publishing Company Limited.
No part of this publication may be reproduced or distributed in any form or by any means, electronic, mechanical,
photocopying, recording, or otherwise or stored in a database or retrieval system without the prior written permission
of the publishers.Theprogramlistings (if any) may be entered, stored and executed in a computer system, but they
may not be reproduced for publication.
This edition can be exported from India only by the publishers,
Tata McGraw-Hill Publishing Company Limited.
ISBN 0-07-058831-7
Published by the Tata McGraw-Hill Publishing Company Limited,
7 West Patel Nagar, New Delhi 110 008, typeset in Times at The Composers,
260, C.A. Apt., Pashchim Vihar, New Delhi 110 063 and printed at
S P Printers, E-120, Sector 7, Noida, Ghaziabad, U.P. 201 301
Cover: Meenakshi Printer
RALCRDLIRYCYC
This book is dedicated to my grandchildren
Parth, Niharika and Mallika
PPrreeffaaccee
Always design a thing by considering it in its next larger context—a chair in a room, a room in a
house, a house in an environment, an environment in a city plan.
Over the years, the design and construction of electronic circuits have changed dramatically. New devices have
been discovered and old devices improved. Electronic circuits have shrunk considerably in size, and construction
techniques have shifted from discrete components to the use of plug-in integrated circuits that already contain the
complete circuit. The needs of the technician and the experimenter have also changed over the years. This book is
an attempt to meet that need, by presenting a wide variety of related material together in just one volume. You will
find theoretical concepts and design information on digital circuits, helpful data sheets and know-how about an
assortment of integrated circuits. Throughout the text the author has endeavoured to bridge the gap between
Blackboard and Breadboard.
In order to build and design digital circuits you have to have a firm grasp of the fundamentals. The material in
this book is appropriate for introductory courses on digital logic design in electrical or computer engineering or
computer science curricula. The background required is familiarity with basic electronics concepts. Though the
level of this book is introductory, it contains much more material than can be taught in a typical introductory
course.
No technical book ever made light bedtime reading. Nor is it possible, in just over four-hundred and fifty pages
of legible type, to transform the novice into a full fledged circuit designer. What can be done, however, is to
present the most important information to the largest number of users, in such a way that it can be absorbed as
readily as possible.
Each chapter begins with a review of relevant topics in digital circuit theory which will be useful throughout the
text. There are a large number of worked out examples in the text to illustrate how the theory may be applied to
obtain quantitative results and to emphasize the order of magnitude of the effects under consideration.
In addition, a summary of the keypoints, review questions, supplementary problems, fill in the blanks, true and
false statements and multiple-choice questions (chapter-wise) are provided to motivate the students, and strengthen
the group of basic concepts, help in self evaluation, and give the students an experience in the design of the circuits
discussed in the text and of other configurations to perform similar functions. Answer/Hints for solution are
provided chapter-wise.
In almost all numerical problems, realistic parameters, values and specifications have been chosen. Considerable
care has been exercised in the development of these problems, which are an integral and important part of the text.
There is always a time-lag between the introduction of a new device with its technical data, which enables the
circuit designer to go ahead; and the production of a circuit for some particular application, which can be put in the
hands of the general user. Broadly speaking the circuits have been restricted to devices which are available now.
xiv Preface
A digital signal is modeled as taking on, at any time, only one of two discrete values, which we call 0 or 1 (or
LOW and HIGH, FALSE and TRUE, Negated and Asserted or whatever). The students might ask a very geniune
question.
What are we going to do with ( ) AND, ( ) OR, ( ) INVERT!
What are you able to build with your blocks?
Castles and palaces, temples and docks.
Robert Louis Stevenson
The book comprises eighteen chapters. Chapter 1 on Digital Concepts is of an introductory nature and introduces
the student to the domain of digital electronics.
Chapter 2 on Number Systems gives a comprehensive coverage of the four number systems (decimal, binary,
octal, or hexadecimal) and conversion of any number in one system to its equivalent value in any of the remaining
three numbering systems.
Chapter 3 deals with Codes and Parity. There are many specialized codes used in digital systems. Some codes
are strictly numeric, like the BCD, while others are alphanumeric like the ASCII, they are used to represent
numbers, letters, symbols, and instructions. Also, the detection of errors in codes using a parity bit is covered.
Information on codes that use other methods of error detection and an error correcting code are also discussed.
Logic Gates, (Chapter 4), are the basic building blocks for forming digital electronic circuitry. Gates allow or
retard the flow of digital information. The seven logic gates AND, OR, NAND, NOR, INVERT, XOR and XNOR are
explained in detail with the help of timing diagrams.
Boolean Algebra, (Chapter 5), uses many of the same laws as those of ordinary algebra. The OR function
(X = A + B) is the Boolean addition and the AND function (X = AB) is the Boolean multiplication. By using the laws
of Boolean algebra you can rearrange Boolean equations to form simpler equivalent circuits using fewer gates.
All Boolean expressions, regardless of their form, can be converted into either of two standard forms: the sum-
of-products (SOP) form or the product-of-sums (POS) form. Standardization makes the evaluation, simplification,
and implementation of Boolean expressions much more systematic and easier. There are two methods of systematically
reducing Boolean expressions, the graphical method or Karnaugh map and the Quine McClusky or tabulation
method. Both of these methods are discussed under the heading Reduction Techniques in Chapter 6.
Chapter 7 on Pulse and Switching Devices deals with the characteristics of pulse waveforms (both ideal and
non-ideal) and the use of electromechanical relays, diodes, transistors, JFETs, MOSFETs, and CMOS for switching
applications.
Linear waveshapers (integrators and differentiators) and non-linear waveshapers (limiters, clippers and clampers)
are discussed in Chapter 8 on Waveshaping. This chapter also includes sweep circuits.
The various approaches to digital logic design are called Logic Families (Chapter 9). Logic specifications and a
detailed description of the various logic families is given in this chapter. A comparison of the logic families and
their relative advantages and disadvantages are also discussed.
Chapter 10 on Arithmetic Circuits discusses the four arithmetic operations—addition, subtraction, multiplication
and division—and digital hardware to facilitate these operations. Sign-magnitude representation of numbers, one’s
and two’s complement representation, two’s complement addition and subtraction and floating-point numbers are
discussed in detail.
Combinational logic circuits may contain an arbitrary number of logic gates and inverters but no feedback loops.
In combinational circuit analysis we start with a logic diagram and proceed to a formal description of the function
performed by that circuit, such as a truth table or a logic expression. In synthesis we do the reverse, starting with a
formal description and proceeding to a logic diagram. The purpose of Chapter 11 on Combinational Logic
Circuits is to give the student a solid theoretical foundation for the analysis and synthesis of combinational logic
circuits, a foundation that will be doubly important later when we move on to sequential circuits.
The outputs of sequential logic circuits depend not only on current inputs, but also on the past sequence of
inputs. Latches and flip-flops are the basic building blocks of most sequential circuits. Typical digital
systems use latches and flip-flops that are prepackaged, functionally specified devices in a standard integrated
circuit. We study these discrete designs for two reasons—to understand the behaviour of the prepackaged elements
better, and to gain the capability of building a latch or flip-flop from scratch, as is required occasionally in
digital-design practice and often in digital-design exams. These topics are covered in Chapter 12 on Flip-
Flops.
Preface xv
In a generic computer registers are used extensively for temporary storage of data in areas other than memory.
Data is shifted to left or right in a shift register. Counters time the duration of various events and count events.
These applications are called sequential because they follow a predetermined sequence of digital states and are
triggered by a timing pulse or clock. Registers and Counters form the subject of Chapter 13.
A large digital system cannot be understood through a detailed electrical analysis of all its circuits. The system
as a whole can be understood only by a model that simplifies the system. One such model is the sequential (finite
state) machine. Both Mealy and Moore machine are explained in Chapter 14 on Sequential Machines.
Any sequential circuit has memory of a sort, since each flip-flop or latch stores one bit of information.
However, we usually reserve the word Memory (Chapter 15) to refer to bits that are stored in a structured way,
usually as a two-dimensional array in which one row of bits is accessed at a time. This chapter describes several
different memory organisations and commercially available memory chips.
Since their introduction years ago Programmable Logic Devices (Chapter 16) have been very flexible workhorses
of digital design. As IC technology advanced, there was naturally greater interest in creating larger PLD architectures
to take advantage of increased chip density. Programmable Logic Arrays (PLAs), Programmable Array Logic
(PAL), Generic Array Logic (GAL), Complex Programmable Logic Devices (CPLDs) and Field Programmable
Gate Array (FPGA) are also discussed.
The real world is analog in nature. A common boundary between two physical or functional units is called an
interface. Converters for Interfacing (Digital-to-Analog and Analog-to-Digital) form the subject of study in Chapter
17. Digital-to-Analog conversion (DAC) involves translation of digital information into equivalent analog information.
Analog-to-Digital converters (ADCs) are used for the conversion of analog signals into digital signals. All digital
systems have ADCs as part of their structure. The problems encountered in interfacing logic families are also
discussed in this chapter.
In recent years the microprocessor has become an integral part of many electronic systems. Apart from its
obvious use in personal computers, the microprocessor is commonly found in industrial equipment and is frequently
incorporated into domestic equipment, such as video recorders and washing machines. Microprocessor Basics are
discussed in Chapter 18.
Appendices A to E provide a wealth of information. A Glossary of key terms is given at the end of the book.
Also included is a list of reference books (Bibliography) for those students interested in higher studies.
The project has taken considerable time to see the light of day—precious time has been spent in giving the book
the shape you find it in today; the major setback being the constraint of space.
I personally feel the book will prove to be a constant companion of engineering students irrespective of the
discipline they opt for.
I gratefully acknowledge the help from different reviewers in answering a comprehensive questionnaire and
making valuable suggestions for the improvement of the text.
I would like to put on record the valuable suggestions and cooperation of Ms Vibha Mahajan, and the entire
editorial and production teams of Tata McGraw-Hill in bringing out this book.
Finally, I would like to thank my wife, Suksham, for her patience, understanding, support and encouragement.
I hope the students will enjoy studying this book as much as I have enjoyed writing it.
S P BALI
BBrriieeff CCoonntteennttss
Preface xiii
1. Digital Concepts 1
2. Number Systems 11
3. Codes and Parity 32
4. Logic Gates 45
5. Boolean Algebra 76
6. Reduction Techniques 105
7. Pulse and Switching Devices 133
8. Wave Shaping 160
9. Logic Families 179
10. Arithmetic Circuits 212
11. Combinational Logic Circuits 241
12. Flip-Flops 265
13. Registers and Counters 295
14. Sequential Machines 315
15. Memory 321
16. Programmable Logic Devices 350
17. Interfacing 366
18. Microprocessor Basics 385
Appendix A: Logic OperationsComparison Chart 397
Appendix B: Digital ICs 399
Appendix C: Linear Integrated Circuits 415
viii Brief Contents
Appendix D: Interfacing Devices 419
Appendix E: 6800 Microprocessor 421
Glossary 427
Bibliography 432
Index of ICs 435
Index 437