1 Chapter 5 Karnaugh Maps Mei Yang ECG 100-001 Logic Design 1.

32
1 Chapter 5 Karnaugh Maps Chapter 5 Karnaugh Maps Mei Yang ECG 100-001 Logic Design 1 ECG 100-001 Logic Design 1

Transcript of 1 Chapter 5 Karnaugh Maps Mei Yang ECG 100-001 Logic Design 1.

Page 1: 1 Chapter 5 Karnaugh Maps Mei Yang ECG 100-001 Logic Design 1.

1

Chapter 5 Karnaugh MapsChapter 5 Karnaugh Maps

Mei Yang

ECG 100-001 Logic Design 1ECG 100-001 Logic Design 1

Page 2: 1 Chapter 5 Karnaugh Maps Mei Yang ECG 100-001 Logic Design 1.

2

Minimum Forms of Switching Minimum Forms of Switching FunctionsFunctions

When a function is realized using AND and OR gates, the cost is directly related the number of gates and gate inputs used.

Minimum SOP: A SOP form which (a) has a minimum number of terms and (b) for those expressions which have the same minimum number of terms, has a minimum number of literals.

Minimum POS: A POS form which (a) has a minimum number of terms and (b) for those expressions which have the same minimum number of terms, has a minimum number of literals.

Page 3: 1 Chapter 5 Karnaugh Maps Mei Yang ECG 100-001 Logic Design 1.

3

Minimizing from Minterm Minimizing from Minterm formform

Page 4: 1 Chapter 5 Karnaugh Maps Mei Yang ECG 100-001 Logic Design 1.

4

Why Kmap?Why Kmap?

Problems with the simplification method using Boolean algebra– The procedures are difficult to apply in

systematic way.– It is difficult to tell when you have arrived at

a minimum solution.Kmap is a systematic method, which is

especially useful for simplifying functions with three or four variables.

Page 5: 1 Chapter 5 Karnaugh Maps Mei Yang ECG 100-001 Logic Design 1.

5

Plotting KmapsPlotting Kmaps

From truth tablesFrom minterm/maxterm expansionsFrom algebraic expressionsExamples on pp. 122-124

Page 6: 1 Chapter 5 Karnaugh Maps Mei Yang ECG 100-001 Logic Design 1.

6

2-Variable Karnaugh Map2-Variable Karnaugh Map

Page 7: 1 Chapter 5 Karnaugh Maps Mei Yang ECG 100-001 Logic Design 1.

7

3-Variable Karnaugh Map3-Variable Karnaugh MapBoolean adjacency -difference in one

variableGrouping adjacent 1’s

Page 8: 1 Chapter 5 Karnaugh Maps Mei Yang ECG 100-001 Logic Design 1.

8

Grouping PrincipleGrouping Principle

Groupings can contain only 1s; no 0s.Groups can be formed only at right angles;

diagonal groups are not allowed.The number of 1s in a group must be a

power of 2 – even if it contains a single 1.The groups must be made as large as

possible.Groups can overlap and wrap around the

sides of the Kmap.Use the fewest number of groups possible.

Page 9: 1 Chapter 5 Karnaugh Maps Mei Yang ECG 100-001 Logic Design 1.

9

Grouping of adjacent 1Grouping of adjacent 1’’ss

3-Variable Karnaugh Map3-Variable Karnaugh MapMultiple grouping

Page 10: 1 Chapter 5 Karnaugh Maps Mei Yang ECG 100-001 Logic Design 1.

10

3-Variable Karnaugh Map3-Variable Karnaugh Map

Corresponding minterms

Adjacent minterms

Page 11: 1 Chapter 5 Karnaugh Maps Mei Yang ECG 100-001 Logic Design 1.

11

3-Variable Karnaugh Map3-Variable Karnaugh Map

Page 12: 1 Chapter 5 Karnaugh Maps Mei Yang ECG 100-001 Logic Design 1.

12

4-Variable Karnaugh Map4-Variable Karnaugh Map

Page 13: 1 Chapter 5 Karnaugh Maps Mei Yang ECG 100-001 Logic Design 1.

13

4-Variable Karnaugh Map4-Variable Karnaugh Map

Page 14: 1 Chapter 5 Karnaugh Maps Mei Yang ECG 100-001 Logic Design 1.

14

Boolean AdjacencyBoolean Adjacency

Page 15: 1 Chapter 5 Karnaugh Maps Mei Yang ECG 100-001 Logic Design 1.

15

Grouping Grouping ExampleExample

Page 16: 1 Chapter 5 Karnaugh Maps Mei Yang ECG 100-001 Logic Design 1.

16

Grouping ExampleGrouping Example

Page 17: 1 Chapter 5 Karnaugh Maps Mei Yang ECG 100-001 Logic Design 1.

17

More than One Way of More than One Way of GroupingGrouping

Page 18: 1 Chapter 5 Karnaugh Maps Mei Yang ECG 100-001 Logic Design 1.

18

A Systematic Way for A Systematic Way for MinimizationMinimization

Any single one or any group of ‘1’ s is called an IMPLICANTIMPLICANT of F.

A group (covering) that cannot be combined with some other 1’s or coverings to eliminate a variable is called PRIME PRIME IMPLICANTIMPLICANT..

Page 19: 1 Chapter 5 Karnaugh Maps Mei Yang ECG 100-001 Logic Design 1.

19

Minimization with Don’t Minimization with Don’t CaresCares

Threat X’s as 1’s if you will get a larger grouping. Otherwise, treat them as 0’s.

Page 20: 1 Chapter 5 Karnaugh Maps Mei Yang ECG 100-001 Logic Design 1.

20

Obtaining Minimum POS Obtaining Minimum POS Equation Equation

Grouping 0’s means obtaining a minimum SOP for F’.

Page 21: 1 Chapter 5 Karnaugh Maps Mei Yang ECG 100-001 Logic Design 1.

21

Grouping ZerosGrouping Zeros

Page 22: 1 Chapter 5 Karnaugh Maps Mei Yang ECG 100-001 Logic Design 1.

22

Minimization RulesMinimization Rules

The minimum SOP expression consists of some (but not necessarily all) of the prime implicants of a function.

If a SOP expression contains a term which is NOT a prime implicant, then it CANNOT be minimum.

Page 23: 1 Chapter 5 Karnaugh Maps Mei Yang ECG 100-001 Logic Design 1.

23

Minimization RulesMinimization RulesHow to use prime implicants for obtaining a How to use prime implicants for obtaining a

minimum SOP equation?minimum SOP equation?

Page 24: 1 Chapter 5 Karnaugh Maps Mei Yang ECG 100-001 Logic Design 1.

24

F(A,B,C,D)= BC’ +A’B’D

BC’ and A’B’D are called the Essential Prime ImplicantsEssential Prime Implicants, because they cover ‘1’s that cannot be covered by any other coverings.

A’CD is not an essential, and it is not included, because all 1’s are already covered, and there is no reason to add an extra term.

Essential Prime Essential Prime ImplicantsImplicants

Page 25: 1 Chapter 5 Karnaugh Maps Mei Yang ECG 100-001 Logic Design 1.

25

More than one solutionMore than one solution

Page 26: 1 Chapter 5 Karnaugh Maps Mei Yang ECG 100-001 Logic Design 1.

26

Two solutionsTwo solutions

Page 27: 1 Chapter 5 Karnaugh Maps Mei Yang ECG 100-001 Logic Design 1.

27

Minimum SOPMinimum SOPTo obtain a minimum SOP equationInclude all essential prime implicants to the

equation.Check if all ones are covered by the

essential prime implicants.If there are remaining ‘1’s, include non-

essential prime implicants.There can be more than one minimum SOP

equation equally valid.

Page 28: 1 Chapter 5 Karnaugh Maps Mei Yang ECG 100-001 Logic Design 1.

28

Minimization with Don’t Minimization with Don’t CaresCares

Page 29: 1 Chapter 5 Karnaugh Maps Mei Yang ECG 100-001 Logic Design 1.

29

5-Variable Karnaugh Map5-Variable Karnaugh Map

Page 30: 1 Chapter 5 Karnaugh Maps Mei Yang ECG 100-001 Logic Design 1.

30

5-Variable Karnaugh Map5-Variable Karnaugh Map

Page 31: 1 Chapter 5 Karnaugh Maps Mei Yang ECG 100-001 Logic Design 1.

31

Example 1:Example 1:F = ∑m(1,2,3,5,6,8,9,10,11,13,24, 25, 26, 27,29)F = ∑m(1,2,3,5,6,8,9,10,11,13,24, 25, 26, 27,29)

Page 32: 1 Chapter 5 Karnaugh Maps Mei Yang ECG 100-001 Logic Design 1.

32

Example 2: Example 2: F = ∑m (0,1,2,4,5,8,9,10,17,18,19,25,26)F = ∑m (0,1,2,4,5,8,9,10,17,18,19,25,26)

F = A'B'D'+C’D'E+C'DE’+

{AB’C’E or AB’C’D}+{A’BC’D’ or A’BC’E’}

DEBC

00 01 11 10

00

01

11

10

A=1/0

1

1

1

1

11

1

1

11

1

1

1

Essential prime Essential prime implicants are shown implicants are shown in sold line groups and in sold line groups and other prime implicants other prime implicants are shown in dotted are shown in dotted line groups. line groups.