ALL Lectures
ALL Lectures
DESIGN
•Lecture#1
Digital Logic Design
Recommended Text Book
Digital Logic Design
By
M. Morris Mano
(2nd Edition)
Course Description
• This course presents the basic tools for
the design of digital circuits and provides
methods and procedures suitable for a
variety of digital design applications.
Why is it named ‘digital’?
• Early computers were used mainly to
perform numeric computations
• They used discrete elements of
information: digits
• DIGITAL SYSTEMS: manipulate discrete
elements of information (finite sets)
• E.g. the 10 decimal digits, the 26 letters of
the alphabet, 64 squares of chess board)
TODAY
• Computers are used in a variety of
applications such as scientific calculations,
commercial, and business data
processing, air traffic controls, space
guidance, educational field among others.
• Digital computers have made possible
many scientific, industrial, and commercial
advances that would have been
unattainable otherwise.
Digital Computers and Digital Systems
Introduction:
Characteristic of a Digital system is its
manipulation of discrete elements of information.
Storage, or
Memory Unit
Input Output
Devices Devices
and and
Figure 1.1 Control Control
Block diagram of a digital computer
How does a computer work?
• Memory unit:
– Stores program as well as input, output, and
the intermediate data.
• Processor unit:
– Performs the arithmetic and other data
processing tasks as specified by a program
How does a computer work?
• Control unit:
– Supervises the flow of information between the
various units
– It retrieves the instructions, one by one, from the
program that is stored in the memory
– For each instruction, the control unit informs the
processor to execute the operation specified by
the instructions & the processor manipulates the
data as specified by the program.
How does a computer work?
• The program and data prepared by the
user are transferred into the memory unit
by means of the input device such as
keyboard
•Lecture#
2
DECIMAL NUMBERS
Decimal
Decimal number 7392 is represented by: 7 x 103+
3 x 102 + 9 x 101 + 2 x 100
Minuend: 101101
Subtrahend: 100111
Difference: 000110
Addition and Multiplication of
Binary
Multiplication:
Multiplicand: 1011
Multiplier: x 101
1011
0000
1011
110111
Number Base Conversions
• A binary number can be converted to a decimal
by forming the sum of the powers of 2 of those
coefficients whose value is 1.
Example:
(1010.011)2 = 23+ 21+ 2-2+ 2-3
= (10.375)10
• The binary number has four 1’s and the decimal
equivalent is found from the sum of four powers
of 2.
Number Base Conversions
• The following is an example of Octal-to-
decimal conversion:
(630.4)8 = 6 x 82 + 3 x 8 + 4 x 8-1
– (26153.7460)8
Hexadecimal Numbers
• Conversion of binary to octal:
– 10110001101011.111100000110)2
– 10 1100 0110 1011 . 1111 0010 =
2 C 6 B F 2
– (2C6B.F2)16
COMPLEMENTS
• Complements are used in digital computers for
simplifying the subtraction operation and for
logical manipulation. There are two types of
complements for each base-r system:
• RADIX COMPLEMENT (or R’s Complement)
• DIMINISHED RADIX COMPLEMENT (or (R-1)’s
complement).
– Also, it could be the 2’s and 1’s complement for the
binary system.
– And, 10’s and 9’s complement for decimal numbers.
COMPLEMENTS
• DIMINISHED RADIX Complement for DECIMAL
– Given a number N in base r having n digits, the (r-1)’s
complement of N is defined as (rn – 1) – N.
– For decimal numbers, r = 10 and r – 1 = 9, so the 9’s
complement of N is (10n – 1) – N.
– 10n represents a number that consists of a single 1
followed by n 0’s.
– 10n – 1 is a number represented by n 9’s.
• For example, if n=4, we have 104 = 10,000 and 104 -1 = 9999
COMPLEMENTS
• It follows that the 9’s complement of a
decimal number is obtained by
subtracting each digit from 9.
– Example:
• The 9’s complement of 546700 is 999999 –
546700 = 453299
• The 9’s complement of 012398 is 999999 –
012398 = 987601
COMPLEMENTS
• For binary numbers, r = 2 and r – 1 = 1,
so the 1’s complement of N is (2n – 1) –
N.
• 2nis represented by a binary number
that consists of a 1 followed by n 0’s.
• 2n– 1 is a binary number represented
by n 1’s.
COMPLEMENTS
• Radix Complements
–Example for BINARY:
• The 2’s complement of 1101100 is
0010100.
• The 2’s complement of 0110111 is
1001001.
COMPLEMENTS
A A A+B
A+(B+C)
B B
(A+B)+C
C B+C C
B A AB
B+C
C
B
X
X A
A C AC
X=A(B+C) X=AB+AC
Rules of Boolean Algebra
1.A+ 0 = A 7.A • A= A
2.A +1 = 1 8.A• A = 0
3.A • 0 = 0 9.A = A
4.A •1 = A 10.A + AB = A
5.A + A = A 11.A + AB = A + B
6.A + A = 1 12.(A + B)( A + C) = A + BC
X•Y•Z
X + Y +Z
X+Y+Z
W•X•Y•Z
DeMorgan’s Theorems (Exercises)
Apply DeMorgan’s theorems to the expressions:
( A + B + C)D
ABC + DEF
AB + CD + EF
A + BC + D(E + F )
Proving theorems
Example 1: Prove the uniting theorem-- X•Y+X•Y'=X
Distributive X•Y+X•Y' = X•(Y+Y')
Complementarity = X•(1)
Identity =X
A B C F A B C F’
0 0 0 0 0 0 0 1
0 0 1 0 0 0 1 1
0 1 0 1 0 1 0 0
0 1 1 1 0 1 1 0
1 0 0 0 1 0 0 1
1 0 1 1 1 0 1 0
1 1 0 0 1 1 0 1
1 1 1 1 1 1 1 0
Example of logic simplification
Ex1: x+x’y = (x+x’) (x+y) distributive
=1.(x+y) complementary
=x+y
Ex2: x(x’+y)= xx’+xy distributive
=0+xy complementary
=xy
Ex3: xy+x’z+yz=xy+x’z+yz(x+x’) complementary
=xy+x’z+xyz+x’yz distributive
=xy(1+z)+x’z(1+y)
=xy+x’z Null
One more example of logic
simplification
Example:
Z = A'BC + AB'C' + AB'C + ABC' + ABC
A(B+CD)
A
Constructing a Truth Table for a
Logic Circuit
Once the Boolean expression for a given logic
circuit has been determined, a truth table that
shows the output for all possible values of the
input variables can be developed.
Let’s take the previous circuit as the example:
A(B+CD)
There are four variables, hence 16 (24) combinations
of values are possible.
Constructing a Truth Table for a
Logic Circuit
INPUTS OUTPUT
A B C D A(B+CD)
0 0 0 0 0
0 0 0 1 0
0 0 1 0 0
0 0 1 1 0
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 1
1 1 0 0 1
1 1 0 1 1
1 1 1 0 1
1 1 1 1 1
Boolean Expression
Any logic circuit, no matter how complex, can be completely
described using the three basic Boolean operations: OR, AND,
NOT.
Example: logic circuit with its Boolean expression
Parentheses
(Often needed to establish precedence;
sometimes used optionally for clarity)
How to interpret A•B+C?
Is it A•B ORed with C ?
Is it A ANDed with B+C ?
Order of precedence for Boolean algebra: AND before OR. Parentheses make the expression
clearer, but they are not needed for the case on the preceding slide.
Note that parentheses are needed here :
Circuits Contains INVERTERs
Whenever an INVERTER is present in a logic-circuit diagram, its output
expression is simply equal to the input expression with a bar over it.
More Examples
Precedence
First, perform all inversions of single terms
Perform all operations with paretheses
Perform an AND operation before an OR
operation unless parentheses indicate otherwise
If an expression has a bar over it, perform
the operations inside the expression first and
then invert the result
Determining output level from a
diagra
m
H.W: Determine the output for the condition where all inputs are
LOW.
Implementing Circuits From
Boolean Expressions
When the operation of a circuit is defined by a
expression, we can draw a logic-circuit diagram directly from that
Boolean
expression.
Example
Draw the circuit diagram to implement the
expression
x = ( A + B ) ( B + C )
Review Question
Draw the circuit diagram that implements the
expression
x = ABC( A + D)
x = AB
(
C+ D
x = AB C+
( )
)
D
Example
Determine the output level in last example for
A=B=C=1 and D=0
Review Questions
What is the only set of input conditions that
will produce a HIGH output from a three-
input NOR gate?
Determine the output level in last example for
A=B=1, C=D=0
Change the NOR gate at last example to a
NAND gate, and change the NAND to a NOR.
What is the new expression for x?
Canonical and Standard Forms
Minterms Maxterms
Canonical and Standard Forms
Canonical and Standard Forms
Sum of Minterms F= ∑(1,4,5,6,7)
Product of Maxterms F= ∏(0,2,4,5)
Thank You…
Karnau
gh
What are Karnaugh Maps?
A simpler way †o handle mos† (bu† no†
all) jobs of mani ula†in logic functions.
Karcaugh Advantages
2-bi† Gray
Code
00
01
11
10
Truth Table Adjacencies
A B
These are adjacent in a 9naycode sense -
0 0
†hey differ by 1 bi†
F = A’
We can apply XY + XY’ = X
O 0
F=B Some idea:
A'B + AB = B
Gray code adjacency allows use of Physical adjacency in †ruth †abIe does
simplification theorems not indicate gray code adjacency
2-Variable Karnaugh
A=1, B=0
A-0, B—0
A-1, B-1
A-0, B-1
A A
B 0 1 B 0 1
0 1 0 0 0
‹ 0 1
,
2-Variable Karnaugh
A B F
A
0 0 1 0 1
0 1 1
1
1 0 0
1 1 0 1
,
2-Variable Karnaugh
A B F
A
0 0 1 0 1
B
0 1 1
-0
1 0 0
1 1 0 *0
,
2-Variable Karnaugh
A B F
A
0 0 1 0 1
B
0 1 1
0 1 0
1 0 0
1 1 0 1 1 0
F = A'B’ + A'B = A’
,
2-Variable Karnaugh
A B F
A
0 0 1 0 1
B
0 1 1
0
1 0 0
1 1 0 0
A= 0
,
F = A’
Another Example
A B F A
0 0 0 B 0 1
0 1 1
0 0 1
1 0 1
1 1 1
1 1 1
F = A'B + AB’ + AB
(A'B + AB) + (AB’ + AB)
= A+ B
Another Example
A B F A
0 0 0
0 1 1
1 0 1
A= 1
1 1 1
B=1
F = A+ B
Yet Another Example
A B F A
0 0 1 B
0 11
10 1
111
F =1
ABC = 010
3-Variable Karnaugh Map Showing
Min†erm Locations
A
BC 0 1
No†e †he order of 00 m0 m4
the B Cvariables:
01 m1 m5 •
00 ABC 101
01 11 m3 m7
11 10 m2 m6
10
ABC = 010
Adjaceccies
• Adjacent squares differ by exactly one
variable
A
0
00 AB'C'
There is wrap around:
01 A'B’C AB'C t O p Ctnd bot†om rows are adJ•Ce n †
11 ABC
10 ABC'
Truth Table to
Karnaugh
A B C F A
0 0 0 0 BC 0 1
0 0 1 0
oo 0 0
0 1 0 1
0 1 1 1 01 0 1
1 0 0 0 11 1 1
1 0 1 1
10 1 0
1 1 0 0
1 1 1 1
Example
A
BC 0 1
« o o AB C+ABC = AC
01 0
11 1 1
0
A’BC+A'BC’ =A'B
F = A'B + AC
Another Example
A
BC o
oo 0
01 1 0 AB’C’+ABC’ =AC'
A’B’C+A’BC = A'C
11 0
10 0 1
F = A'C + AC’ = A ⊕ C
Min†erm Expression †o
F = σ m(1, 3, 4, 6 )
A A
BC 0 1 BC 0 1
00 m0 m4 00 0 1
01 m1 m5 01 1 0
11 m3 m7 11 1 0
10 m2 m6 10 0 1
F = ς M( 0, 2, 5, 7 )
A A
0 1 BC 0 1
00 M0 M4 00 0 1
01 M1 M5 01 1 0
11 M3 M7 11 1 0
10 M2 M6 10 0 1
A’B’C’+AB’C’+A’B’C+AB’C = B’
AB’C+ABC = AC
F = B’ + AC
• Plo†: ab'c’ + be + a’
• A
• BC
Boolean Algebra to Karnaugh
Plo†: ab'c’ + be + a’
A
BC 0 1
00
01
11
10
Boolean Algebra to Karnaugh
Plo†: ab'c’ + bc + a’
A
BC 0 1
00 1
01
11 1 1
10
Boolean Algebra to Karnaugh
• Plo†: ab'c’ + bc + a’
• BC
00
01
10
Boolean Algebra to Karnaugh
Plo†: ab'c’ + bc + a’
A
BC 0 1
00 1 1
01 1 0
Remaining
11 1 1
spaces are 0
10 1 0
Boolean Algebra to Karnaugh
Now minimize . .
A
BC
00 F = B'C’ + BC + A’
01
A A A
BC BC BC
00
01 01 01
11
10
Sum of Product Terms
The 3—variable map has 6 possible groups of 4 spaces
01 01
10
4-Variable Karnaugh
AB
AB
CD 00 01 11 10 CD 00 01 11 10
00 m0 m4 m12 m8 00 0 0 0 1
01 1 1 1 1
01 m1 m5 m13 m9 AB'C’
11 m3 m7 m15 m11 1 1 1 1
10 m2 m6 m14 m10 1 0 0
D
A'BC
F = A'BC + AB'C’ + D
CD oo
00
01
C'D
01
11
10
Dealing With Don't Cares
F = σ m(1, 3, 7) +σ d(0, 5)
A
BC 0 1
00 X
01 1 x
A’B’C+AB’C+A’BC+ABC C
11 1 1
10 0 0
F=G
Circle †he x's †ha† help ge† bigger groups of 1’s (or 0‘s if POS)
Don’t circle the x's that don't
Solutions
Some Terminology
and
An Algorithm †o Find Them
Prime ImpIicac†s
• A group of one or more 1's which are adjacent and can
be combined on a Karnaugh Map is called an implican†.
01 0 0 1 1
11 0 1 1 1
10 0 1 1 1
10 0 1 1 1
For example:
F = A.B + C.D + E
Above function implentation by NAND gate
NOT gate implementation using NOR gate
Implementation using
NOR gate
Our 2nd Topic is
Other Two Level Implementation
• It is a wire connection.
AND-OR-Invert function.
F = (A.B).(C.D) = (A.B+C.D) = (A'+B').(C'+D')
Open collector TTL NAND
gate
ECL
gate
• ECL stands for Emitter Coupled Logic