Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS 140 Lecture 6 Professor CK Cheng UC San Diego.

Similar presentations


Presentation on theme: "CS 140 Lecture 6 Professor CK Cheng UC San Diego."— Presentation transcript:

1 CS 140 Lecture 6 Professor CK Cheng UC San Diego

2 Part I. Combinational Logic –Implementation K-map Quine-McCluskey

3 Quine-McCluskey Method Given two sets of F R D find min sum of products. 1)Exploit the adjacency to find prime implicants. 2)Find essential primes among primes via prime implicant chart.

4 Example Id a b c d f (a,b,c,d) 0 0 0 0 0 1 1 0 0 0 1 1 2 0 0 1 0 1 3 0 0 1 1 0 4 0 1 0 0 0 5 0 1 0 1 0 6 0 1 1 0 0 7 0 1 1 1 0 8 1 0 0 0 1 9 1 0 0 1 - 10 1 0 1 0 - 11 1 0 1 1 0 12 1 1 0 0 0 13 1 1 0 1 0 14 1 1 1 0 1 15 1 1 1 1 0 Given f(a,b,c,d) F =  m(0,1,2,8,14) D =  m(9,10)

5 Corresponding 4-variable K-map f (a, b, c, d) = b’c’ + b’d’ + acd’ b c a d 1 0 0 1 1 0 0 - 0 0 0 0 1 0 1 - 0 4 12 8 1 5 13 9 3 7 15 11 2 6 14 10

6 Quine-McCluskey Approach 1)Draw truth table that only include F and D. Order by The number of ones. Divide into groups. Id 0 1 2 8 9 10 14 a0001111a0001111 b0000001b0000001 c0010011c0010011 d0100100d0100100 f1111--1f1111--1 I II III IV Each group has an equal number of ones in the input combination. Each minterm can only be adjacent to the minterms in the next group.

7 Continue again. Pair up rows from adjacent regions if they differ by exactly one bit. Put a dash where they differ. (0,1) (0,2) (0,8) (1,9) (2,10) (8,9) (8,10) (10,14) a00---111a00---111 b0000000-b0000000- c0-0010-1c0-0010-1 d-0010-00d-0010-00 I&II II&III III&IV

8 We stop when we can no longer combine rows. Make sure that we cover the entire onset. (0,1,8,9) (0,2,8,10) (10,14) a--1a--1 b00-b00- c0-1c0-1 d-00d-00 Primes  m(0,1,8,9)  m(0,2,8,10)  m(10,14) Draw the prime implicant chart: primes versus the minterms in on-set. Circle essential primes.  m(0,1,8,9)  m(0,2,8,10)  m(10,14) m0 X m1 X m2 X m8 X m14 X f(a,b,c,d) =  m(0,1,8,9) +  m(0,2,8,10) +  m(10,14) f (a,b,c,d) = b’c’ + b’d’ + acd’

9 Another example Id a b c d f (a,b,c,d) 0 0 0 0 0 1 1 0 0 0 1 0 2 0 0 1 0 1 3 0 0 1 1 0 4 0 1 0 0 1 5 0 1 0 1 0 6 0 1 1 0 0 7 0 1 1 1 1 8 1 0 0 0 1 9 1 0 0 1 - 10 1 0 1 0 0 11 1 0 1 1 0 12 1 1 0 0 - 13 1 1 0 1 0 14 1 1 1 0 0 15 1 1 1 1 1 Given f(a,b,c,d) w/ F =  m(0,2,4,7,8,15) D =  m(9,12)

10 Id 0 2 4 8 9 12 7 15 a00011101a00011101 b00100111b00100111 c01000011c01000011 d00001011d00001011 I II III IV V (0,2) (0,4) (0,8) (4,12) (8,9) (8,12) (7,15) a00--11-a00--11- b0-010-1b0-010-1 c-000001c-000001 d0000-01d0000-01 (0,4,8,12) - - 0 0  m(0,2)  m(7,15)  m(0,4,8,12) m0 X m2 X m4 X m7 X m8 X m15 X f(a,b,c,d) =  m(0,2) +  m(7,15) +  m(0,4,8,12) f (a,b,c,d) = a’b’d + bcd + c’d’


Download ppt "CS 140 Lecture 6 Professor CK Cheng UC San Diego."

Similar presentations


Ads by Google