# Lecture 2 Karnaugh Maps by htt39969

VIEWS: 0 PAGES: 16

• pg 1
```									Lecture 2: Karnaugh Maps

Soon Tee Teoh
CS 147
Karnaugh Maps
• K-Maps are used to simplify Boolean
expressions
• From truth table to K-map:

y
X    Y     F                                0       1
x
0    0     1
0
1       0
0    1     0
1    0     1                    1       1       0
1    1     0
Simplifying Expression
• Find blocks (rectangles) of 1s in K-map

This column represents Y=0

y                   F=   x’y’ + xy’     =   y’
0       1
x

0
1       0
From truth table   From K-map
1       1       0
3-Variable K-map
• K-map with 3 variables
yz
x         00      01      11       10

0

1

Exercise: (1) Draw the block for x’y, (2) Draw the block y,
(3) Draw the block z’

Exercise: Draw the K-map for the expression f = x’yz’ + xy’z’ +xy’z
3-Variable K-map

x   y   z   f
0   0   0   1
yz
0   0   1   1   x            00     01    11   10

0   1   0   0       0    1         1      1    0
0   1   1   1       1    1         1      1    0
1   0   0   1
1   0   1   1
F = Y’ + Z
1   1   0   0
1   1   1   1
4-variable K-map
yz
00       01       11       10
wx

0        1        0        0
00

01
1        1        0        1

11        1        1        0        1

10        0        1        0        0
4-variable K-map
yz
00       01       11       10
wx

1        1        0        0
00

01
1        1        0        0

11        1        1        0        0

10        1        1        0        0
Implicants
• Any single or group of 1s that can be
combined is called an implicant.
• An implicant that cannot be combined with
another implicant to eliminate a variable is
called a prime implicant.
• A prime implicant which contains one or
more 1s that are not contained in another
prime implicant is called an essential
prime implicant.
See text (pg. 59) for more formal definitions.
Example
yz
00        01       11       10
wx

0         1        1        0
00

01
1         1        1        0

11        1         0        1        1

10        0         0        1        1
Example
yz
00        01       11       10
wx

0         1        1        0
00

01
1         1        1        0

11        1         0        1        1

10        0         0        1        1
Example
yz
00          01          11            10
wx

0           1           1             0
00

01
1           1           1             0

11        1           0           1             1

10        0           0           1             1

Is this a prime implicant?
Example
yz
00        01         11          10
wx

0         1          1           0
00

01
1         1          1           0

11        1         0          1           1

10        0         0          1           1

There is a prime implicant missing: wxz’
Example
yz
00        01         11         10
wx

0         1          1          0
00

01
1         1          1          0

11        1         0          1          1

10        0         0          1          1

These two prime implicants are essential
Strategy
• Include all essential prime implicants.
• Then add other prime implicants until all
1s are covered.
Don’t Care States

yz
00       01       11       10
wx
• For particular
0        0        x        0
input, we don’t   00
care if output
is 1 or 0         01
1        1        0        0
• Can be used
to your           11        x        1        1        1
10        0        0        1        1
Don’t Care States

yz
00       01       11       10
wx

0        0        x        0
00

F = XY’ + WY        01
1        1        0        0

11       x        1        1        1

10       0        0        1        1

```
To top