Professional Documents
Culture Documents
EEE 211 Lecture 7
EEE 211 Lecture 7
EEE211
Lecture 7
Dr Atiqur Rahman
Dept. of Electrical and Computer Engineering
North South University
Four-Variable K-Map
yz Y Y
wx 00 01 11 10
00 m0 = w x y z m1 = w x y z m3 = w x y z m2 = w x y z X
W
01 m4 = w x y z m5 = w x y z m7 = w x y z m6 = w x y z
X
11 m12 = w x y z m13 = w x y z m15 = w x y z m14 = w x y z
W
10 m8 = w x y z m9 = w x y z m11 = w x y z m10 = w x y z X
Z Z Z
4-Variable K-map Terms
0 1 3 2
W
4 5 7 6
X
12 13 15 14
W
8 9 11 10
Z
Combining Four Squares
4 5 7 6
X
12 13 15 14
W
8 9 11 10
Z
Combining Two Squares
• Examples of 2-square Rectangles:
WXZ Y
XYZ WYZ
0 1 3 2
4 5 7 6
X
12 13 15 14
W
8 9 11 10
WXZ
Z
Simplifying 4-Variable Functions
1 0 1 3 1 2
WX 1 4 1 5 1 7 1 6
X
1 12 13 15 14
W
8 9 11 10
1
Z
F=WX+YZ+WZ
Product-of-Sum (POS) Simplification
• F (W, X, Y, Z) = ∑ (1, 2, 3, 9, 10, 11, 13, 14, 15)
• F = WZ +WY +X Z +XY (G = 8+4 = 12)
F
Y Y
0 1 3 2 0 1 3 2
1 1 1 1
4 5 7 6 6
14 1 5
1
7
1
12 13 15 14
X 12 13 15 14
X
1 1 1 1
W 8 9 11 10
W 8 9 11 10
1 1 1 1
Z Z
Product-of-Sum Simplification
4 5 7 6 20 21 23 22
12 13 15 14
C 28 29 31 30 C
B 8 9 11 10 B 24 25 27 26
E E
Example of a Five-Variable K-map
A=0 A=1
D D
16 17 19 18
10 11 3 2
1 1
4 5 7 6 20 21 23 22
1 1
12 13 15 14
C 28 29 31 30 C
B 8 9 11 10 B 24 25 27 26
1 1 1 1
E E
Don't Cares in K-Maps
• Sometimes a function table or K-map contains entries for
which it is known:
– The input values for the minterm will never occur, or
– The output value for the minterm is not used
• In these cases, the output value need not be defined
• Instead, the output value is defined as a “don't care”
• By placing “don't cares” ( an “x” entry) in the function table
or map, the cost of the logic circuit may be lowered.
• Example: A logic function having the binary codes for the
BCD digits as its inputs. Only the codes for 0 through 9 are
used. The six codes, 1010 through 1111 never occur, so the
output values for these codes are “x = don’t cares.”
Example: BCD “5 or More”
• The map below gives a function F(w,x,y,z) which is
defined as "5 or more" over BCD inputs. With the don't
cares used for the 6 non-BCD combinations:
• If the don’t cares were treated as 0’s we get:
F1 = w x z + w x y + w x y (G = 12)
y
• If the don’t cares were 1’s we get:
00 01 03 02
F2 = w + x z + x y (G = 7 better)
04 15 17 16
The selection of don’t cares depends on which x
combination gives the simplest expression X12 X13 X15 X14
w
1 8 1 9 X11 X10
z
Product-of-Sums Example
X4 1 5 1 7 X6
F = (B + D) (A + B) B
12 13 15 14
Gate input cost (G = 6) A
18 1 10
9 11
D
Systematic Simplification
A Prime Implicant is a product term obtained by combining the
maximum possible number of adjacent squares in the map into a
rectangle, with the number of squares equal to a power of 2
3 prime implicants: 1 0 1 1 3 1 2 BC
A, B C, B D
All 3 prime implicants are essential
4 5 7 6
B
1 12 1 13 1 15 1 14
A
A 8 9 11 10
1 1 1 1
D
Optimization Algorithm
1 x 1 x
1 x x 1 1 x x 1
B B
x x
A A
1 1 x 1 1 x
D D
Minterms covered by essential prime implicants
Multiple-Level Optimization
• Algebraic Factoring
F=ACD+ABC+ABC+ACD (G = 16)
• Factoring:
F = A (C D + B C) + A (B C + C D) (G = 16)
• Factoring again:
F = A C (B + D) + A C (B + D) (G = 12)
• Factoring again:
F = (A C + A C) (B + D) (G = 10)
This factoring example has reduced G from 16 to 10
Resulting circuit has three levels plus input inverters
Decomposition Example
• Given the following function:
F = (A (B + C) + D) (B + C) (G = 10)
• Define 2 new functions X and Y as follows:
X = (B + C) and Y = (A X + D)
• Then function F can be decomposed as follows:
F = X Y, where
X = (B + C) and
Y = (A X + D) (G = 8)
Substitution Example