Vous êtes sur la page 1sur 28

Karnaugh Mapping

Digital Electronics

Karnaugh Mapping or K-Mapping


This presentation will demonstrate how to
Create and label two, three, & four variable K-Maps.
Use the K-Mapping technique to simplify logic designs with two, three, and four variables.

Use the K-Mapping technique to simplify logic design containing dont care conditions.

Boolean Algebra Simplification K-Mapping Simplification


2

Karnaugh Map Technique


K-Maps are a graphical technique used to simplify a logic equation. K-Maps are procedural and much cleaner than Boolean simplification. K-Maps can be used for any number of input variables, BUT are only practical for two, three, and four variables.

K-Map Format
Each minterm in a truth table corresponds to a cell in the K-Map. K-Map cells are labeled such that both horizontal and vertical movement differ only by one variable.

Since the adjacent cells differ by only one variable, they can be grouped to create simpler terms in the sum-ofproducts expression.
The sum-of-products expression for the logic function can be obtained by OR-ing together the cells or group of cells that contain 1s.

Adjacent Cells = Simplification


V
X
W
X

1 1

0 0

WX W X

W XW XV W W X X
X
W
W

0
5

Truth Table to K-Map Mapping


Two Variable K-Map

V W X FWX
X
W
W

X
1

Minterm 0
Minterm 1 Minterm 2 Minterm 3

0
0 1 1

0
1 0 1

1
0 1 0

10 0 12 0

Two Variable K-Map Groupings


Groups of One 4

B
A

1 0

1 0

AB
AB

0 1

0 1

AB
AB

Two Variable K-Map Groupings


Groups of Two 4

V
B
A
B

1 0 1 0

1 0 1 0

A
A

Two Variable K-Map Groupings


Group of Four 1

B
A
A

K-Map Simplification Process


1. 2.

3.
4. 5. 6. 7.

Construct a label for the K-Map. Place 1s in cells corresponding to the 1s in the truth table. Place 0s in the other cells. Identify and group all isolated 1s. Isolated 1s are ones that cannot be grouped with any other one, or can only be grouped with one other adjacent one. Group any hex. Group any octet, even if it contains some 1s already grouped but not enclosed in a hex. Group any quad, even if it contains some 1s already grouped but not enclosed in a hex or octet. Group any pair, even if it contains some 1s already grouped but not enclosed in a hex, octet, or quad. OR together all terms to generate the SOP equation. 10

Example #1: 2 Variable K-Map


Example: After labeling and transferring the truth table data into the K-Map, write the simplified sum-of-products (SOP) logic expression for the logic function F1.

V J 0 0 K 0 1 F1 1 1

1
1

0
1

0
0

11

Example #1: 2 Variable K-Map


Example: After labeling and transferring the truth table data into the K-Map, write the simplified sum-of-products (SOP) logic expression for the logic function F1. Solution:
V J 0 0 K 0 1 F1 1 1
J

1 0

1 0

1
1

0
1

0
0

F1 J

12

Truth Table to K-Map Mapping


Three Variable K-Map

W Minterm 0 Minterm 1 Minterm 2 Minterm 3 Minterm 4 Minterm 5 Minterm 6 Minterm 7 0 0 0 0 1 1 1 1

X 0 0 1 1 0 0 1 1

Y 0 1 0 1 0 1 0 1

FWXY 1 0 0 0 0 1 1 0
WX WX WX

V Y
0

1 0 1 0

01 03 07 15
13
Only one variable changes for every row change

WX

Three Variable K-Map Groupings


Groups of One 8 (not shown) Groups of Two 12 AC AC
C
AB

VC 0 1 0 1 1 0

0 1 1 0 1 1 0 1 0

AB AB
AB

AB
AB

AB

1 0

AB

BC BC AC AC BC BC

14

Three Variable K-Map Groupings


Groups of Four 6

B
C
AB

VC 1 0 1 1 0 1 1 0 1 1 1 0

1 0 1 1 1 1 0 1 1 1 0 1 1 0

AB
AB

A
B
A

AB

15

Three Variable K-Map Groupings


Group of Eight - 1

C
AB

VC 1 1

1 1

AB
AB

1
1

1
1

AB

1
16

Example #2: 3 Variable K-Map


Example: After labeling and transferring the truth table data into the K-Map, write the simplified sum-of-products (SOP) logic expression for the logic function F2.
E F G F2

0
0 0 0 1 1 1 1

0
0 1 1 0 0 1 1

0
1 0 1 0 1 0 1

0
1 1 0 0 1 1 0
17

Example #2: 3 Variable K-Map


Example: After labeling and transferring the truth table data into the K-Map, write the simplified sum-of-products (SOP) logic expression for the logic function F2. FG G VG Solution: E F G F2
0
0 0 0 1 1 1 1

0
0 1 1 0 0 1 1

0
1 0 1 0 1 0 1

0
1 1 0 0 1 1 0

EF EF

0 1 1 0

1 0 0 1

FG

EF

EF

F2 F G F G

18

Truth Table to K-Map Mapping


Four Variable K-Map
W
Minterm 0 Minterm 1 Minterm 2 Minterm 3 Minterm 4 Minterm 5 Minterm 6 Minterm 7 Minterm 8 Minterm 9 Minterm 10 Minterm 11 0 0 0 0 0 0 0 0 1 1 1 1

X
0 0 0 0 1 1 1 1 0 0 0 0

Y
0 0 1 1 0 0 1 1 0 0 1 1

Z
0 1 0 1 0 1 0 1 0 1 0 1

FWXYZ
0 1 1 0 1 1 0 1 0 0 1 0

Only one variable changes for every column change

YZ

V YZ

YZ

YZ

WX
WX
WX

00 14 112 0
8

11 15 013 0
9

03 17 1 15 0
11

12 06 114 1
10

Only one variable changes for every row change

Minterm 12
Minterm 13 Minterm 14 Minterm 15

1
1 1 1

1
1 1 1

0
0 1 1

0
1 0 1

1
0 1 1

WX

19

Four Variable K-Map Groupings


Groups of One 16 (not shown) Groups of Two 32 (not shown) Groups of Four 24 (seven shown)
V B C BD B C CD CD CD CD
AB AB

AD
BD

1 0 1 1 0
1 0 1 1 0

1 0
0 0 1 1 0

1 0
0 0 1 0

0 1
0 1

AD
AB
AB

0 1 1 0

BD
20

Four Variable K-Map Groupings


Groups of Eight 8 (two shown)

V CD CD
AB AB

B
CD

CD

1 1 0 1 0 0 1 0 1 1

1 0 0 0 0 1

1 0
0 0 0 1

1 1 0 1 0 1 0 0 1
21

AB
AB

Four Variable K-Map Groupings


Group of Sixteen 1

V CD CD
AB AB

CD

CD

1
1 1 1

1
1 1 1

1
1 1 1

1
1 1 1

AB
AB

22

Example #3: 4 Variable K-Map


Example: After labeling and transferring the truth table data into the K-Map, write the simplified sum-of-products (SOP) logic expression for the logic function F3. V
R
0 0

S
0 0

T
0 0

U
0 1

F3
0 1

0
0 0 0 0 0 1 1 1 1 1 1 1 1

0
0 1 1 1 1 0 0 0 0 1 1 1 1

1
1 0 0 1 1 0 0 1 1 0 0 1 1

0
1 0 1 0 1 0 1 0 1 0 1 0 1

0
1 0 1 1 1 0 1 0 0 1 0 1 1

23

Example #3 : 4 Variable K-Map


Example: After labeling and transferring the truth-table data into the K-Map, write the simplified sum-of-products (SOP) logic expression for the logic function F3. RU V Solution: R S T U F3 TU TU TU TU
0 0 0 0 0 0 0 1 0 1

0
0 0 0 0 0 1 1 1 1 1 1 1 1

0
0 1 1 1 1 0 0 0 0 1 1 1 1

1
1 0 0 1 1 0 0 1 1 0 0 1 1

0
1 0 1 0 1 0 1 0 1 0 1 0 1

0
1 0 1 1 1 0 1 0 0 1 0 1 1

RS RS
RS

0
0 1 0

1
1 0 1

1
1 1 0

0
1

ST
1

RSU
RS

STU

F3 R S U S T U R U S T

24

Dont Care Conditions


A dont care condition, marked by (X) in the truth table, indicates a condition where the design doesnt care if the output is a (0) or a (1). A dont care condition can be treated as a (0) or a (1) in a K-Map. Treating a dont care as a (0) means that you do not need to group it.

Treating a dont care as a (1) allows you to make a grouping larger, resulting in a simpler term in the SOP equation.
25

Some You Group, Some You Dont


C
AB

VC 0

This dont care condition was treated as a (1). This allowed the grouping of a single one to become a grouping of two, resulting in a simpler term.

AC

AB
AB

1
0 X

0
0 0

AB

There was no advantage in treating this dont care condition as a (1), thus it was treated as a (0) and not grouped.
26

Example #4: Dont Care Conditions


Example: After labeling and transferring the truth table data into the K-Map, write the simplified sum-of-products (SOP) logic expression for the logic function F4. Be sure to take advantage of the dont care conditions. V
R
0 0

S
0 0

T
0 0

U
0 1

F4
X 0

0
0 0 0 0 0 1 1 1 1 1 1 1 1

0
0 1 1 1 1 0 0 0 0 1 1 1 1

1
1 0 0 1 1 0 0 1 1 0 0 1 1

0
1 0 1 0 1 0 1 0 1 0 1 0 1

1
X 0 X X 1 1 1 1 X X 0 0 0

27

Example #4: Dont Care Conditions


Example: After labeling and transferring the truth table data into the K-Map, write the simplified sum-of-products (SOP) logic expression for the logic function F4. Be sure to take advantage of the dont care conditions. RT V Solution: R S T U F4 TU TU TU TU
0 0 0 0 0 0 0 1 X 0

0
0 0 0 0 0 1 1 1 1 1 1 1 1

0
0 1 1 1 1 0 0 0 0 1 1 1 1

1
1 0 0 1 1 0 0 1 1 0 0 1 1

0
1 0 1 0 1 0 1 0 1 0 1 0 1

1
X 0 X X 1 1 1 1 X X 0 0 0

RS RS
RS

X
0 X 1

0
X 0 1

X
1 0 X

1
X 0 1

RS

RS

F4 R T R S

28

Vous aimerez peut-être aussi