03-Chapter 3 - Karnaugh Maps

42
3–1 Copyright © 2005 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 2 Review • De Morgan’s Theorems • “SFA Theorems” for XOR and XNOR • Nothing but NAND gates

Transcript of 03-Chapter 3 - Karnaugh Maps

Page 1: 03-Chapter 3 - Karnaugh Maps

3–1 Copyright © 2005 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Chapter 2 Review

• De Morgan’s Theorems• “SFA Theorems” for XOR and XNOR• Nothing but NAND gates

Page 2: 03-Chapter 3 - Karnaugh Maps

3–2

Chapter 3Karnaugh Maps

Page 3: 03-Chapter 3 - Karnaugh Maps

3–3

What are Karnaugh Maps?These are grids that all you to easily find the

simplest algebraic expression for a truth table.

K-Maps consists of one square for each possible minterm in a function.

Page 4: 03-Chapter 3 - Karnaugh Maps

3–4

Karnaugh Mapping Steps1. Sketch a Karnaugh map grid for the problem.2. Fill in the 1’s and 0’s from the truth table.3. Circle groups of 1’s.

Circle the largest groups of 2, 4, 8, etc. first. Minimize the number of circles but make sure that every 1 is in a circle.

4. Write an equation using these circles.

Example: f(x,y,z) = m(2,3,4,5,7)

Page 5: 03-Chapter 3 - Karnaugh Maps

3–5 Copyright © 2005 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Map 2.12 x yz + x yz + xy z + xy z + xyz. Map 2.13 A better solution.

Map 2.14 The minimum solutions.

Page 6: 03-Chapter 3 - Karnaugh Maps

3–6

Karnaugh Mapping Steps1. Sketch a Karnaugh map grid for the problem.2. Fill in the 1’s and 0’s from the truth table.3. Circle groups of 1’s.

Circle the largest groups of 2, 4, 8, etc. first. Minimize the number of circles but make sure that every 1 is in a circle.

4. Write an equation using these circles.

Example: f(w,x,y,z) = m(1,3,5,6,7,12,13,14,15)

Page 7: 03-Chapter 3 - Karnaugh Maps

3–7 Copyright © 2005 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

= wx + wz + wxyz= wx + w(z + xyz)= wx + w(z + xy) [P10a]= wx + wz + wxy= wz + x(w + wy)= wz + x(w + y) [P10a]= wz + wx + xy

Page 8: 03-Chapter 3 - Karnaugh Maps

3–8

Karnaugh Mapping Steps1. Sketch a Karnaugh map grid for the problem.2. Fill in the 1’s and 0’s from the truth table.3. Circle groups of 1’s.

Circle the largest groups of 2, 4, 8, etc. first. Minimize the number of circles but make sure that every 1 is in a circle.

4. Write an equation using these circles.

Example: Problem 1 (a-e)

Page 9: 03-Chapter 3 - Karnaugh Maps

3–9 Copyright © 2005 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

wx + wxy + wyz + wyz + wxyz

= (wx + wxy) + (wyz + wyz) + wxyz

= wx + wz + wxyz [P12a, P9a]

Page 10: 03-Chapter 3 - Karnaugh Maps

3–10 Copyright © 2005 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Map 2.16 Consensus.

Page 11: 03-Chapter 3 - Karnaugh Maps

3–11 Copyright © 2005 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Map 2.1 Two-variable Karnaugh maps.

Page 12: 03-Chapter 3 - Karnaugh Maps

3–12 Copyright © 2005 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

An implicant of a function is a product term.

From the point of view of the map, an implicant is a rectangle of 1, 2, 4, 8, . . . (any power of 2) 1’s. That rectangle may not include any 0’s.

The implicants of F areMinterms Groups of 2 Groups of 4ABCD ACD CDABCD BCDABCD ACDABCD BCDABCD ABCABCD ABDABCD

Page 13: 03-Chapter 3 - Karnaugh Maps

3–13 Copyright © 2005 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

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.

Page 14: 03-Chapter 3 - Karnaugh Maps

3–14 Copyright © 2005 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

minimum all prime implicants

Page 15: 03-Chapter 3 - Karnaugh Maps

3–15 Copyright © 2005 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Page 16: 03-Chapter 3 - Karnaugh Maps

3–16 Copyright © 2005 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Page 17: 03-Chapter 3 - Karnaugh Maps

3–17 Copyright © 2005 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Page 18: 03-Chapter 3 - Karnaugh Maps

3–18 Copyright © 2005 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

F = ABC + ABE + ABCE + ABCDE + BDE

Page 19: 03-Chapter 3 - Karnaugh Maps

3–19 Copyright © 2005 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

F = ACE + ABCD + CDE + BCE + BCDE + ACD

F = ACE + ABCD + CDE + BCE + BCDE + ADE

Page 20: 03-Chapter 3 - Karnaugh Maps

3–20 Copyright © 2005 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

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

F = ACD + ACD + ACD + ACD + BD + BC

F = ACD+ ACD + ACD + ACD+ AB+ BC

Page 21: 03-Chapter 3 - Karnaugh Maps

3–21 Copyright © 2005 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

f = acd + bcd + acd + bcd

Page 22: 03-Chapter 3 - Karnaugh Maps

3–22 Copyright © 2005 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

f = abd + abc + abd + abc

Page 23: 03-Chapter 3 - Karnaugh Maps

3–23 Copyright © 2005 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Page 24: 03-Chapter 3 - Karnaugh Maps

3–24 Copyright © 2005 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

A prime implicant is a rectangle of 1, 2, 4, 8, . . . 1’s or X’s not included in any one larger rectangle. Thus, from the point of view of finding prime implicants, X’s (don’t cares) are treated as 1’s.

An essential prime implicant is a prime implicant that covers at least one 1 not covered by any other prime implicant (as always). Don’t cares (X’s) do not make a prime implicant essential.

Page 25: 03-Chapter 3 - Karnaugh Maps

3–25 Copyright © 2005 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

minimum other p.i.s

F = BD + ACD + ABC

Page 26: 03-Chapter 3 - Karnaugh Maps

3–26 Copyright © 2005 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Map Method 3

1. Find all essential prime implicants (using either Map Method 1 or 2).

2. Replace all 1’s covered by the essential prime implicants with X’s. This highlights the 1’s that remain to be covered.

3. Then choose enough of the other prime implicants (as in Methods 1 and 2).

Page 27: 03-Chapter 3 - Karnaugh Maps

3–27 Copyright © 2005 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Finding a minimum product of sums expression requires no new theory. The following approach is the simplest:

1. Map the complement of the function. (If there is already a map for the function, replace all 0’s by 1’s, all 1’s by 0’s and leave X’s 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 DeMorgan’s theorem (P11) to complement that expression, producing a product of sums expression.

Page 28: 03-Chapter 3 - Karnaugh Maps

3–28 Copyright © 2005 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

f = ac + abc + acd f = ac + ac + abd

f = ac + ac + bcd

f = (a + c)(a + c)(a + b + d)

f = (a + c)(a + c)(b + c + d)

Page 29: 03-Chapter 3 - Karnaugh Maps

3–29 Copyright © 2005 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Page 30: 03-Chapter 3 - Karnaugh Maps

3–30 Copyright © 2005 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

F = AC + AB G = AC + AB

Page 31: 03-Chapter 3 - Karnaugh Maps

3–31 Copyright © 2005 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Page 32: 03-Chapter 3 - Karnaugh Maps

3–32 Copyright © 2005 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

F = AB + ABC G = AB + BC

Page 33: 03-Chapter 3 - Karnaugh Maps

3–33 Copyright © 2005 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Page 34: 03-Chapter 3 - Karnaugh Maps

3–34 Copyright © 2005 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

F = AC + ACD + ABC G = AC + ACD + ABC

Page 35: 03-Chapter 3 - Karnaugh Maps

3–35 Copyright © 2005 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

f = ab + bc g = ab + ac

Page 36: 03-Chapter 3 - Karnaugh Maps

3–36 Copyright © 2005 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

F = BC + ABC+ ABD + ABD

G = C + ABD

H = BC + ABC + ABD

Page 37: 03-Chapter 3 - Karnaugh Maps

3–39 Copyright © 2005 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

g = xz+ wz+ wyz+ wxy

g = xz+ wz+ wyz+ xyz

g = xz+ wz+ xyz + wxy

Page 38: 03-Chapter 3 - Karnaugh Maps

3–40 Copyright © 2005 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

not used minimum

G = ABC + ACD + ABC + ACD

Page 39: 03-Chapter 3 - Karnaugh Maps

3–41 Copyright © 2005 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Page 109 – Chapter Test

• Problems starting at #5.

Page 40: 03-Chapter 3 - Karnaugh Maps

3–42 Copyright © 2005 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Chapter 2

• 13• 17• Simplify the equation below using a

Karnaugh Map. Express your answer in algebraic form.

• f(A,B,C,D,E)=m(0,1,2,3,6,8,9,10,11,17,20,21,23,25,28,30,31)

Page 41: 03-Chapter 3 - Karnaugh Maps

Announcements• Homework #3 is due today.• Lab #3 will involve Electronic Workbench.• Exam #1 will be given on Wednesday.

– Open Book– The review sheet is online.

• Lecture– DeMorgan’s Theorems– Consensus Therorem– Questions over Homework #3?

Page 42: 03-Chapter 3 - Karnaugh Maps

3–44 Copyright © 2005 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Example Problems

• 3.9(e)• Homework #3