Chapter 3
Chapter 3
Minimization
◼ A Karnaugh map is a graphical method used to
obtained the most simplified form of an expression
in a standard form (Sum-of-Products or Product-of-
Sums
◼ The map is made up of squares, with each square
representing one minterm of the function.
◼ This produces a circuit diagram with a minimum
number of gates and the minimum number of
inputs to the gate.
◼ It is sometimes possible to find two or more
expressions that satisfy the minimization criteria. 1
What are Karnaugh1 maps?
◼ Karnaugh maps provide an alternative way of
simplifying logic circuits.
◼ Instead of using Boolean algebra simplification
techniques, you can transfer logic values from a
Boolean statement or a truth table into a Karnaugh
map.
◼ The arrangement of 0's and 1's within the map
helps you to visualise the logic relationships
between the variables and leads directly to a
simplified Boolean statement.
Cell = 23=8
AB
C 00 01 11 10
0 1 3 2
0
A B C A BC ABC AB C
4 5 7 6
1 A B C A BC ABC AB C
Karnaugh maps
◼ 4 variables Karnaugh map
AB
CD 00 01 11 10
0 1 3 2
00
4 5 7 6
01
12 13 15 14
11
8 9 11 10
10
Five-variable map
◼ Fig.3-12, the left-hand four-variable map represents the 16 squares
where A=0, and the other four-variable map represents the squares
where A=1.
◼ In addition, each square in the A=0 map is adjacent to the
corresponding square in the A=1 map.
6
Karnaugh maps
◼ The Karnaugh map is completed by entering a
'1‘(or ‘0’) in each of the appropriate cells.
◼ Within the map, adjacent cells containing 1's (or
0’s) are grouped together in twos, fours, or
eights.
Example: Groupings on 3-Variable K-Maps
A 0 1 F(A,B,C) = A’B’
BC
00 1 0
011 0
BC 0 1
110 0
00 1 1
10 0 0 01 0 0
11 0 0 F(A,B,C) = C’
A 0 1
BC 10 1 1
00 1 1 Remember that
01 1 1 top and bottom
11 0 0 F(A,B,C) = B’ of map are
adjacent
10 0 0
8
A
Example: Multiple Groupings
0 1
BC Want to cover all ‘1’s with
00 1 0
largest possible
011 1 groupings.
110 0
F(A,B,C) = B’C + A’B’
10 0 0
A
0 1
BC Groupings of only a single ‘1’
00 0 1 are ok if larger groupings
01 0 0 cannot be found.
11 1 0 F(A,B,C) = AB’C’ + A’B
10 1 0
9
A 0 Illegal Groupings
1
BC
00 1 0
01 0 Illegal Grouping!
1 Minterms are not boolean
11 0 0 adjacent!
A’B’C’ , AB’C will NOT reduce
10 0 0
to a single product term
A’B’C’ + AB’C = B’(A’C’+AC)
10
Example: Groupings on four Variable Map
AB
CD 00 01 11 10
00 0 0 0 0
01 0 0 0 0
11 1 0 1 0
10 1 1 0 1
11
Example: Groupings on four Variable Map
AB
CD 00 01 11 10
00 1 0 0 1
01 1 0 0 1
11 1 0 0 1
10 1 0 0 1
F (A,B,C,D) = B’
12
More than one way to group…..
AB
F (A,B,C,D) = B’D + C’D’ +
CD 00 01 11 10
00 1 1 1 1 CD’
01 1 0 0 1
11 1 0 0 1
10 1 1 1 1
Want LARGEST groupings
that can cover ‘1’s.
AB
CD 00 01 11 10
00 1 1 1 1 F (A,B,C,D) = B’ + D’
01 1 0 0 1
11 1 0 0 1
10 1 1 1 1
13
Two Solutions
AB EACH solution is equally
CD 00 01 11 10 valid.
00 1 1 0 0 F(A,B,C,D) = A’C’ + ACD +
01 1 A’BD
1 0 0
11 0 Essential
1 1 1
PIs
10 0 0 0 0 Non-
Essential
AB PIs
CD 00 01 11 10
00 1 1 0 0
01 1 1 0 0 F(A,B,C,D) = A’C’ + ACD +
11 0 1 1 1 BCD
10 0 0 0 0
14
Don't Care Conditions
◼ There may be a combination of input values which
◼ will never occur
◼ if they do occur, the output is of no concern.
◼ The function value for such combinations is called a
don't care.
◼ They are denoted with x or –. Each x may be
arbitrarily assigned the value 0 or 1 in an
implementation.
◼ Don’t cares can be used to further simplify a
function
17
Example: Minimizing ‘0’s
Grouping ‘0’s produces an
0 1 equation for F’.
BC
00 1 1
01 0 0 F(A,B,C) = C’
11 0 0
10 1 1 F’(A,B,C) = C
18
Example
Ex. 3-3 F(x, y, z) = ∑(0, 2, 4, 5, 6)
F = z’ + xy’
19
Exercise
f = (0,4) = B C f = (4,5) = A B f = (0,1,4,5) = B f = (0,1,2,3) = A
BC BC BC BC
A 00 01 11 10 A 00 01 11 10 A 00 01 11 10 A 00 01 11 10
0 1 0 0 0 0 0 0 0 0 0 1 1 0 0 0 1 1 1 1
1 1 0 0 0 1 1 1 0 0 1 1 1 0 0 1 0 0 0 0
BC BC BC BC
A 00 01 11 10 A 00 01 11 10 A 00 01 11 10 A 00 01 11 10
0 0 1 1 0 0 0 0 0 0 0 1 0 0 1 0 1 0 0 1
1 0 0 0 0 1 1 0 0 1 1 0 0 0 0 1 1 0 0 1
20
Example
Ex. 3-6 F = A’B’C’ + B’CD’ + A’BCD’ + AB’C’
= B’D’ + B’C’ + A’CD’
21
Exercise
CD CD CD CD
00 01 11 10 00 01 11 10 00 01 11 10 00 01 11 10
AB AB AB AB
00 1 0 0 0 00 0 0 0 0 00 0 0 0 0 00 0 0 0 0
01 0 0 0 0 01 0 1 0 0 01 0 0 0 0 01 1 0 0 1
11 0 0 0 0 11 0 1 0 0 11 0 1 1 0 11 0 0 0 0
10 1 0 0 0 10 0 0 0 0 10 0 0 0 0 10 0 0 0 0
CD CD CD CD
00 01 11 10 00 01 11 10 00 01 11 10 00 01 11 10
AB AB AB AB
00 0 0 1 1 00 0 0 0 0 00 0 0 1 1 00 1 0 0 1
01 0 0 1 1 01 1 0 0 1 01 0 0 0 0 01 0 0 0 0
11 0 0 0 0 11 1 0 0 1 11 0 0 0 0 11 0 0 0 0
10 0 0 0 0 10 0 0 0 0 10 0 0 1 1 10 1 0 0 1
22
Exercise
CD CD CD CD
AB 00 01 11 10 AB 00 01 11 10 AB 00 01 11 10 AB 00 01 11 10
00 0 0 0 0 00 0 0 1 0 00 1 0 1 0 00 0 1 0 1
01 1 1 1 1 01 0 0 1 0 01 0 1 0 1 01 1 0 1 0
11 0 0 0 0 11 0 0 1 0 11 1 0 1 0 11 0 1 0 1
10 0 0 0 0 10 0 0 1 0 10 0 1 0 1 10 1 0 1 0
CD CD CD CD
00 01 11 10 00 01 11 10 00 01 11 10 00 01 11 10
AB AB AB AB
00 0 1 1 0 00 1 0 0 1 00 0 0 0 0 00 1 1 1 1
01 0 1 1 0 01 1 0 0 1 01 1 1 1 1 01 0 0 0 0
11 0 1 1 0 11 1 0 0 1 11 1 1 1 1 11 0 0 0 0
10 0 1 1 0 10 1 0 0 1 10 0 0 0 0 10 1 1 1 1
23
Example
Ex. 3-7 F(A, B, C, D, E) = (0, 2, 4, 6, 9, 13, 21, 23, 25, 29, 31)
Because of both parts of the map have the common term (A’BD’E+ABD’E)
so the sum of products is
F = A’B’E’ + BD’E + ACE
common
24
3-5. Don’t care conditions
Ex.3-9 Simplify the F (w, x, y, z)= ∑(1, 3, 7, 11, 15) with
don’t-care conditions d(w, x, y, z) = ∑(0, 2, 5)
In part (a) with minterms 0 and 2→ F = yz + w’x’
In part (b) with minterm 5 → F = yz + w’z
25
Example Don’t care cd
ab 00 01 11 10
00 0 1 0 1
01 1 1 0 1
28
Example
(a) SOPs
(b) POSs
F’= AB + CD + BD’
By DeMorgan’s thm
F= (A’+B’) .(C’+D’)
.(B’+D)
29
Example: Group 0’s, then Complement to
get POS
AB
CD 00 01 11 10
F’(A,B,C,D) = C’ + BD
00 0 0 X 0
01 0 0 X 0 Take inverse of both sides
11 1 F(A,B,C,D) = (C’ + BD)’
0 X X
= C (BD)’
10 1 1 X X = C (B’+D’)
30
Exchange minterm and maxterm
◼ Consider the truth table
that defines the function F
in Table 3-2.
Sum of minterms
F(x, y, z) = ∑(1, 3, 4, 6)
Product of maxterms
F(x, y, z) = ∏(0, 2, 5, 7)
◼ In the other words, the 1’s
31
Practice 1:Combinational circuit Design
◼ Example: Design a 3-input (A,B,C) digital
circuit that will give at its output (X) a logic 1
only if the binary number formed at the
input has more ones than zeros.
32
Inputs Output
A B C X X = (3, 5, 6, 7)
0 0 0 0 0
1 0 0 1 0 X
BC
2 0 1 0 0 A 00 01 11 10
3 0 1 1 1 0 0 0 1 0
4 1 0 0 0 1 0 1 1 1
5 1 0 1 1
6 1 1 0 1
7 1 1 1 1 X = AC + AB + BC
A B C
33
Practice 2:Combinational circuit Design
◼ Example: Design a 4-input (A,B,C,D) digital circuit that will give at its
output (X) a logic 1 only if the binary number formed at the input is
between 2 and 9 (including).
34
Inputs Output
A B C D X X = (2,3,4,5,6 ,7,8,9)
0 0 0 0 0 0
1 0 0 0 1 0 X
2 0 0 1 0 1 CD
3 0 0 1 1 1 AB 00 01 11 10
4 0 1 0 0 1 00 0 0 1 1 Same
5 0 1 0 1 1
01 1 1 1 1
6 0 1 1 0 1
7 0 1 1 1 1 11 0 0 0 0
8 1 0 0 0 1 10 1 1 0 0
9 1 0 0 1 1
10 1 0 1 0 0
11 1 0 1 1 0
12 1 1 0 0 0 X = AC + AB + A B C
13 1 1 0 1 0
14 1 1 1 0 0
15 1 1 1 1 0 A B C D X
35
Exercise
◼ Design logic circuit that convert a 4-bits binary code to Excess-3 code
A B C D W X Y Z
0 0 0 0 0 0 1 1
0 0 0 1 0 1 0 0
0 0 1 0 0 1 0 1
0 0 1 1 0 1 1 0
0 1 0 0 0 1 1 1
0 1 0 1 1 0 0 0
0 1 1 0 1 0 0 1
0 1 1 1 1 0 1 0
1 0 0 0 1 0 1 1
1 0 0 1 1 1 0 0
1 0 1 0 x x x x
1 0 1 1 x x x x
1 1 0 0 x x x x
1 1 0 1 x x x x
1 1 1 0 x X X X
1 1 1 1 X X x x