Unit 5: Karnaugh Maps · 5.2 Two-Variable Karnaugh Maps Two Variable Karnaugh Map Example: •...

40
Unit 5: Karnaugh Maps EEC180A

Transcript of Unit 5: Karnaugh Maps · 5.2 Two-Variable Karnaugh Maps Two Variable Karnaugh Map Example: •...

Page 1: Unit 5: Karnaugh Maps · 5.2 Two-Variable Karnaugh Maps Two Variable Karnaugh Map Example: • Minterms in adjacent squares on the map can be combined since they differ in only one

Unit 5: Karnaugh Maps

EEC180A

Page 2: Unit 5: Karnaugh Maps · 5.2 Two-Variable Karnaugh Maps Two Variable Karnaugh Map Example: • Minterms in adjacent squares on the map can be combined since they differ in only one

5.1 Minimum Forms of Switching Functions

( ) ( )∑= 7,6,5,2,1,0,, mcbaF

abcabccabbcacbacbaF +++++= '''''''''

Find a minimum sum-of products expression for:

F = a’b’ b’c bc’ ab+ + +

abcabccabbcacbacbaF +++++= '''''''''

None of these terms can be eliminated

However, if we combine in a different way.

F = a’b’ bc’ ac+ +

Note: Use XY’ + XY = X

Page 3: Unit 5: Karnaugh Maps · 5.2 Two-Variable Karnaugh Maps Two Variable Karnaugh Map Example: • Minterms in adjacent squares on the map can be combined since they differ in only one

5.2 Karnaugh Maps

We can represent a 1 and 2-input truth table as 1-D and 2-D cube

XY00011011

F

X F01

Page 4: Unit 5: Karnaugh Maps · 5.2 Two-Variable Karnaugh Maps Two Variable Karnaugh Map Example: • Minterms in adjacent squares on the map can be combined since they differ in only one

XY + XY’ = XX’Y + X’Y’ = X’

X’Y+XY = Y

X’Y’+XY’ = Y’

5.2 Karnaugh Maps

Allows for easy application of XY + XY’ = X

Page 5: Unit 5: Karnaugh Maps · 5.2 Two-Variable Karnaugh Maps Two Variable Karnaugh Map Example: • Minterms in adjacent squares on the map can be combined since they differ in only one

5.2 Two-Variable Karnaugh Maps

A

B

AB

Page 6: Unit 5: Karnaugh Maps · 5.2 Two-Variable Karnaugh Maps Two Variable Karnaugh Map Example: • Minterms in adjacent squares on the map can be combined since they differ in only one

5.2 Two-Variable Karnaugh Maps

Two Variable Karnaugh Map Example:

• Minterms in adjacent squares on the map can be combined sincethey differ in only one variable (i.e. XY’ + XY = X)

Page 7: Unit 5: Karnaugh Maps · 5.2 Two-Variable Karnaugh Maps Two Variable Karnaugh Map Example: • Minterms in adjacent squares on the map can be combined since they differ in only one

5.2 Three-Variable Karnaugh Maps

F

We can represent a 3-input truth table as a 3-D cube

X Y Z

Page 8: Unit 5: Karnaugh Maps · 5.2 Two-Variable Karnaugh Maps Two Variable Karnaugh Map Example: • Minterms in adjacent squares on the map can be combined since they differ in only one

5.2 Three-Variable Karnaugh Maps

Location of Minterms on a Three Variable Karnaugh Map

Page 9: Unit 5: Karnaugh Maps · 5.2 Two-Variable Karnaugh Maps Two Variable Karnaugh Map Example: • Minterms in adjacent squares on the map can be combined since they differ in only one

Truth Table and resulting Karnaugh Map for Three-Variable Function

5.2 Three-Variable Karnaugh Maps

Page 10: Unit 5: Karnaugh Maps · 5.2 Two-Variable Karnaugh Maps Two Variable Karnaugh Map Example: • Minterms in adjacent squares on the map can be combined since they differ in only one

5.2 Three-Variable Karnaugh Maps

Location of Minterms on a Three Variable Karnaugh Map

( ) ( ) ( )∏∑ == 7,6,4,2,05,3,1,, mcbaF

Page 11: Unit 5: Karnaugh Maps · 5.2 Two-Variable Karnaugh Maps Two Variable Karnaugh Map Example: • Minterms in adjacent squares on the map can be combined since they differ in only one

5.2 Three-Variable Karnaugh Maps

''' acbabcF ++=Karnaugh Map for

cb'

'a

Page 12: Unit 5: Karnaugh Maps · 5.2 Two-Variable Karnaugh Maps Two Variable Karnaugh Map Example: • Minterms in adjacent squares on the map can be combined since they differ in only one

5.2 Three-Variable Karnaugh MapsKarnaugh Maps for Product Terms

abc

a

bc

Page 13: Unit 5: Karnaugh Maps · 5.2 Two-Variable Karnaugh Maps Two Variable Karnaugh Map Example: • Minterms in adjacent squares on the map can be combined since they differ in only one

5.2 Three-Variable Karnaugh Maps

Simplification of a Three-Variable Function

( )∑= 5,3,1mF

cbcaF '' +=

Page 14: Unit 5: Karnaugh Maps · 5.2 Two-Variable Karnaugh Maps Two Variable Karnaugh Map Example: • Minterms in adjacent squares on the map can be combined since they differ in only one

5.2 Three-Variable Karnaugh Maps

Simplification of F’ ( )∑= 5,3,1mF

( )∑= 7,6,4,2,0' mF

abcF += ''F’

Page 15: Unit 5: Karnaugh Maps · 5.2 Two-Variable Karnaugh Maps Two Variable Karnaugh Map Example: • Minterms in adjacent squares on the map can be combined since they differ in only one

5.2 Three-Variable Karnaugh Maps

Karnaugh Maps which illustrate the Consensus Theorem

Page 16: Unit 5: Karnaugh Maps · 5.2 Two-Variable Karnaugh Maps Two Variable Karnaugh Map Example: • Minterms in adjacent squares on the map can be combined since they differ in only one

5.2 Three-Variable Karnaugh Maps

Function with Two Minimum Forms

Page 17: Unit 5: Karnaugh Maps · 5.2 Two-Variable Karnaugh Maps Two Variable Karnaugh Map Example: • Minterms in adjacent squares on the map can be combined since they differ in only one

5.3 Four-Variable Karnaugh Maps

Adjacent squares should differ by only one variable

Page 18: Unit 5: Karnaugh Maps · 5.2 Two-Variable Karnaugh Maps Two Variable Karnaugh Map Example: • Minterms in adjacent squares on the map can be combined since they differ in only one

5.3 Four-Variable Karnaugh Maps

Location of Minterms on a Four-Variable Karnaugh Map

Page 19: Unit 5: Karnaugh Maps · 5.2 Two-Variable Karnaugh Maps Two Variable Karnaugh Map Example: • Minterms in adjacent squares on the map can be combined since they differ in only one

5.3 Four-Variable Karnaugh MapsSample 4-variable Karnaugh Map

'' dbaacdF ++=

Page 20: Unit 5: Karnaugh Maps · 5.2 Two-Variable Karnaugh Maps Two Variable Karnaugh Map Example: • Minterms in adjacent squares on the map can be combined since they differ in only one

5.3 Four-Variable Karnaugh MapsSimplification of Four-Variable Functions

( )∑= 13,12,10,5,4,3,1mF

''''' cdabdbabcF ++=

Page 21: Unit 5: Karnaugh Maps · 5.2 Two-Variable Karnaugh Maps Two Variable Karnaugh Map Example: • Minterms in adjacent squares on the map can be combined since they differ in only one

5.3 Four-Variable Karnaugh MapsSimplification of Incompletely Specified Function

( ) ( )∑∑ += 13,12,69,7,5,3,1 dmF

dcdaF '' +=

c’da’d

Page 22: Unit 5: Karnaugh Maps · 5.2 Two-Variable Karnaugh Maps Two Variable Karnaugh Map Example: • Minterms in adjacent squares on the map can be combined since they differ in only one

5.3 Four-Variable Karnaugh MapsFinding Minimum Product of Sums from Karnaugh Maps

yxzywwyzzxF '''''' +++=

F’F

1

0

1

1

1

0

0

0

0

0

1

0

1

0

1

1

wxyz 00 01 11 10

00

01

11

10

0

1

0

0

0

1

1

1

1

1

0

1

0

1

0

0

wxyz 00 01 11 10

00

01

11

10

y’z

wxz’

w’xy

xywwxzzyF '''' ++=Using DeMorgan’s

( )( )( )''''' yxwzxwzyF +++++=

Page 23: Unit 5: Karnaugh Maps · 5.2 Two-Variable Karnaugh Maps Two Variable Karnaugh Map Example: • Minterms in adjacent squares on the map can be combined since they differ in only one

5.4 Determination of Minimum Expressions

Implicant – any single 1 or any group of 1’s which can be combined together on a map of the function F

1

1 1

1

1

1

1

wxyz 00 01 11 10

00

01

11

10

wy’z’

wy’z

wxy’ wx’y’

wy’

w’yz’

w’x’y

List of Implicants – wxy’, wx’y’, wy’z’, wy’z, wy’, w’x’y, w’yz’and all single 1’s

Page 24: Unit 5: Karnaugh Maps · 5.2 Two-Variable Karnaugh Maps Two Variable Karnaugh Map Example: • Minterms in adjacent squares on the map can be combined since they differ in only one

Prime Implicant – an implicant which can not be combinedwith another term to eliminate a variable.

1

1 1

1

1

1

1

wxyz 00 01 11 10

00

01

11

10

1

1 1

1

1

1

1

wxyz 00 01 11 10

00

01

11

10

wy’

w’yz’

w’x’y

List of Prime Implicants: w’x’y, w’yz’, wy’

5.4 Determination of Minimum Expressions

Implicants Prime Implicants

Page 25: Unit 5: Karnaugh Maps · 5.2 Two-Variable Karnaugh Maps Two Variable Karnaugh Map Example: • Minterms in adjacent squares on the map can be combined since they differ in only one

Find the prime implicants:

1

1

1

1

1

1

1

1

1

1

abcd 00 01 11 10

00

01

11

10

5.4 Determination of Minimum Expressions

Page 26: Unit 5: Karnaugh Maps · 5.2 Two-Variable Karnaugh Maps Two Variable Karnaugh Map Example: • Minterms in adjacent squares on the map can be combined since they differ in only one

Find the prime implicants:

1

1

1

1

1

1

1

1

1

1

abcd 00 01 11 10

00

01

11

10

1

1

1

1

1

1

1

1

1

1

abcd 00 01 11 10

00

01

10

11

5.4 Determination of Minimum Expressions

Page 27: Unit 5: Karnaugh Maps · 5.2 Two-Variable Karnaugh Maps Two Variable Karnaugh Map Example: • Minterms in adjacent squares on the map can be combined since they differ in only one

1

1

1

1

1

1

1

1

1

1

abcd 00 01 11 10

00

01

11

10

1

1

1

1

1

1

1

1

1

1

abcd 00 01 11 10

00

01

10

11

5.4 Determination of Minimum Expressions

Minimum Solution might not utilize all prime implicants

Page 28: Unit 5: Karnaugh Maps · 5.2 Two-Variable Karnaugh Maps Two Variable Karnaugh Map Example: • Minterms in adjacent squares on the map can be combined since they differ in only one

1 1

Essential Prime Implicant –A prime implicant that contains a minterm that is coveredby only one prime implicant

5.4 Determination of Minimum Expressions

1

1

1

1

1

1

1 1

abcd 00 01 11 10

00

01

10

11

- minterm covered by morethan 1 prime implicant

- minterm covered byonly 1 prime implicant

List of Essential Prime Implicants: bc’, ac

bc’

ac

Page 29: Unit 5: Karnaugh Maps · 5.2 Two-Variable Karnaugh Maps Two Variable Karnaugh Map Example: • Minterms in adjacent squares on the map can be combined since they differ in only one

1 1

To find minimum expression:

5.4 Determination of Minimum Expressions

1

1

1

1

1

1

1 1

abcd 00 01 11 10

00

01

10

11

find simplestexpressionfor remaining1’s

a’b’d

F = a’b’d + bc’ + ac

bc’

ac

• Find all Prime Implicants• Determine Essential Prime Implicants• Find Simplest Expression for remaining uncovered 1’s

Page 30: Unit 5: Karnaugh Maps · 5.2 Two-Variable Karnaugh Maps Two Variable Karnaugh Map Example: • Minterms in adjacent squares on the map can be combined since they differ in only one

Find Minimum Sum-of-Products Expression

5.4 Determination of Minimum Expressions

1

1

1

1

1

1 1 1

ABCD 00 01 11 10

00

01

11

10

Page 31: Unit 5: Karnaugh Maps · 5.2 Two-Variable Karnaugh Maps Two Variable Karnaugh Map Example: • Minterms in adjacent squares on the map can be combined since they differ in only one

5.4 Determination of Minimum Expressions

1

1

1

1

1

1 1 1

ABCD 00 01 11 10

00

01

11

10

1

1

1

1

1

1 1 1

ABCD 00 01 11 10

00

01

11

10

First find all Prime Implicants

Page 32: Unit 5: Karnaugh Maps · 5.2 Two-Variable Karnaugh Maps Two Variable Karnaugh Map Example: • Minterms in adjacent squares on the map can be combined since they differ in only one

5.4 Determination of Minimum Expressions

1

1

1

1

1

1 1 1

ABCD 00 01 11 10

00

01

11

10

Next find all essential Prime Implicants

1

1

1

1

1

1 1 1

ABCD 00 01 11 10

00

01

11

10

- mintern covered byonly 1 prime implicant

ACD

A’C’

A’B’D’

List of Essential Prime Implicants: A’C’, ACD, A’B’D’

Minimum Solution: F = A’C’ + ACD + A’B’D’ + A’BDor

BCD

Page 33: Unit 5: Karnaugh Maps · 5.2 Two-Variable Karnaugh Maps Two Variable Karnaugh Map Example: • Minterms in adjacent squares on the map can be combined since they differ in only one
Page 34: Unit 5: Karnaugh Maps · 5.2 Two-Variable Karnaugh Maps Two Variable Karnaugh Map Example: • Minterms in adjacent squares on the map can be combined since they differ in only one
Page 35: Unit 5: Karnaugh Maps · 5.2 Two-Variable Karnaugh Maps Two Variable Karnaugh Map Example: • Minterms in adjacent squares on the map can be combined since they differ in only one
Page 36: Unit 5: Karnaugh Maps · 5.2 Two-Variable Karnaugh Maps Two Variable Karnaugh Map Example: • Minterms in adjacent squares on the map can be combined since they differ in only one
Page 37: Unit 5: Karnaugh Maps · 5.2 Two-Variable Karnaugh Maps Two Variable Karnaugh Map Example: • Minterms in adjacent squares on the map can be combined since they differ in only one
Page 38: Unit 5: Karnaugh Maps · 5.2 Two-Variable Karnaugh Maps Two Variable Karnaugh Map Example: • Minterms in adjacent squares on the map can be combined since they differ in only one
Page 39: Unit 5: Karnaugh Maps · 5.2 Two-Variable Karnaugh Maps Two Variable Karnaugh Map Example: • Minterms in adjacent squares on the map can be combined since they differ in only one
Page 40: Unit 5: Karnaugh Maps · 5.2 Two-Variable Karnaugh Maps Two Variable Karnaugh Map Example: • Minterms in adjacent squares on the map can be combined since they differ in only one