Professional Documents
Culture Documents
Karnaugh Maps
NurulHazlina/BEE2243/Glitches
Introduction
Merit of a network include
In this course, unless otherwise specified, the cost of a network is defined to be the total number of gates plus the total number of gate inputs. Solutions -> Simplification of design (Boolean Equation)
NurulHazlina/BEE2243/Logic
Simplification Methods
A graphic method that can handle Boolean expressions up to 6 variables Karnaugh maps A tabular method that has no limit on the number of variable and can be implemented on a computer Quine-McCluskey method
NurulHazlina/BEE2243/Logic
Karnaugh Maps
Possibilities of simplification is signified by the presence of 1s occupying adjacent cells. Conceptually, it may be useful to think of a Karnaugh map as a different form of the truth table. Each row of the truth table is embedded in a cell in the map in such a way that the possibility of simplification becomes obvious.
NurulHazlina/BEE2243/Logic
2-variable K-map
3-variable K-map
4-variable K-map B Numbering Scheme: 00, 01, 11, 10 Gray Code only a single bit changes from code word to next code word
5
B 0 1
0 1 0
1 1 0
F=A
A B Cin 0 1 00 0 0 01 0 1 11 1 1 A 10 0 1
G = B'
AB C 0 1
A 00 0 0 01 0 0 B 11 1 1 10 1 1
F(A,B,C) = A
6
F(A,B,C) = Sm(0,4,5,7) F = B' C' + A C In the K-map, adjacency wraps from left to right and from top to bottom
AB C 0 1
A 00 0 1 01 1 1 B 11 1 0 10 0 0
A 00 1 0 1 01 0 1 1 11 0 0 1 1 10 1 0 D 1 1
F(A,B,C,D) = Sm(0,2,3,5,6,7,8,10,11,14,15)
F = C + A' B D + B' D'
Find the smallest number of the largest possible subcubes that cover the ON-set
F = (B + C + D) (A + C + D) (B + C + D)
F=BCD+ACD+BCD
F = (B + C + D) (A + C + D) (B + C + D)
ECE C03 Lecture 2 9
F(A,B,C,D) = Sm(1,3,5,7,9) + Sd(6,12,13) F = A'D + B' C' D w/o don't cares F = C' D + A' D w/ don't cares
By treating this DC as a "1", a 2-cube can be formed rather than one 0-cube
AB CD 00 01 A 00 0 1 1 0 01 0 1 1 X B 11 X X 0 0 10 0 1 D 11 0 0 C 10
In PoS form: F = D (A' + C') Same answer as above, but fewer literals
10
Repeat Steps 1 and 2 to find all prime implicants Step 3: Revisit the 1's elements in the K-map. If covered by single prime implicant, it is essential, and participates in final cover. The 1's it covers do not need to be revisited If there remain 1's not covered by essential prime implicants, then select the smallest number of prime implicants that cover the remaining 1's
Step 4:
11
AB CD 00 01
A 00 X 0 01 1 1 11 0 1 10 1 1 D
AB CD 00 01 11
A 00 X 0 0 01 1 1 X 11 0 1 X 10 1 1 D 0
Initial K-map
12
Example Continued
AB CD 00 01 11 C 10 0 1 B 0 1 A 00 X 0 0 01 1 1 X 11 0 1 X 10 1 1 D 0 C 10 0 1 B 0 1 11 0 X X 0 C 10 0 1 B 0 1 AB CD 00 01 A 00 X 0 01 1 1 11 0 1 10 1 1 D 11 0 X X 0 AB CD 00 01 A 00 X 0 01 1 1 11 0 1 10 1 1 D
13
Karnaugh Maps
Map of a function of 2 variables
NurulHazlina/BEE2243/Logic
Karnaugh Maps
Map of a function of 3 variables
NurulHazlina/BEE2243/Logic
Karnaugh Maps
Map of a function of 4 variables
NurulHazlina/BEE2243/Logic
Karnaugh Maps
Map of function of five variables f(v, w, x, y, z)
NurulHazlina/BEE2243/Logic
Karnaugh Maps
Maps with cells designated by decimal numbers
NurulHazlina/BEE2243/Logic
Karnaugh Maps
Typical subcubes for elimination
NurulHazlina/BEE2243/Logic
Karnaugh Maps
The map for f(w,x,y,z) = m(1,2,3,5,6,7,8,13)
NurulHazlina/BEE2243/Logic
Karnaugh Maps
The map of f = xy + wxz + wxyz
NurulHazlina/BEE2243/Logic
Karnaugh Maps
Map for the functions f(w,x,y,z) = m(1,3,4,5,6,7,11,14,15)
NurulHazlina/BEE2243/Logic
Karnaugh Maps
f(w,x,y,z) = m(0,3,7,8,12) + dc(5,10,13,14).
NurulHazlina/BEE2243/Logic
y
0
0
0
0 0 0
0
0 1 1
0
1 0 1
f0
f1 f2 f3
1
1 1
0
0 1
0
1 0
f4
f5 f6
00 01
yz
11 10
0 0 0 1 1 0
0 1
f0
f4
f1
f5
f3
f7
f2
f6
v
v 1
f7
1 1
NurulHazlina/BEE2243/Logic
NurulHazlina/BEE2243/Logic
NurulHazlina/BEE2243/Logic
NurulHazlina/BEE2243/Logic
STEP1: Form an optimal collections of subcubes involving the literal z using the cells containing 1s as dont-care cells and the cells containing the literal z as 0-cell.
STEP2: Form an optimal collection of subcubes involving the 1-cell not completely covered in STEP1 by replacing the literals z and z with 0 and 1-cell that is completely covered with dontcares.
NurulHazlina/BEE2243/Logic
Example1
yz 00 01 11 10
x 0 0 0 0 1 1 1 1
y 0 0 1 1 0 0 1 1
z 0 1 0 1 0 1 0 1
f 1 1 1 0 0 1 0 0
M 1 z z 0
x 0 1
1 0
1 1
0 0
1 0
yz + xz
1 z
z 0
NurulHazlina/BEE2243/Logic
Example2
w 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 x 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 y 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 z 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 f 0 1 1 1 0 0 1 1 0 0 1 0 0 0 1 1
Map
00 0 w 1
xy 01 11
10
z 0
00
1 z
1 1
0 0
10
z 1
w
xy 01 11
0 1
z 0
00
0
1
1 z
1 1
0 0
10
xy 01 11
0
z
w 1
z 0
00
1 z
1 1
0 0
10
xy 01 11
0
1
0 w 1
0 0
-0
1 1
0 0
Example3
w 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
x 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1
y 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1
z 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
f 0 1 0 0 1 1 0 1 0 1 1 0 0 0 1 1
Map z 0 1 z z
z
0
NurulHazlina/BEE2243/Logic
Cont : Example3
00 0 w 1
xy 01
xy 11 10 00 0 w 1 01 11 10
z
Z
0
z
xy 01
z
1
1
0
z z
0 z
xy 01
z 1
1 0
00 0 w 1
11
10
00 0 w 1
11
10
0 0
0 0
0 --
1 0
NurulHazlina/BEE2243/Logic
Cont : Example4
00
0 w 1 xy 01
11
10
00
0 w 1
xy 01
11
10
z z
z 1
xy 01
z z
z z
z z
z 1
xy
z 0
z z
00
11
10
00 0 w 1
01
11
10
0
w 1
z
z
z
1
z
z
z z
z z
z 1
z 0
z z
NurulHazlina/BEE2243/Logic
NurulHazlina/BEE2243/Logic
0
0 0 1 1 1 1
0
1 1 0 0 1 1
1
0 1 0 1 0 1
1
1 0 0 1
x 1 0
1 z
z 0
Cont : Example2
xy 00 0 w 1 01 11 10 xy
00
0 w 1
01
11
10
z 0
1 z
xy
1 1
0 0
1 0
1 z
xy 01
1 1
0 0
00
01
11
10
00
11
10
0
w 1
z 0
1 1
1 1
0 0
w
0
1
1 --
1 1
1 1
0 0
NurulHazlina/BEE2243/Logic
z 0 1
z
z
z
0 1
Cont : Example3
xy xy
00
0 w 1
01
11
10
00
0 w 1
01
11
10
z z
0 z
z 1
1 0
1 1
0 z
1 1
1 0
xy 00 0 w 1 01 11 10 00 0 w 1 01
xy 11 10
z z
0 1
z 1
1 0
1 1
-1
1 1
1 0
NurulHazlina/BEE2243/Logic
Minimal SOP
z z z z 1 z
Minimal POS
z
0
0
0
y
1
x
1
1 z
z 0
1
z
0
z
-0
0
0
NurulHazlina/BEE2243/Logic
Single-variable map entries for incompletely specified (i.e having dont-cares) Boolean functions
NurulHazlina/BEE2243/Logic
Step 1: Form an optimal collections of subcubes involving the single literal; z or z,using the cells containing 1s, Xs and double entries with 1 constant as dontcare cells. Double entries with 0 constant part can be used as dontcares for subcubes that agree with the literal part of the double entry.
NurulHazlina/BEE2243/Logic
STEP2:
Replace the single literal entries; z and z, by 0. Retain the single 0 and Xs entries Replace each single 1 entry by a dont care if it was covered in step 1. Otherwise, retain the single entry. Replace the double entries having having a 0 constant by 0. Replace each double entries with 1 constant by a X if the cell was used in step 1 to form at least one subcube agreeing with the literal parts; otherwise replace the double entry having a constant 1 by a 1.
NurulHazlina/BEE2243/Logic
Examples
1.
Obtaining a minimal sum for the incompletely specified Boolean funciton f(w,x,y,z) = m(3,5,6,7,8,9,10) + dc(4,11,12,14,15) using a variable-entered map. (a) Truth table. (b) Variable-entered map. (c) Step 1 map and subcubes. (d) Step 2 map and subcubes. Obtaining a minimal sum for the incompletely specified Boolean function f(w,x,y,z) = m(0,4,5,6,13,14,15) + dc(2,7,8,9) using a variable-entered map. (a) Truth table. (b) Step 1 map and subcubes. (c) Step 2 map and subcubes. Obtaining a minimal product for the incompletely specified Boolean function f(w,x,y,z) = m(0,4,5,6,13,14,15) + dc(2,7,8,9) using a variable-entered map. (a) Step 1 map and subcubes. (b) Step 2 map and subcubes.
2.
3.
NurulHazlina/BEE2243/Logic
x 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1
y 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1
z 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
f 0
Map entry
Answers
Question 1 Obtaining a minimal sum for the incompletely specified Boolean funciton f(w,x,y,z) = m(3,5,6,7,8,9,10) + dc(4,11,12,14,15) using a variableentered map. (a) Truth table. (b) Variable-entered map. (c) Step 1 map and subcubes. (d) Step 2 map and subcubes.
0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
Answers
xy w 0 1 00 0 1 01 z z,1 xy 11 1 10 z,1 z,0 w 0 1 xy
00 0
1
01 0
1
11 1
-
10 1
0
w 0
1
00 0 1
01 z z,1
11 1 -
NurulHazlina/BEE2243/Logic
x 0 0 0 0 1 1 1 1 0
y 0 0 1 1 0 0 1 1 0
z 0 1 0 1 0 1 0 1 0
f 1
Map entry
Answers
Question 2 Obtaining a minimal sum for the incompletely specified Boolean function f(w,x,y,z) = m(0,4,5,6,13,14,15) + dc(2,7,8,9) using a variable-entered map. (a) Truth table. (b) Step 1 map and subcubes. (c) Step 2 map and subcubes.
0 0 0 0 0 0 0 0 1
z 0 z,0 0 1 1 1 1 z,1 -
1
1 1 1 1 1 1
0
0 0 1 1 1 1
0
1 1 0 0 1 1
1
0 1 0 1 0 1
0 0 0 0 z 1 1 1 1
Answers
xy
xy 10 1 z
w 0
1
00 z -
01 z,0 0
11 z,1 1
w 0
1
00 0 -
01 0 0
11 1
10 0
NurulHazlina/BEE2243/Logic
Obtaining a minimal product for the incompletely specified Boolean function f(w,x,y,z) = m(0,4,5,6,13,14,15) + dc(2,7,8,9) using a variable-entered map. (a) Step 1 map and subcubes. (b) Step 2 map and subcubes.
NurulHazlina/BEE2243/Logic
y
x
00 w 0 0 1 y
00 w 0 0 1 0
01 0 1
xy
xy 11 z 0 10 0 0
w 0
1
00 y 0
01 1 y
w 0
1
00 y 0
01
z+z y+y
11 z 0
10 0 0
NurulHazlina/BEE2243/Logic
Maps having sum terms as entries. (a) Variableentered map. (b) Grouping the y literal. (c) Grouping the z literal. (d) Grouping the not completely covered 1-cell.
NurulHazlina/BEE2243/Logic
Maps having product terms as entries. (a) Variable-entered map. (b) Grouping the yz term. (c) Grouping the y literal.(d) Grouping the not completely covered 1-cell.
NurulHazlina/BEE2243/Logic