chapter 5 karnaugh maps -...

22
ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU Chapter 5 Chapter 5 Karnaugh Karnaugh Maps Maps Lecturer:吳安宇 Date2005/10/21

Upload: others

Post on 14-Jul-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Chapter 5 Karnaugh Maps - access.ee.ntu.edu.twaccess.ee.ntu.edu.tw/course/logic_design_94first... · ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU Chapter 5 Karnaugh

ACCESS IC LAB

Graduate Institute of Electronics Engineering, NTU

Chapter 5Chapter 5KarnaughKarnaugh MapsMaps

Lecturer:吳安宇Date:2005/10/21

Page 2: Chapter 5 Karnaugh Maps - access.ee.ntu.edu.twaccess.ee.ntu.edu.tw/course/logic_design_94first... · ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU Chapter 5 Karnaugh

Graduate Institute of Electronics Engineering, NTU

pp. 2

Problems in Algebraic SimplificationProblems in Algebraic SimplificationvThe procedures are difficult to apply in a

systematic way.vIt is difficult to tell when you have arrived at a

minimum solution. (minimum SOP, POS)=> Karnaugh map (K-map) is the solution.

Page 3: Chapter 5 Karnaugh Maps - access.ee.ntu.edu.twaccess.ee.ntu.edu.tw/course/logic_design_94first... · ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU Chapter 5 Karnaugh

Graduate Institute of Electronics Engineering, NTU

pp. 3

TwoTwo-- and Threeand Three--Variable KVariable K--MapsMaps

ABA’B1AB’A’B’010

AB

m3m11m2m0010

AB

01 1301 0210 1110 00FA Bmi

01101010

AB

1110

10A

B

A’B’+A’B = A’(B’+B) = A’

=> => =>One circle eliminates

one variable

A’

B’

A

B

A’

B

B’

Minterm:

Page 4: Chapter 5 Karnaugh Maps - access.ee.ntu.edu.twaccess.ee.ntu.edu.tw/course/logic_design_94first... · ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU Chapter 5 Karnaugh

Graduate Institute of Electronics Engineering, NTU

pp. 4

TwoTwo-- and Threeand Three--Variable KVariable K--MapsMapsv3-variable

1100101 01110111 11010010 11000000 010

AB C

m6m2

m7m3

m5m1

m4m0

AB C

B

A

C=>

Page 5: Chapter 5 Karnaugh Maps - access.ee.ntu.edu.twaccess.ee.ntu.edu.tw/course/logic_design_94first... · ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU Chapter 5 Karnaugh

Graduate Institute of Electronics Engineering, NTU

pp. 5

TwoTwo-- and Threeand Three--Variable KVariable K--MapsMapsvEx: K-map for F(a,b,c) = ∑m(1,3,5)

= ∏M(0,2,4,6,7)

0001110 1000 010

AB C

B

A

CF = A’B’C + A’BC + AB’C

= A’C + B’C=> Minimum SOP form

Page 6: Chapter 5 Karnaugh Maps - access.ee.ntu.edu.twaccess.ee.ntu.edu.tw/course/logic_design_94first... · ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU Chapter 5 Karnaugh

Graduate Institute of Electronics Engineering, NTU

pp. 6

TwoTwo-- and Threeand Three--Variable KVariable K--MapsMapsvOther combinations

111 0111 1

0 10 0

10A

B C

B 11

11AA’

AB C

B

C

1

1A

AB C

C

B

F = B(F = A’BC+ABC+A’BC’+ABC’)

F = B’C’+BC’= C’

F = AC’

Page 7: Chapter 5 Karnaugh Maps - access.ee.ntu.edu.twaccess.ee.ntu.edu.tw/course/logic_design_94first... · ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU Chapter 5 Karnaugh

Graduate Institute of Electronics Engineering, NTU

pp. 7

TwoTwo-- and Threeand Three--Variable KVariable K--MapsMapsvEx: f(a,b,c) = abc’ + b’c + a’

11b c’1b c

11b’ c1b’ c’

aa’

11

1

11

1a

=>K-map

simplification

a’ abc’

b’c

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

c

b

Page 8: Chapter 5 Karnaugh Maps - access.ee.ntu.edu.twaccess.ee.ntu.edu.tw/course/logic_design_94first... · ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU Chapter 5 Karnaugh

Graduate Institute of Electronics Engineering, NTU

pp. 8

TwoTwo-- and Threeand Three--Variable KVariable K--MapsMapsvConsensus theorem: XY+X’Z +YZ = XY+X’Z

111

1

XX

Y Z

Y

Z

111

1

XX

Y Z

Y

Z=>

Page 9: Chapter 5 Karnaugh Maps - access.ee.ntu.edu.twaccess.ee.ntu.edu.tw/course/logic_design_94first... · ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU Chapter 5 Karnaugh

Graduate Institute of Electronics Engineering, NTU

pp. 9

Same Simplification in KSame Simplification in K--MapsMaps

vF = ∑m(0,1,2,5,6,7) è Check no. of termsand no. of literals

11111

1a

ab c

b

c11111

1a

b

c

11111

1a

b

c

F(a,b,c) = a’b’+bc’+ac

F(a,b,c) = a’c’+b’c+ab

Page 10: Chapter 5 Karnaugh Maps - access.ee.ntu.edu.twaccess.ee.ntu.edu.tw/course/logic_design_94first... · ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU Chapter 5 Karnaugh

Graduate Institute of Electronics Engineering, NTU

pp. 10

FourFour--Variable KVariable K--MapsMaps

675401

1415131211

1021 01131 1910 1800 0

1000A B

C D

B

D

A

C

Ex: K-map of F(a,b,c,d) = acd + a’b + d’

1111

11

1

111

11

b

dc

a

F = d’ + a’b + ac

Page 11: Chapter 5 Karnaugh Maps - access.ee.ntu.edu.twaccess.ee.ntu.edu.tw/course/logic_design_94first... · ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU Chapter 5 Karnaugh

Graduate Institute of Electronics Engineering, NTU

pp. 11

FourFour--Variable KVariable K--MapsMapsv Ex 1: F = ∑m(1,3,4,5,10,12,13)

v Ex 2: F = ∑m(0,2,3,5,6,7,8,10,11,14,15)

11

01

1111

11 011 110 1

0 01000

A B C D

B

D

A

C

F = BC’+ A’B’D + AB’CD’

v Circle of 2k

=> Eliminate k variables

111

11

1111

11 F = C + B’D’ + A’BD

F’ = SOP (選 0)=> F = POS (De Morgan)

Page 12: Chapter 5 Karnaugh Maps - access.ee.ntu.edu.twaccess.ee.ntu.edu.tw/course/logic_design_94first... · ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU Chapter 5 Karnaugh

Graduate Institute of Electronics Engineering, NTU

pp. 12

KK--Map with DonMap with Don’’t carest caresvEx 3: F(A,B,C,D) = ∑m(1,3,5,7,9)+ ∑d(6,12,13)

vEx 4: Obtain POS form of minimum f(a,b,c,d)Find the minimum SOP form of f’(a,b,c,d) by looping the “0”s on a map of f(a,b,c,d)

X11 X

X

111

B

D

C

A

F = A’D+C’D (SOP)

0

0

1

Page 13: Chapter 5 Karnaugh Maps - access.ee.ntu.edu.twaccess.ee.ntu.edu.tw/course/logic_design_94first... · ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU Chapter 5 Karnaugh

Graduate Institute of Electronics Engineering, NTU

pp. 13

FourFour--Variable KVariable K--MapsMapsvEx: f = X’Z’ + WYZ + W’Y’Z’ + X’Y

0001

0100

111 0111 1000 1110 0

W X Y Z

W

Z

X

Y

(1)

(2) (3)

f ’ = (1) + (2) + (3)= Y’Z + W’YX + WXZ’

è De Morgan’s Lawf = [Y’Z+W’XY+WXZ’]’

=(Y+Z’)(W+X’+Y’)(W’+X’+Z)

Page 14: Chapter 5 Karnaugh Maps - access.ee.ntu.edu.twaccess.ee.ntu.edu.tw/course/logic_design_94first... · ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU Chapter 5 Karnaugh

Graduate Institute of Electronics Engineering, NTU

pp. 14

Prime Prime ImplicantsImplicantsvImplicant: Any single 1 or any group of 1’s

in the K-map of F function.

vPrime Implicant: If it cannot be combined with another term to eliminate a variable.vA single 1 on the K-map represents a PI if it is not

adjacent to any other 1’s.vTwo adjacent 1’s on a map form a PI if they are

not contained in a group of 4 1’s.vAnd so on.

Page 15: Chapter 5 Karnaugh Maps - access.ee.ntu.edu.twaccess.ee.ntu.edu.tw/course/logic_design_94first... · ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU Chapter 5 Karnaugh

Graduate Institute of Electronics Engineering, NTU

pp. 15

Prime Prime ImplicantsImplicantsvImplicant: A product term (11個)v5 minterms: {A’B’C, A’BC’, A’BC, ABC’, ABC }v5 group of 2-literal terms: {A’B, AB, A’C, BC’, BC}v1 group of 1-literal term: {B}

vPrime Implicant (PI): An implicant that is not covered by another implicant: {B, A’C}

11

01

11

11

110

1000A B C

B

A

Page 16: Chapter 5 Karnaugh Maps - access.ee.ntu.edu.twaccess.ee.ntu.edu.tw/course/logic_design_94first... · ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU Chapter 5 Karnaugh

Graduate Institute of Electronics Engineering, NTU

pp. 16

Essential Prime Essential Prime ImplicantsImplicantsv Essential Prime Implicant (EPI): A PI that covers at

least one minterm that is not covered by another PI. => {B, A’C} are also Essential PI.=> An essential PI in the K-map by noting that it covers at least one minterm that is circled only once.

v Cover: A set of PI’s which covers all 1’s.(all minterms)

11

01

11

11

110

1000A B C

B

A

Page 17: Chapter 5 Karnaugh Maps - access.ee.ntu.edu.twaccess.ee.ntu.edu.tw/course/logic_design_94first... · ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU Chapter 5 Karnaugh

Graduate Institute of Electronics Engineering, NTU

pp. 17

Essential Prime Essential Prime ImplicantsImplicants

vEx:

vEx:

1101

111111

11 0111 1

10 10 0

1000a b

c d

a

c

All PI’s:{a’b’d, bc’, acd, a’c’d, ab, b’cd}

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

11

111

1111

A B C D

A

C

B

D

All PI’s:{CD, BD, B’C, AC} Essential PI’s: {BD, B’C,AC}è f = BD+B’C+AC

Page 18: Chapter 5 Karnaugh Maps - access.ee.ntu.edu.twaccess.ee.ntu.edu.tw/course/logic_design_94first... · ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU Chapter 5 Karnaugh

Graduate Institute of Electronics Engineering, NTU

pp. 18

Essential Prime Essential Prime ImplicantsImplicantsvEx:

111

11

111

A B C D

C

B

D

A

Essential PI’s:{A’C, A’B’D’, ACD}

Two PI’s can cover A’BCD:{A’BD, BCD}

A’BDè f = A’C’+A’B’D’+ACD+ or

BCD

EPI

EPI

EPI

Page 19: Chapter 5 Karnaugh Maps - access.ee.ntu.edu.twaccess.ee.ntu.edu.tw/course/logic_design_94first... · ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU Chapter 5 Karnaugh

Graduate Institute of Electronics Engineering, NTU

pp. 19

Essential Prime Essential Prime ImplicantsImplicantsvEx:

vRule:1. Find all Essential PI’s.2. Find a minimum set of PI’s to cover the remaining

1’s on the map.

1X1101

X1

11

11 01 1

10 11X0 0

1000A B

C D

(1) EPI EPI (2)

PI (3)

F = (1)+(2)+(3)

Page 20: Chapter 5 Karnaugh Maps - access.ee.ntu.edu.twaccess.ee.ntu.edu.tw/course/logic_design_94first... · ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU Chapter 5 Karnaugh

Graduate Institute of Electronics Engineering, NTU

pp. 20

Flowchart for Flowchart for determining a determining a minimum Sum minimum Sum of Productsof Productsbased on based on EPIsEPIsand PIsand PIs

Page 21: Chapter 5 Karnaugh Maps - access.ee.ntu.edu.twaccess.ee.ntu.edu.tw/course/logic_design_94first... · ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU Chapter 5 Karnaugh

Graduate Institute of Electronics Engineering, NTU

pp. 21

KK--map for 5 Variablesmap for 5 Variables

Page 22: Chapter 5 Karnaugh Maps - access.ee.ntu.edu.twaccess.ee.ntu.edu.tw/course/logic_design_94first... · ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU Chapter 5 Karnaugh

Graduate Institute of Electronics Engineering, NTU

pp. 22

Other forms of 5Other forms of 5--variable Kvariable K--mapmap