Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSE 140 Lecture 4 Combinational Logic: K-Map

Similar presentations


Presentation on theme: "CSE 140 Lecture 4 Combinational Logic: K-Map"— Presentation transcript:

1 CSE 140 Lecture 4 Combinational Logic: K-Map
Professor CK Cheng CSE Dept. UC San Diego

2 Part I. Combinational Logic
Implementation K-map

3 4-Variable K-Maps: An example f(a,b,c,d)
Id a b c d f (a,b,c,d)

4 4-Variable K-Maps: An example f(a,b,c,d)
Id a b c d f (a,b,c,d) iClicker: f(a,b,c,d)= ab b’ a’ c b

5 Corresponding K-map 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 b d c a
d c a f (a, b, c, d) =

6 Another example w/ 4 bits:
Id a b c d f (a,b,c,d)

7 Corresponding 4-variable K-map
d c a f (a, b, c, d) = b’c’ + b’d’ + x

8 Corresponding 4-variable K-map
iClicker x= abcd’ abd’ acd’ bcd’ f (a, b, c, d) = b’c’ + b’d’ + x

9 Boolean Expression K-Map
Variable xi and its compliment xi’ Two half planes Rxi, and Rxi’ Product term P (Pxi* e.g. b’c’) Intersect of Rxi* for all i in P e.g. Rb’ intersect Rc’ Each minterm One element cell Two minterms are adjacent iff they differ by one and only one variable, eg: abc’d, abc’d’ The two cells are neighbors Each minterm has n adjacent minterms Each cell has n neighbors

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

11 4-input K-map

12 4-input K-map

13 K-maps with Don’t Cares

14 K-maps with Don’t Cares

15 1 0 0 1 1 0 0 - 0 0 0 0 1 0 1 - Example Given F = Sm (0, 1, 2, 8, 14)
D = Sm (9, 10) 1. Draw K-map b d c a

16 2. Prime Implicants: Largest rectangles that intersect on-setF but
2. Prime Implicants: Largest rectangles that intersect on-setF but not off-set R and that correspond to product terms. Sm (0, 1, 8, 9), Sm (0, 2, 8, 10), Sm (10, 14) 3. Essential Primes: Prime implicants covering elements in F that are not covered by any other primes. 4. Min exp: Sm (0, 1, 8, 9) + Sm (0, 2, 8, 10) + Sm (10, 14) f(a,b,c,d) = b’c’ + b’d’+ acd’

17 Another example Given F = Sm (0, 3, 4, 14, 15) D = Sm (1, 11, 13) 1. Draw K-map b d c a

18 2. Prime Implicants: Largest rectangles that intersect on-set F but
2. Prime Implicants: Largest rectangles that intersect on-set F but not off-set R and that correspond to product terms. E.g. Sm (0, 4), Sm (0, 1), Sm (1, 3), Sm (3, 11), Sm (14, 15), Sm (11, 15), Sm (13, 15) 3. Essential Primes: Prime implicants covering elements in F that are not covered by any other primes. E.g. Sm (0, 4), Sm (14, 15) 4. Min exp: Sm (0, 4), Sm (14, 15), ( Sm (3, 11) or Sm (1,3) ) f(a,b,c,d) = a’c’d’+ abc+ b’cd (or a’b’d)

19 iClicker We have prime implicants: ∑m(0,2), ∑m(2,6), ∑m(6,7), ∑m(5,7).
(a,b) (0,0) (0,1) (1,1) (1,0) c=0 1 - c=1 We have prime implicants: ∑m(0,2), ∑m(2,6), ∑m(6,7), ∑m(5,7). Is prime implicant ∑m(2, 6) essential? Yes No


Download ppt "CSE 140 Lecture 4 Combinational Logic: K-Map"

Similar presentations


Ads by Google