Lecture4 DLC
Lecture4 DLC
Karnaugh Maps
Unit 5
Karnaugh Maps
5.1 Minimum Forms of Switching Functions
5.2 Two- and Three- Variable Karnaugh Maps
5.3 Four-Variable Karnaugh Maps
5.4 Determination of Minimum Expressions Using
Essential Prime Implicants
5.5 Five-Variable Karnaugh Maps
2
Introduction
Simplification by using algebraic techniques
The procedures are challenging to apply
systematically.
It is difficult to tell when you have arrived at a
minimum solution.
3
Minimum Forms of Switching Functions (1/4)
SOP expression - Two-level AND-OR gate network
Example:
Sol:
F ( a, b, c ) a ' b' c' a ' b' c a ' bc' ab' c abc' abc
6
Minimum Forms of Switching Functions (4/4)
Example: Find the minimum product-of-sums of
( A BC D)( A BC D)( A BC D)( A BC D )( A BC D )( A BC D )
Sol:
(X+Y)(X+Y’)=X
7
Two- and Three- Variable Karnaugh Maps (1/11)
2-variable Karnaugh maps
Minterm,
m2
Example:
A B F
0 0 1
0 1 1
1 0 0
1 1 0
8
Two- and Three- Variable Karnaugh Maps (2/11)
2-variable Karnaugh maps
Example:
9
Two- and Three- Variable Karnaugh Maps (3/11)
3-variable Karnaugh maps
A B C F
0 0 0 0
0 0 1 0
0 1 0 1
0 1 1 1
1 0 0 1
1 0 1 0
1 1 0 1
1 1 1 0
10
Two- and Three- Variable Karnaugh Maps (4/11)
Adjacent Cells
Two cells whose corresponding minterms differ in
only one variable are said to be adjacent.
11
Two- and Three- Variable Karnaugh Maps (5/11)
If F is given as a minterm (maxterm) expansion, the
map is by placing 1’s(0’s) in the squares that
correspond to the minterm ( maxterm) and then by filling
in the remaining squares with 0’s(1’s).
Example:
F(a,b,c)(1, 3, 5)(0, 2, 4, 6, 7)
12
Two- and Three- Variable Karnaugh Maps (6/11)
Plot Karnaugh map if a function is in algebraic form.
F = b + bc’ + ac’
13
Two- and Three- Variable Karnaugh Maps (7/11)
Plot Karnaugh map if a function is in algebraic form.
Example:
f ( a,b,c )abcbca
14
Two- and Three- Variable Karnaugh Maps (8/11)
Simplify a function using the Karnaugh map
Example:
15
Two- and Three- Variable Karnaugh Maps (9/11)
Simplify a function using the Karnaugh map
Example: Simplify the complement of F m(1,3,5)
Method 1
(By inspection):
1.The loops must
cover all 1’s
2. Consider the
largest loop and
shrink down, ie.
8, 4, 2, 1
16
Two- and Three- Variable Karnaugh Maps (10/11)
The Consensus Theorem
Example:
xy xz yz xy xz
17
Two- and Three- Variable Karnaugh Maps (11/11)
Minimum sum-of-products is NOT unique.
Example:
F m(0,1,2,5,6,7)
18
Four- Variable Karnaugh Maps (1/4)
4-Variable Karnaugh Maps
19
Four- Variable Karnaugh Maps (2/4)
Example: Simplify
f1 m(1,3,4,5,10,12,13) f 2 m(0,2,3,5,6,7,8,10,11,14,15)
20
Four- Variable Karnaugh Maps (3/4)
Simplify a function with don’t care
Example: This is not
f m(1,3,5,7,9)d (6,12,13) useful to form
loop, so leave
it alone.
Helpful to form
a loop with 1’s
Rule:
All the 1’s must be covered, but
the X’s are only used if they will
simplify the resulting expression. This is not
useful to form
loop, so leave
it alone.
21
Four- Variable Karnaugh Maps (4/4)
Find a minimum product-of-sums (POS)
1. Find a minimum sum-of-products for F’
2. Complement F’ using DeMorgan’s Theorem
22
Using Essential Prime Implicants (1/12)
Cover: A switching function f(x1,x2,…,xn) is said to
cover another function g(x1,x2,…,xn), if f assumes the
value 1 whenever g does, i.e. g=1 → f=1.
Implicant: Given a function F of n variables, a
product term P is an implicant of F iff for every
combination of values of the n variables for which P=1, F
is equal to 1. That is, P=1 implies F=1.
g =1 → f= 1, f covers g Examples
f=wx+yz, g=wxy’
g=1 (w=1,x=1,y=0) implies f=1.1+0.z=1, f
If g = product term, g = covers g.
implicant g is a product term, g is an implicant of f.
23
Using Essential Prime Implicants (2/12)
24
Using Essential Prime Implicants (2/12)
Essential Prime Implicant: If a minterm is
covered by only one prime implicant, then that prime
implicant is called an essential prime implicant.
25
Using Essential Prime Implicants (3/12)
On a Karnaugh Map
Any single 1 or any group of 1’s (2k 1’s, k=0,1,2,…)
combined on a map of the function F represents a
product term called an implicant of F.
26
Using Essential Prime Implicants (4/12)
Example:
27
Using Essential Prime Implicants (5/12)
The minimum sum-of-products expression for a function
consists of some (but not necessarily all) of the prime
implicants of a function.
28
Using Essential Prime Implicants (5/12)
29
Using Essential Prime Implicants (6/12)
Example:
30
Using Essential Prime Implicants (7/12)
Example:
31
Using Essential Prime Implicants (8/12)
Procedure to Find a Minimum Sum of Products Using a
Karnaugh Map
1. Choose a minterm (a 1) that has not yet been
covered.
2. Find all 1’s and X’s adjacent to that minterm.
3. If a single term covers the minterm and all of the
adjacent 1’s and X’s, then that term is an EPI, so
select that term.
4. Repeat steps 1,2 and 3 until all EPI have been
chosen.
5. Find a minimum set of prime implicants that cover
the remaining 1s on the map. If there is more than
one such set, choose a set with a minimum number
of literals.
32
Using Essential Prime Implicants (9/12)
Example: Simplify the function
f ( A,B,C ,D )m(0,1,2,4,5,7,11,15).
ABD
f AC ABD ACD
BCD
33
Using Essential Prime Implicants (10/12)
Example: Simplify the function
f ( A,B,C ,D )m( 4,5,6,8,9,10,13)d (0,7,15)
* If a single term
covers the
minterm and all
of the adjacent
1’s and X’s, then
that term is an
essential prime
implicant, so
select that term.
f AB ABD AC D
essential prime implicants
34
Using Essential Prime Implicants (11/12)
Notes on the simplification of a function
Some functions have no essential prime implicants.
All the prime implicant map: A’C’, A’B, BC, AC, AB’, B’C’
F(A, B, C)=A’C’+BC+AB’ or F(A, B, C)=A’B+AC+B’C’
35
Using Essential Prime Implicants (12/12)
Notes on the simplification of a function
To find a minimum sum-of-products expression, all
essential prime implicants must be selected FIRST.
1st Method:
1. The loops
must cover all
1’s
Is BD required?
2. Consider the
largest loop
and shrink
down, ie. 8, 4,
2, 1
36
Example
Derive Boolean equations for a 2-bit multiplier. First, fill
the truth table, then use KM to simplify each output
equation. Finally, further simplify the equations with the
XOR operator (if applicable).
Input Output
A1A0 A1 A0 B1 B0 P3 P2 P1 P0
X B1B0 0 0 0 0
--------------
P3P2P1P0 0 0 0 1
… … … …
37
Example
Design a 2-bit multiplier circuit with two half-adders (HA)
and AND gates.
X Y Sum
0 0 0
0 1 1
1 0 1
38
40
5-Variable Karnaugh Maps (1/3)
1
0
Adjacency in 5 variables of KM
41
5-Variable Karnaugh Maps (1/3)
5-variable Karnaugh Map
42
5-Variable Karnaugh Maps (2/3)
Example : Simplify the function
F( A,B,C,D,E)m(0,1, 4, 5,13,15,20,21,22,23,24,26,28,30,31)
AB 'C
F A'B 'D ' ABE ' ACD A'BCE
B 'CD '
P1 P2 P3 P4
43
5-Variable Karnaugh Maps (3/3)
Example: Simplify the function
F ( A,B,C ,D,E )m(0, 1, 3, 8, 9, 14, 15, 16, 17, 19, 25, 27, 31)
1-9-17-25
C 'D 'E
F B 'C 'D' B 'C 'E A'C 'D ' A'BCD ABDE
AC ' E
P1 P2 P3 P4 P5 17-19-25-27
44
End of Lecture 4
“This lecture material has been produced and published expressly for lecture purposes in
support of a Yonsei University course. This material cannot be used for any other purposes
and cannot be shared with others. Individuals who violate these terms and restriction are
legally responsible for any violation of intellectual property laws.”