Presentation is loading. Please wait.

Presentation is loading. Please wait.

EE2420 – Digital Logic Summer II 2013 Hassan Salamy Ingram School of Engineering Texas State University Set 5: Karnaugh Maps.

Similar presentations


Presentation on theme: "EE2420 – Digital Logic Summer II 2013 Hassan Salamy Ingram School of Engineering Texas State University Set 5: Karnaugh Maps."— Presentation transcript:

1 EE2420 – Digital Logic Summer II 2013 Hassan Salamy Ingram School of Engineering Texas State University Set 5: Karnaugh Maps

2 Test 1  Thursday July 18, 2013 2

3 Karnaugh map  The key to finding a minimum cost SOP or POS form is applying the combining property (14a for SOP or 14b for POS)  The Karnaugh map (K-map) provides a systematic (and graphical) way of performing this operation  Minterms can be combined by 14a when they differ in only one variable  f(x,y,z) = xyz+xyz’ = xy(z+z’) = xy(1) = xy  The K-map illustrates this combination graphically 3

4 Karnaugh map  The K-map is an alternative to a truth table for representing an expression  K-map consists of cells that correspond to rows of the truth table  Each cell corresponds to a minterm  A two variable truth table and the corresponding K-map x1x1 x2x2 f 00m0m0 01m1m1 10m2m2 11m3m3 m3m3 m1m1 m2m2 m0m0 0 0 1 1 x1x1 x2x2 4

5 Karnaugh map m3m3 m1m1 m2m2 m0m0 0 0 1 1 x1x1 x2x2 Values for the first variable are listed across the top Values for the second variable are listed down the left side 5

6 Karnaugh map groupings  Minterms in adjacent squares on the map can be combined since they differ in only one variable  Indicated by looping the corresponding ‘1’s on the map (the ‘1’s must be adjacent)  Looping two ‘1’s together corresponds to eliminating a term and a variable from the output expression => xy+xy’ = x xyf 000 010 101 111 1 0 10 0 0 1 1 x y f=xy’+xy=x 6

7 K-map groupings example  Note that the bottom two cells differ in only one variable (x) and the right two cells differ in only one variable (y) xyf 000 011 101 111 1 1 10 0 0 1 1 x y x y f=x+y 7

8 K-map groupings example  Draw the K-map and give the minimized logic expression for the following truth table.  Show the groupings made in the K-map xyf 001 011 101 110 8

9 Three variable K-map  A three-variable K-map is constructed by laying 2 two-variable maps side by side  K-maps are always laid out such that adjacent squares only differ by one variable (i.e. by 1 bit in the binary expression of the minterm values) xyzMinterm 000m 0 =x’y’z’ 001m 1 =x’y’z 010m 2 =x’yz’ 011m 3 =x’yz 100m 4 =xy’z’ 101m 5 =xy’z 110m 6 =xyz’ 111m 7 =xyz m3m3 m1m1 m2m2 m0m0 00 0 1 01 xy z m5m5 m7m7 m4m4 m6m6 1110 End cells are ‘adjacent’ 9

10 Example three-variable K-maps f(x,y,z)=  m(0,1,2,4) 01 11 00 0 1 01 xy z 00 1 0 1110 =x’y’+x’z’+y’z’ 11 11 00 0 1 01 xy z 00 1 0 1110 f(x,y,z)=  m(0,1,2,3,4) =x’+y’z’ A grouping of four eliminates 2 variables 10

11 Guidelines for combining terms  Can combine only adjacent ‘1’s  Can group only in powers of 2 (1,2,4,8, etc.)  Try to form as large a grouping as possible  Do not generate more groups than are necessary to “cover” all the ‘1’s 11

12 Example groupings 00 11 00 0 1 01 xy z 00 1 1 1110 01 11 00 0 1 01 xy z 10 1 1 1110 00 10 00 0 1 01 xy z 11 1 1 1110 10 11 00 0 1 01 xy z 01 0 1 1110 f=z’f=yz’+x f=z’+y’ f=y+x’z’ 12

13 K-map groupings example  Draw the K-map and give the minimized logic expression for the following.  f(a,b,c)=  m(1,2,3,4,5,6)  Show the groupings made in the K-map 13

14 Four variable K-map  A four-variable K-map is constructing by laying 2 three-variable maps together to create four rows  f(a,b,c,d) m5m5 m1m1 m4m4 m0m0 0001 ab cd m9m9 m 13 m8m8 m 12 1110 m6m6 m2m2 m7m7 m3m3 m 10 m 14 m 11 m 15 00 01 11 10 14

15 Four variable K-map  Adjacencies wrap around in the K-map m5m5 m1m1 m4m4 m0m0 0001 ab cd m9m9 m 13 m8m8 m 12 1110 m6m6 m2m2 m7m7 m3m3 m 10 m 14 m 11 m 15 00 01 11 10 15

16 Example four-variable K-maps 00 00 0001 ab cd 11 00 1110 01 01 10 10 00 01 11 10 f(a,b,c,d)=m(2,3,9-11,13) =ac’d+b’c 10 10 0001 ab cd 11 01 1110 10 11 01 11 00 01 11 10 f(a,b,c,d)=m(3-7,9,11,12-15) =b+cd+ad 16

17 Example groupings 01 11 0001 ab cd 10 11 1110 11 01 11 10 00 01 11 10 f(a,b,c,d)=b’+d’ 01 10 0001 ab cd 10 01 1110 10 01 01 10 00 01 11 10 f(a,b,c,d)=b’d+bd’ 17

18 Example groupings 10 01 0001 ab cd 01 10 1110 01 10 10 01 00 01 11 10 f(a,b,c,d)=b’d’+bd 01 11 0001 ab cd 10 01 1110 11 01 01 10 00 01 11 10 f(a,b,c,d)=b’d+bd’+a’b’ 18

19 Examples  We will revisit some of the examples we studied in the last lecture.  We will simplify the equations using K-Maps this time instead of algebraic manipulations. 19

20 Multiplexer circuit sxyf 0000 0010 0101 0111 1000 1011 1100 1111 f(s,x,y)=m 2 +m 3 +m 5 +m 7 f(s,x,y)=s’xy’+s’xy+sx’y+sxy f(s,x,y)=s’x(y’+y)+sy(x’+x) f(s,x,y)=s’x+sy 20

21 Car safety alarm DKSBA 00000 00010 00100 00110 01001 01011 01101 01111 10000 10010 10100 10110 11000 11010 11101 11110 A(D,K,S,B)=m(4,5,6,7,14) A(D,K,S,B)=D’KS’B’+D’KS’B+D’KSB’+D’KSB+DKSB’ =D’KS’+D’KS+KSB’ =D’K+KSB’ 21

22 Three-way light control xyzf 0000 0011 0101 0110 1001 1010 1100 1111 f(x,y,z)=m 1 +m 2 +m 4 +m 7 f(x,y,z)=x’y’z+x’yz’+xy’z’+xyz This is the simplest sum-of-products form. 22

23 Majority Function 23 XYZMajority 0000 0010 0100 0111 1000 1011 1101 1111 The output of the majority function is equal to the value for the three inputs which occurs on more inputs. Majority(X,Y,Z) =  m(3,5,6,7) Majority(X,Y,Z) = X’YZ + XY’Z + XYZ’ + XYZ Simplified  Majority(X,Y,Z) = XY + XZ + YZ


Download ppt "EE2420 – Digital Logic Summer II 2013 Hassan Salamy Ingram School of Engineering Texas State University Set 5: Karnaugh Maps."

Similar presentations


Ads by Google