Digital Logic Design
[EEng-2042 ]
Chapter One:
Introduction to Digital Electronics
Outline
Analog Vs Digital Quantities and Representations
Advantages and limitations of Digital over analog system
Binary Digits, Logic levels and Digital wave forms
Digital Integrated Circuits
2
Analog Vs Digital Quantities and Representations
What is quantity ?
Quantity: the amount or number of something,
especially that can be measured, monitored, recorded, manipulated
arithmetically, observed, or in some other way utilized in most
physical systems.
It is important when dealing with various quantities that we be able to
represent their values efficiently and accurately.
There are basically two ways of representing the numerical value of
quantities: analog and digital.
3
Cont’d...
Analog Quantities
An analog quantity is one having continuous values.
Most natural quantities that we see are analog and vary continuously.
FIGURE 1.1: Graph of an analog quantity (temperature versus time).
4
Cont’d...
Digital Quantities
A digital quantity is one having discrete set of values.
FIGURE 1.2: Sampled-value representation (quantization) of the analog quantity in Figure 1.1. Each
value represented by a dot can be digitized by representing it as a digital code that consists of a
series of 1s and 0s. 5
Advantages and limitations of Digital over analog system
The Digital Advantage
Digital systems can process, store, and transmit data more efficiently
and reliably than analog data.
Also, digital data has a great advantage when storage is necessary.
For example, music when converted to digital form can be stored more
compactly and reproduced with greater accuracy and clarity than is
possible when it is in analog form. Noise (unwanted voltage fluctuations)
does not affect digital data nearly as much as it does analog signals.
6
Cont’d...
Analog and Digital Systems
Many systems use a mix of analog and digital electronics to take
advantage of each technology.
A typical CD player accepts digital data from the CD drive and converts
it to an analog signal for amplification.
CD drive
10110011101 Digital-to-analog Linear amplifier
Digital data converter Analog
reproduction
of music audio Speaker
signal
Sound
waves
FIGURE 1.3: Basic block diagram of a CD player. Only one channel is shown. 7
Binary Digits, Logic levels and Digital wave forms
Digital electronics involves circuits and systems in which there are only
two possible states.
These states are represented by two different voltage levels:
HIGH and
LOW
The two states can also be represented by current levels, bits and
bumps on a CD or DVD, etc.
8
Cont’d...
In digital systems such as computers, combinations of the two states,
called codes, are used to represent
numbers,
symbols,
alphabetic characters, and
other types of information.
The two-state number system is called binary,
and its two digits are 0 and 1.
A binary digit is called a bit.
9
Cont’d...
Binary Digits
Each of the two digits in the binary system, 1 and 0, is called a bit,
which is a contraction of the words binary digit.
In digital circuits, two different voltage levels are used to represent the
two bits.
Generally, 1 is represented by the higher voltage, which we will refer to
as a HIGH, and a 0 is represented by the lower voltage level, which we
will refer to as a LOW.
This is called positive logic and will be used throughout the course.
HIGH 1 and LOW 0
10
Cont’d...
Binary Digits
Another system in which a 1 is represented by a LOW and a 0 is
represented by a HIGH is called negative logic.
Groups of bits (combinations of 1s and 0s), called codes, are used to
represent
numbers,
letters,
symbols,
instructions, and
anything else required in a given application.
11
Cont’d...
Logic Levels
The voltages used to represent a 1 and a 0 are called logic levels.
Ideally,
one voltage level represents a HIGH
another voltage level represents a LOW
12
Cont’d...
Logic Levels
In a practical digital circuit, however, a HIGH can be any voltage
between a specified minimum value and a specified maximum value.
Likewise, a LOW can be any voltage between a specified minimum and
a specified maximum.
There can be no overlap between the accepted range of HIGH levels
and the accepted range of LOW levels.
13
Cont’d...
VH(max)
HIGH
(binary 1)
VH(min)
Unacceptable
VL(max)
LOW
(binary 0)
VL(min)
FIGURE 1.5 Logic level ranges of voltage for a digital circuit.
14
Cont’d...
Logic Levels
Figure 1.5 illustrates the general range of LOWs and HIGHs for a digital
circuit.
The variable VH(max) represents the maximum HIGH voltage value, and
VH(min) represents the minimum HIGH voltage value.
The maximum LOW voltage value is represented by VL(max), and the
minimum LOW voltage value is represented by VL(min).
15
Cont’d...
Logic Levels
The voltage values between VL(max) and VH(min) are unacceptable
for proper operation.
A voltage in the unacceptable range can appear as either a HIGH or a
LOW to a given circuit.
16
Cont’d...
For example
The HIGH input values for a certain type of digital circuit technology
called CMOS may range from 2 V to 3.3 V and the LOW input values
may range from 0 V to 0.8 V.
If a voltage of 2.5 V is applied, the circuit will accept it as a HIGH or
binary 1.
If a voltage of 0.5 V is applied, the circuit will accept it as a LOW or
binary 0.
For this type of circuit, voltages between 0.8 V and 2 V are
unacceptable.
17
Cont’d...
Digital Waveforms
Digital waveforms consist of voltage levels that are changing back and
forth between the HIGH and LOW levels or states.
HIGH HIGH
Rising or Falling or Falling or Rising or
leading edge trailing edge leading edge trailing edge
LOW LOW
t0 t1 t0 t1
(a) Positive–going pulse (b) Negative–going pulse
FIGURE 1.6 Ideal pulses.
18
Cont’d...
Digital Waveforms
Figure 1.6(a) shows that a single positive-going pulse is generated when
the voltage (or current) goes from its normally LOW level to its HIGH
level and then back to its LOW level.
The negative-going pulse in Figure 1.6(b) is generated when the voltage
goes from its normally HIGH level to its LOW level and back to its
HIGH level.
A digital waveform is made up of a series of pulses.
19
Cont’d...
Pulse Definitions
As indicated in Figure 1.6, a pulse has two edges: a leading edge that
occurs first at time t0 and a trailing edge that occurs last at time t1.
For a positive-going pulse, the leading edge is a rising edge, and the
trailing edge is a falling edge.
The pulses in Figure 1.6 are ideal because the rising and falling edges are
assumed to change in zero time (instantaneously).
In practice, these transitions never occur instantaneously, although for
most digital work you can assume ideal pulses.
20
Cont’d...
Overshoot
Ringing
Droop
90%
Amplitude tW
50%
Pulse width
10%
Ringing
Base line Undershoot
tr tf
Rise time Fall time
FIGURE 1.7 Nonideal pulse characteristics.
Actual pulses are not ideal but are described by the rise time, fall time,
amplitude, and other characteristics.
21
Cont’d...
Pulse Definitions
Figure 1.7 shows a nonideal pulse.
In reality, all pulses exhibit some or all of these characteristics.
The overshoot and ringing are sometimes produced by stray inductive
and capacitive effects.
The droop can be caused by stray capacitive and circuit resistance,
forming an RC circuit with a low time constant.
22
Cont’d...
Waveform Characteristics
Most waveforms encountered in digital systems are composed of series
of pulses, some times called pulse trains, and can be classified as either
periodic or nonperiodic.
(a) Periodic (square wave) (b) Nonperiodic
Period = T1 = T2 = T3 = . . . = Tn
1
Frequency =
T
FIGURE 1.8 Examples of digital waveforms.
23
Cont’d...
Waveform Characteristics
The frequency (f) of a pulse (digital) waveform is the reciprocal of the
period.
The relationship between frequency and period is expressed as follows:
1 1
f= T
T f
An important characteristic of a periodic digital waveform is its duty cycle,
which is the ratio of the pulse width (tW) to the period (T).
It can be expressed as a percentage.
tW
Duty cycle= T 100 %
24
Cont’d...
EXAMPLE
A portion of a periodic digital waveform is shown in Figure 1.9. The
measurements are in milliseconds. Determine the following:
(a) period (b) frequency (c) duty cycle
FIGURE 1.9
25
Cont’d...
Solution
a) The period (T) is measured from the edge of one pulse to the
corresponding edge of the next pulse. In this case T is measured from
leading edge to leading edge, as indicated. T equals 10 ms.
b) 1 1
f= f= f =100 Hz
T 10 ms
c) tW 1 ms
Duty cycle= T 100 %= 10 ms
100 %=10 %
26
Cont’d...
A Digital Waveform Carries Binary Information
Binary information that is handled by digital systems appears as
waveforms that represent sequences of bits.
When the waveform is HIGH, a binary 1 is present;
when the waveform is LOW, a binary 0 is present.
Each bit in a sequence occupies a defined time interval called a bit time.
27
Cont’d...
The Clock
In digital systems, all waveforms are synchronized with a basic timing
waveform called the clock.
The clock is a periodic waveform in which each interval between pulses
(the period) equals the time for one bit.
28
Cont’d...
FIGURE 1.10 Example of a clock waveform synchronized with a waveform
representation of a sequence of bits.
29
Cont’d...
Notice that, in this case, each change in level of waveform A occurs at
the leading edge of the clock waveform.
In other cases, level changes occur at the trailing edge of the clock.
During each bit time of the clock, waveform A is either HIGH or LOW.
These HIGHs and LOWs represent a sequence of bits as indicated.
A group of several bits can contain binary information, such as a number
or a letter.
The clock waveform itself does not carry information.
30
Cont’d...
Timing Diagrams
A timing diagram is a graph of digital waveforms showing the actual
time relationship of two or more waveforms and how each waveform
changes in relation to the others.
FIGURE 1.11 Example of a timing diagram.
31
Cont’d...
Data Transfer
Data refers to groups of bits that convey some type of information.
Binary data, which are represented by digital waveforms, must be
transferred from one device to another within a digital system or from
one system to another in order to accomplish a given purpose.
Binary data are transferred in two ways: serial and parallel.
FIGURE 1.12 Serial transfer of 8 bits of binary data. Interval t0 to t1 is first.
32
Cont’d...
FIGURE 1.13 Parallel transfer of 8 bits of binary data. The beginning time is t 0.
33
Cont’d...
Basic Logic Functions
True only if all input conditions are true.
True only if one or more input conditions are true.
Indicates the opposite condition.
34
Cont’d...
Combinational and Sequential Logic Functions
And, or, and not elements can be combined to form various logic
functions. A few examples are:
Comparator Adder
A> B A
A Σ Sum
Two
Two
binary A= B Outputs
binary
numbers numbers
Cout Carry out
B B
A< B Carry in Cin
FIGURE 1.13 The comparison function FIGURE 1.14 Basic arithmetic functions 35
Cont’d...
The Code Conversion Function
A code is a set of bits arranged in a unique pattern and used to represent
specified information.
A code converter changes one form of coded information into another
coded form.
Examples are conversion between binary and other codes such as the
binary coded decimal (BCD) and the Gray code.
36
Cont’d...
The Encoding Function
The encoding function is performed by a logic circuit called an encoder.
The encoder converts information, HIGH
9 Encoder
such as a decimal number or an 8
7
alphabetic character, into some 6 Binary code
5 for 9 used for
coded form. 4 storage and/or
3 computation
2
7 8 9 1
4 5 6 0
1 2 3
FIGURE 1.15 An encoder used to encode
0 . +/– a calculator keystroke into a binary code
Calculator keypad for storage or for calculation.
37
Cont’d...
The Decoding Function
The decoding function is performed by a logic circuit called a decoder
The decoder converts coded information,
such as a binary number, into a noncoded Decoder
form, such as a decimal form.
Binary input
FIGURE 1.16 A decoder used to convert a
7-segment display
special binary code into a 7-segment
decimal readout. 38
Cont’d...
The Data Selection Function
Two types of circuits that select data are the multiplexer and the
demultiplexer.
The multiplexer, or mux for short, is a logic circuit that switches digital
data from several input lines onto a single output line in a specified
time sequence.
Functionally, a multiplexer can be represented by an electronic switch
operation that sequentially connects each of the input lines to the output
line.
39
Cont’d...
The Data Selection Function
The demultiplexer (demux) is a logic circuit that switches digital data
from one input line to several output lines in a specified time sequence.
Essentially, the demux is a mux in reverse.
Multiplexing and demultiplexing are used when data from several
sources are to be transmitted over one line to a distant location and
redistributed to several destinations.
40
Cont’d...
Multiplexer Demultiplexer
A D
Data from Data from Data from Data from
A to D B to E C to F A to D
∆t1 ∆t1
∆t1 ∆t2 ∆t3 ∆t 1
B E
∆t2 ∆t2
∆t3 ∆ t3
C F
Switching Switching
sequence sequence
control input control input
FIGURE 1.17 Illustration of a basic multiplexing/demultiplexing application. 41
Cont’d...
The counting function
Basic purpose of counter is to count events represented by changing
levels or pulses.
Counter Parallel
output lines Binary Binary Binary Binary Binary
code code code code code
for 1 for 2 for 3 for 4 for 5
1 2 3 4 5
Input pulses
Sequence of binary codes that represent the number of
input pulses counted.
FIGURE 1.18 Illustration of basic counter operation.
42
Cont’d...
The Storage Function
Storage is a function that is required in most digital systems, and its
purpose is to retain binary data for a period of time.
Some storage devices are used for short-term storage and some are used
for long-term storage.
A storage device can “memorize” a bit or a group of bits and retain the
information as long as necessary.
Common types of storage devices are flip-flops, registers, semiconductor
memories, magnetic disks, magnetic tape, and optical disks (CDs).
43
Cont’d...
The Storage Function
One type of storage function is the shift register, that moves and stores
data each time it is clocked.
Serial bits
on input line
Initially, the register contains onlyinvalid
0101 0 0 0 0 data or all zeros as shown here.
First bit (1) is shifted serially into the
010 1 0 0 0 register.
Second bit (0) is shifted serially into
01 0 1 0 0 register and first bit is shifted right.
Third bit (1) is shifted into register and
0 1 0 1 0 the first and second bits are shifted right.
Fourth bit (0) is shifted into register and
0 1 0 1 the first, second, and third bits are shifted
right. The register now stores all four bits
and is full.
FIGURE 1.19 Example of the operation of a 4-bit serial and parallel shift register
44
Digital Integrated Circuits
All the logic elements and functions that have been discussed are
generally available in integrated circuit (IC) form.
Digital systems have incorporated ICs for many years because of their
small size, high reliability, low cost, and low power consumption.
Despite the trend toward programmable logic, fixed-function logic
continues to be used although on a more limited basis in specific
applications.
It is important to be able to recognize the IC packages and to know how
the pin connections are numbered, as well as to be familiar with the way
in which circuit complexities and circuit technologies determine the
various IC classifications.
45
Cont’d...
A monolithic integrated circuit (IC) is an electronic circuit that is
constructed entirely on a single small chip of silicon.
All the components that make up the circuit transistors, diodes,
resistors, and capacitors are an integral part of that single chip.
Fixed-function logic and programmable logic are two broad
categories of digital ICs.
In fixed-function logic devices, the logic functions are set by the
manufacturer and cannot be altered.
46
Cont’d...
Points on the chip are connected to the package pins to allow input and
output connections to the outside world.
Plastic
Chip case
The TTL series, available as DIPs are
popular for laboratory experiments
with logic.
Pins
FIGURE 1.20 Cutaway view of one type of fixed-function IC package (dual
in line package) showing the chip mounted inside, with connections to
input and output pins.
47
Cont’d...
IC Packages
Integrated circuit (IC) packages are classified according to the way they are
mounted on printed circuit boards (PCBs) as either through-hole mounted or
surface mounted.
The through-hole type packages have pins (leads) that are inserted through holes
in the PCB and can be soldered to conductors on the opposite side.
Pin 1
The DIP is larger than the SOIC with the
same number of leads. This particular DIP is
approximately 0.785 in. long, and the SOIC
is approximately 0.385 in. long.
Dual in-line package Small outline IC (SOIC)
FIGURE 1.21 Examples of through-hole and surface-mounted devices.
48
Cont’d...
Other surface mount packages:
FIGURE 1.22 Examples of SMT package configurations. Parts (e) and (f) show bottom 49
Cont’d...
Pin Numbering
All IC packages have a standard format for numbering the pins
(leads).
FIGURE 1.23 Pin numbering for two examples of standard types of IC packages. Top
views are shown. 50
Cont’d...
Pin Numbering
The dual in-line packages (DIPs) and the shrink small-outline packages
(SSOP) have the numbering arrangement illustrated in Figure 1.23(a) for
a 16-pin package.
Looking at the top of the package, pin 1 is indicated by an identifier that
can be either a small dot, a notch, or a beveled edge.
The dot is always next to pin 1. Also, with the notch oriented upward,
pin 1 is always the top left pin, as indicated.
Starting with pin 1, the pin numbers increase as you go down, then across
and up. The highest pin number is always to the right of the notch or
opposite the dot.
51
Cont’d...
Pin Numbering
The PLCC and LCC packages have leads arranged on all four sides.
Pin 1 is indicated by a dot or other index mark and is located at the
center of one set of leads.
The pin numbers increase going counterclockwise as viewed from the
top of the package.
The highest pin number is always to the right of pin 1. Figure 1.23(b)
illustrates this format for a 20-pin PLCC package.
52
Cont’d...
Complexity Classifications for Fixed-Function ICs
Fixed-function digital ICs are classified according to their complexity.
The complexity figures stated here for SSI, MSI, LSI, VLSI, and ULSI
are generally accepted, but definitions may vary from one source to
another.
They are listed here from the least complex to the most complex.
Small-scale integration (SSI) describes fixed-function ICs that have up
to ten equivalent gate circuits on a single chip, and they include basic
gates and flip-flops.
53
Cont’d...
Complexity Classifications for Fixed-Function ICs
Medium-scale integration (MSI) describes integrated circuits that have
from 10 to 100 equivalent gates on a chip.
They include logic functions such as encoders, decoders, counters,
registers, multiplexers, arithmetic circuits, small memories, and
others.
Large-scale integration (LSI) is a classification of ICs with
complexities of from more than 100 to 10,000 equivalent gates per chip,
including memories.
54
Cont’d...
Complexity Classifications for Fixed-Function ICs
Very large-scale integration (VLSI) describes integrated circuits with
complexities of from more than 10,000 to 100,000 equivalent gates per
chip.
Ultra large-scale integration (ULSI) describes very large memories,
larger microprocessors, and larger single-chip computers.
Complexities of more than 100,000 equivalent gates per chip are
classified as ULSI.
55
Cont’d...
Programmable Logic
Programmable logic devices (PLDs) are an alternative to fixed function
devices.
The logic can be programmed for a specific purpose.
In general, they cost less and use less board space that fixed function
devices.
56
Cont’d...
A PAL device is a form of PLD that uses a combination of a
programmable AND array and a fixed OR array:
Fixed OR
Programmable array and
AND array output logic
FIGURE 1.23 Example of the operation of a 4-bit serial and parallel shift register
57
Thank You !
58