EEE 241 - Lecture 09 & 10
EEE 241 - Lecture 09 & 10
• Goal:
• To obtain simplest implementation for given function
• What is a simplest expression?
• Minimum number of terms and with the smallest possible number
of literals in each term
• Expression produces a circuit diagram with a minimum number of
gates and the minimum number of inputs to each gate
• Simplest expression may not be unique! (To be explained later)
• Optimization is a more formal approach to simplification that
is performed:
• Manually
• Using a specific procedure/algorithm
Gate-level Optimization
• Manual Methods:
• Based on Boolean algebra
• Graphical method based on K-map
• Boolean function
• Sum of minterms
• Sum of products (or product of sum) in the simplest form
• A minimum number of terms
• A minimum number of literals
• The simplified expression may not be unique
The Map Method
• Steps:
• From expression, draw the required no. of boxes
• (If not already) Express function in sum of minterms
• Input the function → K-map (insert ‘1’ as appropriate)
• Group adjacent squares containing ‘1’ (2,4,8,…)
• Write same/common variables (or their compliments)
• Simply add them
K-Map Rules
• No zeros allowed.
• No diagonals.
• Only power of 2 number of cells in each group.
• Groups should be as large as possible.
• Each cell containing a ’one’ must be in at least one group.
• Overlapping allowed.
• Wrap around allowed.
• Fewest number of groups possible.
Two-Variable Map
• A two-variable map
• Four minterms
• x' = row 0; x = row 1
• y' = column 0; y = column
1
• A truth table in square
diagram
Figure 3.1 Two-variable Map
• Fig. 3.2(a): xy = m3
• Fig. 3.2(b): x'y+xy' +xy =
m1+m2+m3 = x+y
• Note: Adjacent squares
horizontally and vertically,
NOT diagonally
• A three-variable map
• Eight minterms
• The Gray code sequence
• Any two adjacent squares in the map differ by only on variable
• Primed in one square and unprimed in the other
x y z Minterm F
0 0 0 0 m0 x y z 0
1 0 0 1 m1 x y z 0
2 0 1 0 m2 x y z 1
3 0 1 1 m3 x y z 1
4 1 0 0 m4 x y z 1
5 1 0 1 m5 x y z 1
6 1 1 0 m6 x y z 0
7 1 1 1 m7 x y z 0
A Three-variable Map
yz Top Cell
x 00 01 11 10
0 1 0 0 1
Bottom Cell
Example 3.1
Y
yz
x 00 01 11 10
0 0 0 1 1 X’ Y
1 1 1 0 0 X Y’
Y’
F xy xy
Example 3.2
Figure 3.6 Map for Example 3-3, F(x, y, z) = Σ(0, 2, 4, 5, 6) = z' +xy'
Example 3.4
Figure 3.7 Map for Example 3.4, A'C + A'B + AB'C + BC = C + A'B
Four-Variable Map
• 16 minterms
• Combinations of 2, 4, 8, and 16 adjacent squares
• One square represents one minterm, giving a term with four
literals.
• Two adjacent squares represent a term with three literals.
• Four adjacent squares represent a term with two literals.
• Eight adjacent squares represent a term with one literal.
• Sixteen adjacent squares produce a function that is always
equal to 1.
Four-Variable Map
w x y z Minterm
0 0 0 0 0 m0 wxyz
1 0 0 0 1 m1 wxyz
2 0 0 1 0 m2 wx yz
3 0 0 1 1 m3 wx yz
4 0 1 0 0 m4 wxyz
5 0 1 0 1 m5 wxyz
6 0 1 1 0 m6 wxyz
7 0 1 1 1 m7 wxyz
8 1 0 0 0 m8 wx y z
9 1 0 0 1 m9 wx y z
10 1 0 1 0 m10 wx y z
11 1 0 1 1 m11 wx y z
12 1 1 0 0 m12 wx y z
13 1 1 0 1 m13 wx y z
14 1 1 1 0 m14 wx y z
15 1 1 1 1 m15 wx y z
Example 3.5
F = y'+w'z'+xz'
Figure 3.9 Map for Example 3-5; F(w, x, y, z) = Σ(0, 1, 2, 4, 5, 6, 8, 9, 12, 13, 14) = y' + w' z' +xz'
Example 3.6
Figure 3.9 Map for Example 3-6; ABC + BCD + ABCD + ABC= BD + BC
+ACD