01 DigitalLogicCircuits
01 DigitalLogicCircuits
01 DigitalLogicCircuits
• Boolean Algebra
• Logic Functions Representation
• Logic Gates
• Logic Functions Minimization
• Combinational Circuits
• Sequential Circuits
Logic Functions
zi = Fi(x0,x1,x2, …) | zi {0,1}, i = 0,1,2, … m-1, xk {0,1}, k = 0,1,2, …n-1
where Fi = logic functions ; xk = input variables; zi = output variables
where Logic 0 = FALSE and Logic 1 = TRUE
Logic function F
Block diagram
x0
x1
Logic z
x2 Circuit
F(x0,x1,x2,x3)
x3
Logic Functions
Logic Inverter
can be represented by
1. truth tables,
Logic function F 2. logic (Boolean) expressions,
3. logic diagrams (schematics) of the logic
x z circuits that implement these functions.
0 1 4. K-maps – later!
1 0 Time diagrams
x (functional simulation)
VHi ≈ +5V =
TRUE = Logic 1
z=x U1A VLo ≈ 0V =
x 1 2
z FALSE = Logic 0
t
0 10 20 30 40 50 [ns]
z (Ideal) time diagram
7404
1
0 0 10 20 30 40 50
t
[ns]
Realistic Time Diagrams
7404 0 t
z=x 0 10 20
td propagation delay
30 40 50 [ns]
x z
0 1
1 0
Realistic Time Diagrams
t
0
Logic Inverter z
0 10 20 30 40 50 [ns]
U1A 1
x z 90%
1 2
50%
10%
0
7404 t
z=x 0 10
td
20
tr
30
tf 6
40 50 [ns]
delay rise time fall time
x z
0 1
1 0
Boolean Algebra over {0, 1}
• ,=,+,., , 0,1
• The algebra is defined over a field B that contain only
two elements {0, 1}
• There are three operations in the field:
1. .: AND binary operation
2. +: OR binary operation
3. : NOT unary operation
• Boolean Algebra is closed on the field B, i.e. the result
of any operation lies in B, i.e. is either 0 or 1
Boolean Algebra over {0, 1}
Property OR AND
Closeness a + b = c → c ε {0,1} a . b = c → c ε {0,1}
Identity a+0=a a.1=a
0 is identity for OR 1 is identity for AND
Commutative a+b=b+a a.B=b.a
Distributive a+(bc) = (a+b) (a+c) a (b + c) = ab + ac
Complement a+a=1 aa=0
Associative (a + b) + c = a + (b + c) (a b) c = a (b c)
Boolean Theorems
Theorem OR AND
Idempotency + = . =
Null + 1= 1 .0 = 0
Absorption + . = . + =
+ . = + . + = .
Uniting . + . = + . + =
Consensus . + . + . + . + . .c
= . + ( . ) = a + b .( . )
Factoring + . + . + .
= . + ( . ) = + .( + )
De Morgan’s Theorems
OR AND
+ = . . = +
+ + + ⋯= . . … . . …= + + + ⋯
Proving Theorems using Axioms
OR rules (identities)
(3) 1+X=1 0 0 0 0 0
(5) X+X=X 0 0 1 0 0
(7) X+X=1 0 1 0 0 0
(17) (X) = X 0 1 1 1 1
1 0 0 1 1
(9) X+Y=Y+X 1 0 1 1 1
(11) X + (Y + Z) = (X + Y) + Z 1 1 0 1 1
(14) 1 1 1 1 1
X + Y . Z = (X+Y) . (X+Z)
(15) X+Y=X.Y
Proving DeMorgan’s Theorem
ab ab
ab ab
a b a.b a+b a+b a.b
a + b = a.b
_______________________________
0 0 1 1 1 1
0 1 0 0 1 1
a.b=a+b 1 1
1 0 0 0
1 1 0 0 0 0
can be generalized:
x1 x 2 x n x1 x 2 x n
Map to 22 Map to 20
Sum of Product (SoP) Representation
A B C
A Logic F
B Circuit
C F(A,B,C)
A.B .C
min-
term A B C F
A.B .C
(m0) 0 0 0 0
F (m1) 0 0 1 0
A.B .C (m2) 0 1 0 1
(m3) 0 1 1 1
A.B .C (m4) 1 0 0 0
(m5) 1 0 1 1
(m6) 1 1 0 0
A B C (m7) 1 1 1 1
A B C
C
A B C D F
read as binary values with A = msb and D = lsb
AB CD 00 01 11 10
(0) 0 0 0 0 ... 0 1 3 2
(1) 0 0 0 1 ... 00
4 5 7 6
(2) 0 0 1 0 ... 01
(3) 0 0 1 1 ... 12 13 15 14 B
11
(4) 0 1 0 0 ... A 8 9 11 10
(5) 0 1 0 1 ... 10
(6) 0 1 1 0 ... D
(7) 0 1 1 1 …
(8) 1 0 0 0 …
(9) 1 0 0 1 … The minterms are listed by an
(10) 1 0 1 0 … equivalent decimal number for
(11) 1 0 1 1 … easy reference
(12) 1 1 0 0 …
(13) 1 1 0 1 …
(14) 1 1 1 0 …
(15) 1 1 1 1 ...
Karnaugh Maps – 5 Variables (0)
a
0
b
0
c
0
d
0
e Y
0
(1)
0 0 0 0 1
The 2 K-maps are obtained from the (2)(3)2 0 0 0 1 0
0 0 0 1 1
3D parallel adjacent squares by (4)
0 0 1 0 0
(5)
0 0 1 0 1
1. translation of the blue square or (6)
0 0 1 1 0
cd e
2. rotation of the green square. (7)
(8)
0 0 1 1 1
ab 000 001 011 010 100 101 111 110 0 1 0 0 0
(9)
00 0 1 3 2 4 5 7 6 0 1 0 0 1
(10)
0 1 0 1 0
8 9 11 10 12 13 15 14 (11)
01 0 1 0 1 1
(12)
24 25 27 26 28 29 31 30 0 1 1 0 0
11 (13)
0 1 1 0 1
(14)
10 16 17 19 18 20 21 23 22 0 1 1 1 0
(15)
0 1 1 1 1
de 00 01 11 10 (16)
1 0 0 0 0
(17)
cd e 0 1 3 2 1 0 0 0 1
(18)
ab 000 001 011 010 100 101 111 110 1 0 0 1 0
(19)
6 7 5 4 8 9 11 10 1 0 0 1 1
00 0 1 3 2 c=0 (20)
1 0 1 0 0
01 8 9 11 10 14 15 13 12 24 25 27 26 (21)
1 0 1 0 1
(22)
1 0 1 1 0
11 24 25 27 26 30 31 29 28 16 17 19 18 (23)
1 0 1 1 1
(24)
10 16 17 19 18 22 23 21 20 1 1 0 0 0
(25)
1 1 0 0 1
(26)
de 00 01 11 10 1 1 0 1 0
(27)
ab 1 1 0 1 1
(28)
00 4 5 7 6 1 1 1 0 0
(29)
1 1 1 0 1
(30)
c=1 01 12 13 15 14 1 1 1 1 0
(31)
11 28 29 31 30 1 1 1 1 1
8 9 11 10 23 22
001 {0,4,32,36} = adjacent cells
011 24 25 27 26
010 16 17 19 18
def
abc 000 001 011 010 100 101 111 110
def
abc 000 001 011 010 100 101 111 110 000 0 1 3 2 4 5 7 6
100 32 33 35 34 36 37 39 38
8 9 11 10 12 13 15 14
001
def 40 41 43 42 44 45 47 46
abc 101 24 25 27 26 28 29 31 30
011
000 0 1 3 2 4 5 7 6 63 62
010 16 17 19 18 20 21 23 22
001 8 9 11 10 12 13 15 14 55 54
100 32 33 35 34 36 37 39 38
011 24 25 27 26 28 29 31 30
101 40 41 43 42 44 45 47 46
010 16 17 19 18 20 21 23 22
111 56 57 59 58 60 61 63 62
110 48 49 51 50 52 53 55 54
27
Logic Minimization
• Manual procedures:
1. Boolean Algebraic manipulation
2. Karnaugh maps (K-maps)
• Automatic procedures for:
a) Finding all Prime Implicants (PI)
b) Finding the minimum cover from the PI’s list
Logic Minimization - Algebraic manipulation
F = ABC + ABC + ABC + ABC
F = (ABC + ABC) + (ABC + ABC)
A B C
F = A(BC + BC) + A ( BC + BC)
F = AB( C + C) + AC ( B + B)
1 1
A.B
F
F = AB + AC
A.C
A A A Logic F
B Circuit
C F(A,B,C)
The Uniting Theorem
100
– AC, A’B
000 A
• A minimum cover of a logic function
ABC AB has to contain all its essential prime
ABC
B implicants
• Theorem: The minimal SoP of a
0 1 3 2
0 0 1 1 BC
4 5 7 6 function is a sum of prime implicants
A 0 1 1 0 ABC B
C
AC 0 1 3 2 AB
ABC AC 0 0 1 1*
4 5 7 6
A 0 1* 1 0 BC
C
33
Logic Minimization using K-Maps
A B C F F 2,3,5,7 AC AB
ABC 0 1
(0) 0 0 0 0 0 1
(1) 0 0 1 0 00 0 0
B 2 3
(2) 0 1 0 1 01 1 1
A BC 00 01 11 10
(3) 0 1 1 1 11
6 7
0 1
(4) 1 0 0 0 0 0 0 0 1 1 3 1*2 AB 4 5
(5) 1 0 1 1 10 0 1
0 4 1*5 17 06
1 BC
(6) 1 1 0 0
(7) 1 1 1 1 AC PI: AC, BC, A’B
C EPI: AC, A’B
Logic Minimization using K-Maps
F 0,2,5,6,7,8,10,13,14,15
ABCD ABCD ABCD ABCD ABCD ABCD ABCD ABCD ABCD ABCD
A B C D F Looping a quad of adjacent 1s eliminates the two variables
(0) 0 0 0 0 1 that appears in both direct and complemented form.
(1) 0 0 0 1 0
CD 00 PI EPI* Non-
(2) 0 0 1 0 1 01 11 10
essential PI
(3) 0 0 1 1 0 AB BD
(4) 0 1 0 0 0 0 1 3 2
BD
00 1* 0 0 1
(5) 0 1 0 1 1 CD
(6) 0 1 1 0 1
4 5 7 6 BC
01 0 1* 1 1
(7) 0 1 1 1 1 12 13 15 14
11 0 1* 1 1
(8) 1 0 0 0 1 BD
(9) 1 0 0 1 0 10 8 9 11 10 BD CD
1* 0 0 1
(10) 1 0 1 0 1
(11) 1 0 1 1 0 BC
(12) 1 1 0 0 0
CD
(13) 1 1 0 1 1
F = BD + BD + or
(14) 1 1 1 0 1
BC
(15) 1 1 1 1 1
SoP/NAND & PoS/NOR implementation
Remember
DeMorgan’s Theorem Equivalent Gate Symbols
A A.B A A+B
A.B =A+ B =
B B
A A+B A A. B
A+ B =A. B =
B B
A F
A A
Incompletely Specified Logic Functions
(7) 0 1 1 1 1 00 1 1 1* 0 AD
(8) 1 0 0 0 1 4 5 7 6 AD
01 0 x 1* 0 ABC
(9) 1 0 0 1 0 12 13 15 14
AD
(10) 1 0 1 0 x 11 1* x 0 x
(11) 1 0 1 1 0 8 9 11 10 ABC
10 1 0 0 x
(12) 1 1 0 0 1
AD BC D
(13) 1 1 0 1 x ABC BC D
(14) 1 1 1 0 x Fmin = AD + AD + or
(15) 1 1 1 1 0 BCD
Incompletely Specified Logic Functions
A B C D F F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 F13 F14 F15 CD 00
(0)
0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
01 11 10
(1)
0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 AB
(2)
0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 3 2
(3)
0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 00 1 1 1* 0
(4)
0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 5 7 6
(5)
0 1 0 1 x 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 01 0 x 1* 0
(6)
0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 12 13 15 14
(7)
0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
11 1* x 0 x
(8)
1 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 8 9 11 10
(9)
1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10 1 0 0 x
(10)
1 0 1 0 x 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1
(11)
1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
(12)
1 1 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ABC
(13)
1 1 0 1 x 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 F13min = AD + AD + or
(14)
1 1 1 0 x 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
(15)
1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
BCD
ABC
F13 = A ⊕ D + or
BCD
A’ D’
B’ B’
C’ C’
A A
D D
Combinational Circuits
Cout
A B Cout S A HA
0 0 0 0 B S
0 1 0 1
1 0 0 1 Cout
1 1 1 0 HA
A S
S=A⊕B B
Cout = (A · B)
Shannon identified the bit as a fundamental unit of information and,
coincidentally, the basic unit of computation.
Combinational Circuits Design
Delay Memory
line
Clock