Professional Documents
Culture Documents
sg/~cs2100/
Lecture #15
Simplification
Lecture #2: Overview of C Programming 1-2
Questions?
IMPORTANT: DO NOT SCAN THE QR CODE IN THE
VIDEO RECORDINGS. THEY NO LONGER WORK
Ask at
https://sets.netlify.app/module/61c416e2340b0f1ee7dc6257
OR
1. Function Simplification
Why simplify?
Simpler expression leads to circuit that uses fewer logic gates.
Thus cheaper, uses less power, (sometimes) faster.
Techniques
Algebraic
Using theorems
Open-ended; requires skills
Karnaugh Maps
Easy to use
Limited to no more than 6 variables
Quine-McCluskey (non-examinable)
Suitable for automation
Can handle many variables (but computationally intensive)
Aaron Tan, NUS Lecture #15: Simplification 5
Aaron Tan, NUS Lecture #15: Simplification 8
S = X'∙Y + X∙Y' 1 1 1 0
C
Aaron Tan, NUS Lecture #15: Simplification 10
Alternative 1: Alternative 2:
a
b b a
OR OR
a'∙b' a'∙b m0 m1 a'∙b' a∙b' m0 m2
Alternative 3:
a a
OR
b a∙b a'∙b b m3 m1 and others…
a∙b' a'∙b' m2 m0
Aaron Tan, NUS Lecture #15: Simplification 15
b b
a 0 1
0
equivalent to:
a
1
a a
b 1 0
equivalent to: 0
b
1
Aaron Tan, NUS Lecture #15: Simplification 16
b b
0 0 0 1
a 0 1 a 1 0
Aaron Tan, NUS Lecture #15: Simplification 17
c c
bc
a
00 01 11 10
0 m0 m1 m3 m2
1 m4 m5 m7 m6
c y
Aaron Tan, NUS Lecture #15: Simplification 20
y
yz
wx 00 01 11 10
00 m0 m1 m3 m2
01 m4 m5 m7 m6
x
m12 m13 m15 m14
11
w
m8 m9 m11 m10
10
z
Aaron Tan, NUS Lecture #15: Simplification 21
yz y
wx
m0 m1 m3 m2
m4 m5 m7 m6
x
m12 m13 m15 m14
w
m8 m9 m11 m10
z
Aaron Tan, NUS Lecture #15: Simplification 22
ef a'∙b' a'∙b ef
cd 00 01 11 10 10 11 01 00 cd
00 m0 m1 m3 m2 m18 m19 m17 m16 00
01 1 1 0 0
x
0 0 1 1
11
w
0 0 1 1
10
z
Aaron Tan, NUS Lecture #15: Simplification 29
1 1 1 1 1 1 1 1
1 1 1 1
1 1 1 1 1 1 1
P P P
1 1 1 1
1 1 1 1
1 1 1
1 1 1 1 1
O O
Aaron Tan, NUS Lecture #15: Simplification 33
1 1 1 1 1 1
1 1 1
O
1 1 1
P
Aaron Tan, NUS Lecture #15: Simplification 37
1
1
1
1
O 1
1
1
1
P
1 1 1 1
Aaron Tan, NUS Lecture #15: Simplification 39
Algorithm
1. Circle all prime implicants on the K-map.
2. Identify and select all essential prime implicants for
the cover.
3. Select a minimum subset of the remaining prime
implicants to complete the cover, that is, to cover
those minterms not covered by the essential prime
implicants.
Aaron Tan, NUS Lecture #15: Simplification 40
Example #1:
F(A,B,C,D) = m(2,3,4,5,7,8,10,13,15)
A
AB
CD 00 01 11 10
00 0 1 0 1
All prime implicants
01 0 1 1 0
D
11 1 1 1 0
C
10 1 0 0 1
Aaron Tan, NUS Lecture #15: Simplification 41
B
A
AB
CD 00 01 11 10
00 1 1 Answer
01 1 1
D
11 1 1 1
C
10 1 1
Aaron Tan, NUS Lecture #15: Simplification 42
A
AB
CD 00 01 11 10
A'∙B∙C'
00 0 1 0 1 A∙B'∙D'
01 0 1 1 0
D
11 1 1 1 0
C
10 1 0 0 1 B∙D
B
A'∙B'∙C
Aaron Tan, NUS Lecture #15: Simplification 43
Essential prime 01 0 1 1 1
D
implicants? 11 1 1 1 0
C
All, except B∙D, are 0 0 1 0
10
essential.
B
Aaron Tan, NUS Lecture #15: Simplification 44
A
AB
CD 00 01 11 10
00 1 0 0 1
01 1 1 0 1
D
11 1 1 0 1
C
10 1 0 0 1
B
Aaron Tan, NUS Lecture #15: Simplification 45
K-map 00 1 0 0 1 00 0 1 1 0 K-map
of F 01 1 1 0 1 01 0 0 1 0 of F'
D D
11 1 1 0 1 11 0 0 1 0
C C
10 1 0 0 1 10 0 1 1 0
B B
Aaron Tan, NUS Lecture #15: Simplification 46
0 0 1 0 X 0 1 0
A 0 1 1 1 A 0 1 X 1
C C
F = A∙C + A∙B + B∙C F = A∙C + A∙B + B∙C
G B G B
0 1 0 1 X 1 0 1
A 1 0 1 0 A 1 0 X 0
C C
G = A∙B'∙C' + A'∙B'∙C + A∙B∙C + A'∙B∙C' G = B'∙C' + A'∙B' + A'∙C'
Aaron Tan, NUS Lecture #15: Simplification 49
K-map of F: 00 01 11 10 K L M N F
00 0 0 X 1 0 0 0 0 0
0 0 0 1 0
01 0 0 X 1
L 0 0 1 0 1
11 X X X X 0 0 1 1 X
K
10 1 0 X 0 0 1 0 0 0
0 1 0 1 0
N
0 1 1 0 1
F = K'∙M + K∙M'∙N' 1 1 1 0 X
1 1 1 1 X
Aaron Tan, NUS Lecture #15: Simplification 51
A
AB
CD 00 01 11 10
00 1 0 0 1
Fill in the 1’s and 0’s.
01 0 0 1 1
D
11 0 0 1 1
C
10 1 0 1 1
B
Aaron Tan, NUS Lecture #15: Simplification 52
A.D, A.C and B'.D' are EPIs, and they cover all the minterms.
So the answer is: F(A,B,C,D) = AD + AC + B'D'
Aaron Tan, NUS Lecture #15: Simplification 53
A
AB
CD 00 01 11 10
00 X 0 0 1
Fill in the 1’s and X’s.
01 X 0 0 0
D
11 X X 1 0
C
10 1 0 0 1
B
Aaron Tan, NUS Lecture #15: Simplification 54
A
AB
CD 00 01 11 10 Do we need to have an
00 X 0 0 1 additional term A'B' to
01 X 0 0 0 cover the 2 remaining X’s?
D
11 X X 1 0 No, because all the 1’s
C
1 0 0 1 (minterms) have been
10
covered.
B
Aaron Tan, NUS Lecture #15: Simplification 55
Aaron Tan, NUS Lecture #15: Simplification 56
0
F ' = BC' + BD' + B'D
00 X 1 1
Aaron Tan, NUS Lecture #15: Simplification 57
Reading
Alternative Solutions
Read up DLD section 5.8, pg 101.
Quine-McCluskey
Not included in syllabus, but helps in further
understanding.
Read up DLD section 5.10, pg 103 – 105.
Aaron Tan, NUS Lecture #15: Simplification 58
End of File