Presentation is loading. Please wait.

Presentation is loading. Please wait.

ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN Lecture 6 Dr. Shi Dept. of Electrical and Computer Engineering.

Similar presentations


Presentation on theme: "ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN Lecture 6 Dr. Shi Dept. of Electrical and Computer Engineering."— Presentation transcript:

1 ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN Lecture 6 Dr. Shi Dept. of Electrical and Computer Engineering

2 KARNAUGH MAPS

3 Overview  K-maps: an approach to minimize Boolean functions  Easy conversion from truth table to K-map to minimized SOP representation.  Simple rules (steps) used to perform minimization  Leads to minimized SOP representation.  Much faster and more more efficient than previous minimization techniques with Boolean algebra.

4 Example: One-bit Adder Adder Cin Cout S B A Cout = A’*B*Cin + A*B’*Cin+A*B*Cin’ + A*B*Cin Requires: 8 ANDs, 3 Ors How to simplify???

5 xyF001011100110xyF001011100110 Karnaugh maps 01 y x 0 1 1 00 1 01 y x 0 1 x’y’ xy’xy x’y F = Σ(m 0,m 1 ) = x’y + x’y’

6 xyF001011100110xyF001011100110 Karnaugh maps  Alternate way of representing Boolean function  All rows of truth table represented with a square  Each square represents a minterm  Easy to convert between truth table, K-map, and SOP  Unoptimized form: number of 1’s in K-map equals number of minterms (products) in SOP  Optimized form: reduced number of minterms 01 y x 0 1 1 00 1 01 y x 0 1 x’y’ xy’xy x’y x y F = Σ(m 0,m 1 ) = x’y + x’y’

7 Karnaugh Maps  A Karnaugh map is a graphical tool for assisting in the general simplification procedure.  Two variable maps. 0 A 10 1 B 01 0 1 F=AB +A ’ B 0 A 11 1 B 01 0 1 °Three variable maps. 0 A 11 1 0001 0 1 BC 0 11 1 1110 F=AB’C’ +A B C + ABC +A BC + A’B’C + A’BC’ F=AB + AB + AB AB C F 0000 0011 0101 0110 1001 1011 1101 1111 +

8 Rules for K-Maps  We can reduce functions by circling 1’s in the K- map  Each circle represents minterm reduction  Following circling, we can deduce minimized and-or form. Rules to consider 1. Every cell containing a 1 must be included at least once. 2. The largest possible “power of 2 rectangle” must be enclosed. 3. The 1’s must be enclosed in the smallest possible number of rectangles.

9 Karnaugh Maps  A Karnaugh map is a graphical tool for assisting in the general simplification procedure.  Two variable maps. 0 A 10 1 B 01 0 1 F=AB +A ’ B 0 A 11 1 B 01 0 1 F=A + B °Three variable maps. F=A + B C + BC 0 A 11 1 0001 0 1 BC 0 11 1 1110 F=AB + AB + AB F=AB’C’ +A B C + ABC +A BC + A’B’C + A’BC’

10 Karnaugh maps  Numbering scheme based on Gray–code  e.g., 00, 01, 11, 10  Only a single bit changes in code for adjacent map cells  This is necessary to observe the variable transitions 0001 AB C 0 1 1110 C B A F(A,B,C) =  m(0,4,5,7) G(A,B,C) = 0011 C B A 100010000 011101111 C B A A = AC + B’C’

11 More Karnaugh Map Examples  Examples g = b' 01 0 1 a b c ab 00011110 0 1 01 0 1 a b c ab 00011110 0 1 01 01 f = a 0010 0111 cout = ab + bc + ac 11 00 0011 0011 f = a 1. Circle the largest groups possible. 2. Group dimensions must be a power of 2. 3. Remember what circling means!

12 Application of Karnaugh Maps: The One-bit Adder Adder Cin Cout S B A ABCinSCout 00000 00110 01010 01101 10010 10101 11001 11111 + S = A’B’Cin + A’BCin’ + AB’Cin’ + ABCin Cout = A’BCin + A B’Cin + ABCin’ + ABCin = A’BCin + ABCin + AB’Cin + ABCin + ABCin’ + ABCin = BCin + ACin + AB = (A’ + A)BCin + (B’ + B)ACin + (Cin’ + Cin)AB = 1·BCin + 1· ACin + 1· AB How to use a Karnaugh Map instead of the Algebraic simplification?

13 Application of Karnaugh Maps: The One-bit Adder Adder Cin Cout S B A Karnaugh Map for Cout Now we have to cover all the 1s in the Karnaugh Map using the largest rectangles and as few rectangles as we can. A B Cin 0 0 0 111 0 1

14 A B Application of Karnaugh Maps: The One-bit Adder Adder Cin Cout S B A 0 0 0 0111 1 Karnaugh Map for Cout Now we have to cover all the 1s in the Karnaugh Map using the largest rectangles and as few rectangles as we can. Cout = ACin

15 A B Cin Application of Karnaugh Maps: The One-bit Adder Adder Cin Cout S B A 0 0 0 0111 1 Karnaugh Map for Cout Now we have to cover all the 1s in the Karnaugh Map using the largest rectangles and as few rectangles as we can. Cout = Acin + AB

16 A B Cin Application of Karnaugh Maps: The One-bit Adder Adder Cin Cout S B A 0 0 0 0111 1 Karnaugh Map for Cout Now we have to cover all the 1s in the Karnaugh Map using the largest rectangles and as few rectangles as we can. Cout = ACin + AB + BCin

17 A B Cin Application of Karnaugh Maps: The One-bit Adder Adder Cin Cout S B A 0 1 110 01 0 Karnaugh Map for S S = A’BCin’

18 A B Cin Application of Karnaugh Maps: The One-bit Adder Adder Cin Cout S B A 0 1 110 01 0 Karnaugh Map for S S = A’BCin’ + A’B’Cin

19 A B Cin Application of Karnaugh Maps: The One-bit Adder Adder Cin Cout S B A 0 1 110 01 0 Karnaugh Map for S S = A’BCin’ + A’B’Cin + ABCin

20 A B Cin Application of Karnaugh Maps: The One-bit Adder Adder Cin Cout S B A 0 1 110 01 0 Karnaugh Map for S S = A’BCin’ + A’B’Cin + ABCin + AB’Cin’ No Possible Reduction! Can you draw the circuit diagrams?

21 Summary  Karnaugh map allows us to represent functions with new notation  Representation allows for logic reduction.  Implement same function with less logic  Each square represents one minterm  Each circle leads to one product term  Not all functions can be reduced  Each circle represents an application of:  Distributive rule -- x(y + z) = xy + xz  Complement rule – x + x’ = 1

22 MORE KARNAUGH MAPS

23 Overview  Karnaugh maps with four inputs  Same basic rules as three input K-maps  Understanding prime implicants  Related to minterms  Covering all implicants  Using Don’t Cares to simplify functions  Don’t care outputs are undefined  Summarizing Karnaugh maps

24 Karnaugh Maps for Four Input Functions  Represent functions of 4 inputs with 16 minterms  Use same rules developed for 3-input functions  Note bracketed sections shown in example.

25  F(A,B,C,D) =  m(0,2,3,5,6,7,8,10,11,14,15) F = C+ B’D’ Karnaugh map: 4-variable example D A B 10011001 010001000 11 11 C + A’BD 04150415 12 8 139 3 7 2 6 1511 1410

26 A' B' D + A' C + B' C D B C' D' + A C' + A B D' LT= EQ= GT= K-map for LTK-map for GT Design examples 0 00100010 00 D A11 010001000 B C K-map for EQ 10011001 00 D A00 10011001 B C 010001000 11 D A00 0 00100010 B C Can you draw the truth table for these examples? A'B'C'D' + A'BC'D + ABCD + AB'CD’

27 ABCDABCD EQ Physical Implementation °Step 1: Truth table °Step 2: K-map °Step 3: Minimized sum-of- products °Step 4: Physical implementation with gates K-map for EQ 10011001 00 D A00 10011001 B C

28 Karnaugh Maps  Four variable maps. F=BC +CD + AC+ AD 0 AB 11 0 0001 00 01 CD 0 01 1 1110 F=ABC + ACD + ABC + AB CD + ABC + AB C 1 10 1 11 10 1 11 1 °Need to make sure all 1’s are covered °Try to minimize total product terms. °Design could be implemented using NANDs and NORs

29 Product of Sums

30

31

32

33

34

35 SoP from PoS

36 Sum of Products

37 SoP and PoS

38 Quine-McClasky Algorithm  Willard van Orman Quine 1908-2000  Professor at Harvard University  Edward McCluskey, Jr. 1929-  Preofessor at Stanford University  Hundreds of students in academia and industry  Jacob Abraham (UT Austin) W. Kent Fuchs (Cornell) Weiping Shi

39 DON’T CARES (ISFs)

40 Karnaugh maps: Don’t cares  In some cases, outputs are undefined  We “don’t care” if the logic produces a 0 or a 1  This knowledge can be used to simplify functions. 01 X0X1X0X1 D A 1 110X110X 00 B C CD AB 00 01 11 10 00 01 11 10 - Treat X’s like either 1’s or 0’s - Very useful - OK to leave some X’s uncovered

41 + C’D Karnaugh maps: Don’t cares  f(A,B,C,D) =  m(1,3,5,7,9) + d(6,12,13)  without don't cares f = 01 X0X1X0X1 D A 1 110X110X 00 B C A’D CD AB 00 01 11 10 00 01 11 10 Cf 00 01 10 11 00 01 1X 100110011100110011 D 0 1 0 1 0 1 0 101010101101010101 10100XX0010100XX00 A 0 0 0 0 0 0 0 011111111011111111 + B 0 0 0 0 1 1 1 100001111100001111 +

42 Don’t Care Conditions  In some situations, we don’t care about the value of a function for certain combinations of the variables.  these combinations may be impossible in certain contexts  or the value of the function may not matter in when the combinations occur  In such situations we say the function is incompletely specified and there are multiple (completely specified) logic functions that can be used in the design.  so we can select a function that gives the simplest circuit  When constructing the terms in the simplification procedure, we can choose to either cover or not cover the don’t care conditions.

43 Map Simplification with Don’t Cares F=ACD+B+AC 0 AB xx 1 0001 00 01 CD 0 x1 0 1110 1 x0 1 11 10 1 11 x 0 AB xx 1 0001 00 01 CD 0 x1 0 1110 1 x0 1 11 10 1 11 x F=ABCD+ABC+BC+AC °Alternative covering.

44 Karnaugh maps: don’t cares (cont’d)  f(A,B,C,D) =  m(1,3,5,7,9) + d(6,12,13)  f = A'D + B'C'Dwithout don't cares  f = with don't cares don't cares can be treated as 1s or 0s depending on which is more advantageous 01 X0X1X0X1 D A1 110X110X 00 B C A'D by using don't care as a "1" a 2-cube can be formed rather than a 1-cube to cover this node + C'D


Download ppt "ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN Lecture 6 Dr. Shi Dept. of Electrical and Computer Engineering."

Similar presentations


Ads by Google