1 / 16

CS 140 Lecture 4 Combinational Logic: K-Map

CS 140 Lecture 4 Combinational Logic: K-Map. Professor CK Cheng CSE Dept. UC San Diego. Part I. Combinational Logic Implementation K-map. Id a b c d f (a,b,c,d) 0 0 0 0 0 0 1 0 0 0 1 0 2 0 0 1 0 1

vui
Download Presentation

CS 140 Lecture 4 Combinational Logic: K-Map

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

  2. Part I. Combinational Logic • Implementation • K-map

  3. Id a b c d f (a,b,c,d) 0 0 0 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-variable K-maps

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

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

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

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

  8. 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)

  9. 4-input K-map

  10. 4-input K-map

  11. K-maps with Don’t Cares

  12. K-maps with Don’t Cares

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

  14. 2. Prime Implicants: Largest rectangles that intersect On Set but not Off Set that correspond to product terms. Sm (0, 1, 2, 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. Sm (0, 1, 8, 9), Sm (0, 2, 8, 10), Sm (10, 14) 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’

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

  16. 2. Prime Implicants: Largest rectangles that intersect On Set but not Off Set 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)

More Related