Вы находитесь на странице: 1из 29

EE210: Switching Systems

Lecture 7: Karnaugh Map, Dont Cares

Prof. YingLi Tian


Oct. 2, 2017
Department of Electrical Engineering
The City College of New York
The City University of New York (CUNY)

1
The Karnaugh Map (K-map)
K-map is a graphical approach to finding
minimum SOP expressions (prime
implicants) for function simplification.
K-map is very useful for small design
problems of 3-4 variables (up to 6
variables)
Solutions for Problems of more that 6
variables can be found in Chapter 4, we
will NOT cover them in this course.
2
Implicant
An implicant is a rectangle of 1, 2, 4, 8, . . . (any power of 2)
1s. That rectangle may not include any 0s.
Implicant -- 2

The implicants of F are


Minterms Groups of 2 Groups of 4
ABCD ACD CD
ABCD BCD
ABCD ACD
ABCD BCD
ABCD ABC
ABCD ABD
ABCD
Prime Implicant
A prime implicant is an implicant that
(from the point of view of the map) is
not fully contained in any one other
implicant.
An essential prime implicant is a prime
implicant that includes at least one 1
that is not included in any other prime
implicant.

prime implicant, but not essential prime implicant


Basic Rules of Karnaugh maps
Anytime you have N variables, you will have 2N possible
combinations, and 2N places in a truth table or K-Map.
In a Karnaugh Map of any size, crossing a vertical or
horizontal cell boundary is a change of only one variable --
no matter how many variables there are.
Each single cell that contains a 1 represents a minterm in the
function, and each minterm can be thought of as a "product"
term with N variables.
To combine variables, use groups of 2, 4, 8, etc. A group of
2 in an N-variable Karnaugh map will give you a "product"
term with N-1 variables. A group of 4 will have N-2
variables, etc.
You will never have a group of 3, a group of 5, etc.
6
Create K-map from Expressions
f (x, y, z)= xyz + xyz + xyz + xyz + xyz
Create K-map from Expressions
f (x, y, z)= xyz + xyz + xyz + xyz + xyz
Create K-map from Expressions
f (A, B, C, D)= ABCD + ABCD + ABCD +
ABCD + ABCD + ABCD + ABCD + ABCD
+ ABCD + ABCD + ABCD = m(0, 2, 3, 4,7,
8, 9, 10, 11, 13, 14)
Get expression from K-Map Practice 1
Write out the numerical expression of the following K-map

10
Get expression from K-Map Practice 2
Write out the numerical expressions of the following K-maps

11
Finding Minimum SOP Using K-Map

12
K-map to SOP -- Method
1. Find all essential prime implicants. Circle them on the map
and mark the minterm(s) that make them essential with an
asterisk (*). Do this by examining each 1 on the map that
has not already been circled. It is usually quickest to start
with the most isolated 1s, that is, those that have the fewest
adjacent squares with 1s in them.
2. Find enough other prime implicants to cover the function.
Do this using two criteria:
a. Choose a prime implicant that covers as many new 1s
(that is, those not already covered by a chosen prime
implicant). Must be 2, 4, 8, rectangles.
b. Avoid leaving isolated uncovered 1s.

13
K-map to SOP Example 1

minimum all prime implicants

f = yz + wyz + wxz
K-map to SOP Example 2
f = xyz + xyz + xyz + xyz + xyz

x y + x y + x z x y + x y + y z
K-map to SOP Example 3
not used, too many minimum
isolated 1s.

G = ABC + ACD + ABC + ACD


K-map to SOP Example 4

g = xz + wz + wyz + wxy
g = xz + wz + wyz + xyz
g = xz + wz + xyz + wxy
Multiple Solutions of Minimum SOP
If there are multiple solutions, all minimum
solutions must have the same number of
terms and literals.

18
Practice 1:

19
Practice 1 solution 1:

f = acd + bcd + acd + bcd

20
Practice 1 -- solution 2 :

f = abd + abc + abd + abc


21
Practice 2:

22
Practice 2 -- Solution:

F = ACD + ACD + ACD + ACD + BD + AB


F = ACD + ACD + ACD + ACD + BD + BC
F = ACD + ACD + ACD + ACD + AB + BC
23
K-Map with Dont Cares
A prime implicant is a rectangle of 1, 2, 4, 8,
1s or Xs not included in any one larger rectangle. Thus, from
the point of view of finding prime implicants, Xs (dont
cares) are treated as 1s.

An essential prime implicant is a prime implicant


that covers at least one 1 not covered by any other prime
implicant (as always). Dont cares (Xs) do not make
a prime implicant essential.
24
K-Map with Dont Cares

minimum other p.i.s

F = BD + ACD + ABC
Practice 3:

26
Practice 3 -- Solution:

g1 = cd + ab + bd + acd
g2 = cd + ab + bd + abc
g3 = cd + ab + ad + abc
Finding Minimum POS Using K-Map
1. Map the complement of the function. (If there is already a
map for the function, replace all 0s by 1s, all 1s by 0s and
leave Xs unchanged.)
2. Find the minimum sum of products expression for the
complement of the function (using the techniques of the last
two sections).
3. Use DeMorgans theorem (P11) to complement that
expression, producing a product of sums expression.

P11a: (a + b) = a b
P11aa: (a + b + c ) = a b c
Announcement:
HW3 due today.
HW4 is out today, due on 10/11/2017.
Review Chapter 3.2-3.4
Next class (Chapter 3.5-3.6):
Finding POS
Five and Six Variable K-Maps
Multiple Output Problems

29

Вам также может понравиться