You are on page 1of 100

Digital Systems

Principles and Applications

Khoa Cơ Khí Chế Tạo Máy,


Đại học Sư Phạm Kỹ Thuật Tp.HCM

Tp.HCM, 02/2022
INTRODUCTORY CONCEPTS

1. What are the advantages of digital techniques over analog?


2. What is the chief limitation to the use of digital techniques?

Digital systems Faculty of Mechanical Engineering 03/2021 2


DIGITAL NUMBER SYSTEMS

Digital systems Faculty of Mechanical Engineering 03/2021 3


DIGITAL NUMBER SYSTEMS

1. What is the decimal equivalent of 11010112?


2. What is the next binary number following 101112 in the counting sequence?
3. What is the largest decimal value that can be represented using 12 bits?

Digital systems Faculty of Mechanical Engineering 03/2021 4


DIGITAL NUMBER SYSTEMS

Digital systems Faculty of Mechanical Engineering 03/2021 5


DIGITAL NUMBER SYSTEMS

Digital systems Faculty of Mechanical Engineering 03/2021 6


CONVERSIONS

1. Convert 1000110110112 to its decimal equivalent.


2. What is the weight of the MSB of a 16-bit number?
Digital systems Faculty of Mechanical Engineering 03/2021 7
CONVERSIONS

Digital systems Faculty of Mechanical Engineering 03/2021 8


CONVERSIONS

Digital systems Faculty of Mechanical Engineering 03/2021 9


CONVERSIONS
1. Convert 83 to binary

2. Convert 729 to binary


3. How many bits are required to count up to
decimal 1 million?

4. How many bits are needed to represent decimal


values ranging from 0 to 12,500?

Digital systems Faculty of Mechanical Engineering 03/2021 10


CONVERSIONS

Digital systems Faculty of Mechanical Engineering 03/2021 11


CONVERSIONS

Digital systems Faculty of Mechanical Engineering 03/2021 12


BCD CODE

Digital systems Faculty of Mechanical Engineering 03/2021 13


GRAY CODE

Digital systems Faculty of Mechanical Engineering 03/2021 14


ASCII (American Standard Code for Information Interchange )

1. How do we command to print


a character on the screen?

2. Find the original document


for ASCII table ?

Digital systems Faculty of Mechanical Engineering 03/2021 15


ASCII (American Standard Code for Information Interchange )
1. When one computer is transmitting a message
to another, the information is usually encoded in
ASCII. What actual bit strings would a computer
transmit to send the message HELLO, using ASCII
with even parity?

2. With BAUDRATE of 9600 (bps), draw the timeline


of the transmission?

3. Redraw the timeline with odd parity check?


Digital systems Faculty of Mechanical Engineering 03/2021 16
Review questions
If a microcomputer uses a 20-bit address,

1. How many different memory locations are


there?
2. How many hex digits are needed to represent
the address of a memory location?
3. What is the hex address of the 256th memory
location? (Note: The first address is always 0.)

Digital systems Faculty of Mechanical Engineering 03/2021 17


Review questions
A black-and-white digital camera lays a fine grid over an
image and then measures and records a binary number
representing the level of gray it sees in each cell of the
grid. For example, if four-bit numbers are used, the value
of black is set to 0000 and the value of white to 1111, and
any level of gray is somewhere between 0000 and 1111. If
six-bit numbers are used, black is 000000, white is 111111,
and all grays are between the two.
Suppose we wanted to distinguish among 254 different
levels of gray within each cell of the grid. How many bits
would we need to use to represent these levels?

Digital systems Faculty of Mechanical Engineering 03/2021 18


Review questions
A 3-Megapixel digital camera stores an eight-bit number
for the brightness of each of the primary colors (red,
green, blue) found in each picture element (pixel). If every
bit is stored (no data compression), how many pictures can
be stored on a 128-Megabyte memory card? (Note: In
digital systems, Mega means 220.)

Digital systems Faculty of Mechanical Engineering 03/2021 19


Chapter 2: DESCRIBING LOGIC CIRCUITS
Boolean algebra

truth table for stair circuit?

truth table
Digital systems Faculty of Mechanical Engineering 03/2021 20
Chapter 2: DESCRIBING LOGIC CIRCUITS

Digital systems Faculty of Mechanical Engineering 03/2021 21


Chapter 2: DESCRIBING LOGIC CIRCUITS
the + sign does not stand for ordinary
addition; it stands for the OR operation

Digital systems Faculty of Mechanical Engineering 03/2021 22


Chapter 2: DESCRIBING LOGIC CIRCUITS

The law for OR operation for n input?


Digital systems Faculty of Mechanical Engineering 03/2021 23
Chapter 2: DESCRIBING LOGIC CIRCUITS
the . sign does not stand for ordinary
multiply; it stands for the AND operation

Digital systems Faculty of Mechanical Engineering 03/2021 24


Chapter 2: DESCRIBING LOGIC CIRCUITS

Determine the output waveform for the AND gate shown in the Figure below

Digital systems Faculty of Mechanical Engineering 03/2021 25


Chapter 2: DESCRIBING LOGIC CIRCUITS
1. What logic level should be applied to the second input
of a two-input AND gate if the logic signal at the first
input is to be inhibited (pre-vented) from reaching the
output?

2. Write the Boolean expression for a six-input OR gate.

Digital systems Faculty of Mechanical Engineering 03/2021 26


Chapter 2: DESCRIBING LOGIC CIRCUITS

Digital systems Faculty of Mechanical Engineering 03/2021 27


Chapter 2: DESCRIBING LOGIC CIRCUITS

Digital systems Faculty of Mechanical Engineering 03/2021 28


Chapter 2: DESCRIBING LOGIC CIRCUITS
DESCRIBING LOGIC CIRCUITS ALGEBRAICALLY

Digital systems Faculty of Mechanical Engineering 03/2021 29


Chapter 2: DESCRIBING LOGIC CIRCUITS

Digital systems Faculty of Mechanical Engineering 03/2021 30


Chapter 2: DESCRIBING LOGIC CIRCUITS
1. Write truth table for input and output
2. change each AND gate to an OR gate, and
change the OR gate to an AND gate. Then write
the expression for output x.

Digital systems Faculty of Mechanical Engineering 03/2021 31


Chapter 2: DESCRIBING LOGIC CIRCUITS
In the above logic circuits,

1. Write truth table for input and output

2. change each AND gate to an OR gate,


and change the OR gate to an AND gate.
Then write the expression for output x.

Digital systems Faculty of Mechanical Engineering 03/2021 32


Chapter 2: DESCRIBING LOGIC CIRCUITS
IMPLEMENTING CIRCUITS FROM BOOLEAN EXPRESSIONS

Draw the circuit diagram to implement the expression

Digital systems Faculty of Mechanical Engineering 03/2021 33


Chapter 2: DESCRIBING LOGIC CIRCUITS

Draw the circuit diagram to implement the expression

Digital systems Faculty of Mechanical Engineering 03/2021 34


Chapter 2: DESCRIBING LOGIC CIRCUITS
IMPLEMENTING CIRCUITS FROM BOOLEAN EXPRESSIONS

Digital systems Faculty of Mechanical Engineering 03/2021 35


Chapter 2: DESCRIBING LOGIC CIRCUITS

Digital systems Faculty of Mechanical Engineering 03/2021 36


Chapter 2: DESCRIBING LOGIC CIRCUITS

Digital systems Faculty of Mechanical Engineering 03/2021 37


Chapter 2: DESCRIBING LOGIC CIRCUITS

Digital systems Faculty of Mechanical Engineering 03/2021 38


Chapter 2: DESCRIBING LOGIC CIRCUITS

Digital systems Faculty of Mechanical Engineering 03/2021 39


BOOLEAN THEOREMS

Some Useful Properties


Digital systems Faculty of Mechanical Engineering 03/2021 40
BOOLEAN THEOREMS

Digital systems Faculty of Mechanical Engineering 03/2021 41


BOOLEAN THEOREMS

Digital systems Faculty of Mechanical Engineering 03/2021 42


Some Useful Properties

DEMORGAN’S THEOREMS

the OR sum of two variables is inverted, this is the same as


inverting each variable individually and then ANDing these
inverted variables.

the AND product of two variables is inverted, this is the


same as inverting each variable individually and then
ORing them

Digital systems Faculty of Mechanical Engineering 03/2021 43


Some Useful Properties

DEMORGAN’S THEOREMS

Digital systems Faculty of Mechanical Engineering 03/2021 44


Some Useful Properties

(18)
(19)

Digital systems Faculty of Mechanical Engineering 03/2021 45


UNIVERSALITY OF NAND GATES AND NOR GATES

Digital systems Faculty of Mechanical Engineering 03/2021 46


UNIVERSALITY OF NAND GATES AND NOR GATES

Digital systems Faculty of Mechanical Engineering 03/2021 47


Review questions
In a certain manufacturing process, a conveyor belt will shut down when-ever
specific conditions occur. These conditions are monitored and reflected by the states
of four logic signals as follows: signal A will be HIGH when-ever the conveyor belt
speed is too fast; signal B will be HIGH whenever the collection bin at the end of the
belt is full; signal C will be HIGH when the belt tension is too high; signal D will be
HIGH when the manual over-ride is off.
A logic circuit is needed to generate a signal x that will go HIGH when-ever conditions
A and B exist simultaneously or whenever conditions C and D exist simultaneously.

The circuit is to be implemented with a minimum number of


ICs, which are available below:

Digital systems Faculty of Mechanical Engineering 03/2021 48


Review questions

Digital systems Faculty of Mechanical Engineering 03/2021 49


Review questions

Digital systems Faculty of Mechanical Engineering 03/2021 50


Review questions

Digital systems Faculty of Mechanical Engineering 03/2021 51


Review questions

Digital systems Faculty of Mechanical Engineering 03/2021 52


Review questions

1. Draw the output waveform


2. Suppose that the A input in Figure is unintentionally shorted to
ground (i.e., A = 0). Draw the resulting output waveform.
3. Suppose that the A input in Figure is unintentionally shorted
to the 5 V supply line (i.e., A = 1). Draw the resulting output waveform.
4. Change the OR gate in Figure to an AND gate.
(a)*Draw the output waveform.
(b) Draw the output waveform if the A input is permanently shorted
to ground.
(c) Draw the output waveform if A is permanently shorted to 5 V.
Digital systems Faculty of Mechanical Engineering 03/2021 53
Review questions
5.

6. Use DeMorgan’s theorems to simplify the expression for the output


of Figure

Digital systems Faculty of Mechanical Engineering 03/2021 54


Review questions
7. Convert the circuit of Figure
to one using only NAND gates.
Then write the output
expression for the new circuit,
simplify it using DeMorgan’s
theorems, and compare it
with the expression for the
original circuit.

Digital systems Faculty of Mechanical Engineering 03/2021 55


Review questions
8. Convert the circuit of Figure to one using only NOR gates.
Then write the expression for the new circuit, simplify it using
DeMorgan’s theorems, and compare it with the expression for the
original circuit.

Digital systems Faculty of Mechanical Engineering 03/2021 56


Review questions

Digital systems Faculty of Mechanical Engineering 03/2021 57


Chapter 3: COMBINATIONAL LOGIC CIRCUITS

It is often possible to simplify a logic circuit such as that in part


(a) to produce a more efficient implementation, shown in (b).
Boolean algebra theorems Karnaugh mapping

Digital systems Faculty of Mechanical Engineering 03/2021 58


ALGEBRAIC SIMPLIFICATION
1. The original expression is put into SOP form by
repeated application of DeMorgan’s theorems
and multiplication of terms.

2. Once the original expression is in SOP form, the


product terms are checked for common
factors, and factoring is performed wherever
possible. The factoring should result in the
elimination of one or more terms.

Digital systems Faculty of Mechanical Engineering 03/2021 59


ALGEBRAIC SIMPLIFICATION
Simplify the logic circuit shown in Figure

Digital systems Faculty of Mechanical Engineering 03/2021 60


ALGEBRAIC SIMPLIFICATION
Simplify the logic circuit shown in Figure

Digital systems Faculty of Mechanical Engineering 03/2021 61


ALGEBRAIC SIMPLIFICATION

You can’t

Digital systems Faculty of Mechanical Engineering 03/2021 62


DESIGNING COMBINATIONAL LOGIC CIRCUITS
Write the AND (product) term for each case where the output is 1.
Write the sum-of-products (SOP) expression for the output.

Digital systems Faculty of Mechanical Engineering 03/2021 63


DESIGNING COMBINATIONAL LOGIC CIRCUITS
Example: Design a logic circuit that has three inputs, A, B,
and C, and whose output will be HIGH only when a majority
of the inputs are HIGH.

Digital systems Faculty of Mechanical Engineering 03/2021 64


DESIGNING COMBINATIONAL LOGIC CIRCUITS
Example: Refer to Figure, where an analog-to-digital converter is
monitoring the dc voltage of a 12-V storage battery on an orbiting
spaceship. The converter’s output is a four-bit binary number, ABCD,
corresponding to the battery voltage in steps of 1 V, with A as the
MSB. The converter’s binary outputs are fed to a logic circuit that is to
produce a HIGH output as long as the binary value is greater than
01102 = 610; that is, the battery voltage is greater than 6 V. Design this
logic circuit.

Digital systems Faculty of Mechanical Engineering 03/2021 65


DESIGNING COMBINATIONAL LOGIC CIRCUITS
A stop signal, S, is to be generated to stop the machine operation and
energize an indicator light whenever either of the following conditions
exists: (1) there is no paper in the paper feeder tray; or (2) the two
microswitches in the paper path are activated, indicating a jam in the
paper path. P, Q and R are activated HIGH

Design the logic circuit to


produce a HIGH at output
signal S for the stated
conditions, and implement
it using the 74HC00 CMOS
quad two-input NAND chip.

Digital systems Faculty of Mechanical Engineering 03/2021 66


DESIGNING COMBINATIONAL LOGIC CIRCUITS

Digital systems Faculty of Mechanical Engineering 03/2021 67


Review question

1. Write the sum-of-products expression for a circuit


with four inputs and an output that is to be HIGH
only when input A is LOW at the same time that
exactly two other inputs are LOW.

2. Implement the expression of question 1 using all


four-input NAND gates. How many are required?

Digital systems Faculty of Mechanical Engineering 03/2021 68


KARNAUGH MAP METHOD
The K map gives the same information as truth table
but in a different format. Each case in the truth table
corresponds to a square in the K map.

Digital systems Faculty of Mechanical Engineering 03/2021 69


KARNAUGH MAP METHOD
The K-map squares are labeled so that horizontally
and vertically adjacent squares differ only in one
variable

Digital systems Faculty of Mechanical Engineering 03/2021 70


KARNAUGH MAP METHOD

Digital systems Faculty of Mechanical Engineering 03/2021 71


KARNAUGH MAP METHOD
The expression for output X can be simplified by properly
combining those squares in the K map that contain 1s. The
process for combining these 1s is called looping.

Digital systems Faculty of Mechanical Engineering 03/2021 72


KARNAUGH MAP METHOD
Looping a pair of adjacent 1s in a K map eliminates the
variable that appears in complemented and uncomplemented
form.

Digital systems Faculty of Mechanical Engineering 03/2021 73


KARNAUGH MAP METHOD
Looping a quad of adjacent 1s eliminates the two variables
that ap pear in both complemented and uncomplemented
form.

Digital systems Faculty of Mechanical Engineering 03/2021 74


KARNAUGH MAP METHOD
Looping a quad of adjacent 1s eliminates the two variables
that ap pear in both complemented and uncomplemented
form.

Digital systems Faculty of Mechanical Engineering 03/2021 75


KARNAUGH MAP METHOD
Looping an octet of adjacent 1s eliminates the three variables
that appear in both complemented and uncomplemented
form.

Digital systems Faculty of Mechanical Engineering 03/2021 76


KARNAUGH MAP METHOD
When a variable appears in both complemented and
uncomplemented form within a loop, that variable is
eliminated from the expression. Variables that are the same
for all squares of the loop must appear in the final expression.

Digital systems Faculty of Mechanical Engineering 03/2021 77


KARNAUGH MAP METHOD: Example

Digital systems Faculty of Mechanical Engineering 03/2021 78


KARNAUGH MAP METHOD: Example

Digital systems Faculty of Mechanical Engineering 03/2021 79


Filling a K Map from an Output Expression
1. Get the expression into SOP form if it is not already in that form.
2. For each product term in the SOP expression, place a 1 in each K-
map square whose label contains the same combination of input
variables. Place a 0 in all other squares.

Digital systems Faculty of Mechanical Engineering 03/2021 80


Exercise
Let’s design a logic circuit that controls an elevator
door in a three-story building. The circuit in Figure
has four inputs. M is a logic signal that indicates
when the elevator is moving (M = 1) or stopped (M
= 0). F1, F2, and F3 are floor indicator signals that
are normally LOW, and they go HIGH only when the
elevator is positioned at the level of that particular
floor. For example, when the elevator is lined up
level with the second floor, F2 = 1 and F1 = F3 = 0.
The circuit output is the OPEN signal, which is
normally LOW and will go HIGH when the elevator
door is to be opened.

Digital systems Faculty of Mechanical Engineering 03/2021 81


Exercise

Digital systems Faculty of Mechanical Engineering 03/2021 82


EXCLUSIVE-OR

Digital systems Faculty of Mechanical Engineering 03/2021 83


EXCLUSIVE-NOR

Digital systems Faculty of Mechanical Engineering 03/2021 84


EXAMPLE

Digital systems Faculty of Mechanical Engineering 03/2021 85


EXAMPLE

Digital systems Faculty of Mechanical Engineering 03/2021 86


EXAMPLE
Design a parity generator circuit and parity checking circuit for a
4-bit data transmitter and receiver

Digital systems Faculty of Mechanical Engineering 03/2021 87


PROBLEMS

Digital systems Faculty of Mechanical Engineering 03/2021 88


PROBLEMS

Digital systems Faculty of Mechanical Engineering 03/2021 89


PROBLEMS

Digital systems Faculty of Mechanical Engineering 03/2021 90


PROBLEMS

Digital systems Faculty of Mechanical Engineering 03/2021 91


PROBLEMS

Digital systems Faculty of Mechanical Engineering 03/2021 92


PROBLEMS
Figure shows a diagram for an automobile alarm circuit used to
detect certain undesirable conditions. The three switches are used
to indicate the status of the door by the driver’s seat, the ignition,
and the headlights, respectively.
Design the logic circuit
with these three switches
as inputs so that the alarm
will be activated whenever
either of the following
conditions exists:
■ The headlights are on
while the ignition is off.
■ The door is open while
the ignition is on.
Digital systems Faculty of Mechanical Engineering 03/2021 93
PROBLEMS
Determine the minimum expression for each K map in Fig.

Digital systems Faculty of Mechanical Engineering 03/2021 94


PROBLEMS

Digital systems Faculty of Mechanical Engineering 03/2021 95


PROBLEMS

Digital systems Faculty of Mechanical Engineering 03/2021 96


PROBLEMS

Digital systems Faculty of Mechanical Engineering 03/2021 97


PROBLEMS

Digital systems Faculty of Mechanical Engineering 03/2021 98


PROBLEMS

Digital systems Faculty of Mechanical Engineering 03/2021 99


PROBLEMS

Digital systems Faculty of Mechanical Engineering 03/2021 100

You might also like