Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS 140 Lecture 3 Professor CK Cheng Tuesday 4/09/02.

Similar presentations


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

1 CS 140 Lecture 3 Professor CK Cheng Tuesday 4/09/02

2 Part I. Combinational Logic –Implementation K-map

3 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

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

5 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 variable, eg: abc’d is adjacent to abc’d’  The two cells are neighbors Each minterm has n adjacent neighbors  Each cell has n neighbors U

6 Another example – 3 bits Id a b c f (a,b,c,d) 0 0 0 0 1 1 0 0 1 1 2 0 1 0 1 3 0 1 1 0 4 1 0 0 0 5 1 0 1 0 6 1 1 0 0 7 1 1 1 0 f(a, b, c, d) = a’ + bc

7 Corresponding K-map 0 2 6 4 1 3 7 5 b c a 1 1 0 0 1 1 1 0

8 One more 4 bit example: f(a,b,c,d) = a’ + bc 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 1 4 0 1 0 0 1 5 0 1 0 1 1 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 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 1

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

10 Given a K-map, derive a minimal Boolean expression in sum of products form (or product of sums). Obj: minimal # of terms, minimal # of literals. Hints: # of terms => # of rectangles # of literals => inverse of the size of rectangles (if the size of the rectangle is larger, then we can reduce literals) We want to find the minimum number of rectangles in their largest sizes to cover the On Set.

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


Download ppt "CS 140 Lecture 3 Professor CK Cheng Tuesday 4/09/02."

Similar presentations


Ads by Google