Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS 140 Lecture 4 Professor CK Cheng Tuesday 5/08/02.

Similar presentations


Presentation on theme: "CS 140 Lecture 4 Professor CK Cheng Tuesday 5/08/02."— Presentation transcript:

1 CS 140 Lecture 4 Professor CK Cheng Tuesday 5/08/02

2 Part I. Combinational Logic –Implementation K-map

3 4-variable K-maps Id a b c d f (a,b,c,d) 0 0 0 1 0 0 0 1 0 2 0 0 1 0 1 3 0 0 1 1 1 4 0 1 0 0 0 5 0 1 0 1 0 6 0 1 1 0 1 7 0 1 1 1 1 8 1 0 0 0 0 9 1 0 0 1 0 10 1 0 1 0 1 11 1 0 1 1 1 12 1 1 0 0 0 13 1 1 0 1 0 14 1 1 1 0 1 15 1 1 1 1 1

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

5 Another example w/ 4 bits: 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

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

7 Boolean Expression K-Map Each Variable x i and its compliment x i ’  Two half planes Rx i, Rx i ’ divided by x i Each product term P (  Xi* e.g. b’c’)  Intersection of Rx i * for all i  P. (A rectangle e.g. Rb’ Rc’) Each minterm  1-cell Two minterms are adjacent if they differ by one and only one variable, eg: abc’d is adjacent to abc’d’  The two 1-cells are neighbors Each minterm has n adjacent minterms  Each 1-cell has n neighbors U

8 ProcedureInput: Two sets of F R D 1)Draw K-map. 2)Expand all terms in F to their largest sizes (prime implicants). 3)Choose the essential prime implicants. 4)Try all combinations to find the minimal sum of products. (This is the most difficult step)

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

10 2. Prime Implicants: Largest rectangles that intersect On Set but not Off Set that correspond to product terms.  m (0, 1, 2, 9),  m (0, 2, 8, 10),  m (10, 14) 3. Essential Primes: Prime implicants covering elements in F that are not covered by any other primes.  m (0, 1, 8, 9),  m (0, 2, 8, 10),  m (10, 14) 4. Min exp:  m (0, 1, 8, 9) +  m (0, 2, 8, 10) +  m (10, 14) f(a,b,c,d) = a’b’c’ + abc’ + b’cd (or a’b’d)

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

12 2. Prime Implicants: Largest rectangles that intersect On Set but not Off Set that correspond to product terms. E.g.  m (0, 4),  m (0, 1),  m (1, 3),  m (3, 11),  m (14, 15),  m (11, 15),  m (13, 15) 3. Essential Primes: Prime implicants covering elements in F that are not covered by any other primes. E.g.  m (0, 4),  m (14, 15) 4. Min exp:  m (0, 4),  m (14, 15), (  m (3, 11) or  m (1,3) ) f(a,b,c,d) = a’b’c’ + abc’ + b’cd (or a’b’d)


Download ppt "CS 140 Lecture 4 Professor CK Cheng Tuesday 5/08/02."

Similar presentations


Ads by Google