CS 140 Lecture 4 Professor CK Cheng 4/11/02
Part I. Combinational Logic Implementation K-Map Given F R D Obj: Minimize sum of products Proc: Draw K-Map Derive prime implicants Derive the essential prime implicants Derive minimum expression
Example Given F = m (0, 3, 4, 14, 15) D = m (1, 11, 13) K-map b c a d
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) Essential Primes: Prime implicants covering elements in F that are not covered by any other primes. E.g. m (0, 4), m (14, 15) 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)
Corresponding circuit f(a,b,c,d) a’ c’ d’ a b c b’ c d
Another example Given F = m (3, 5), D = m (0, 4) b c a Primes: m (3), m (4, 5) Essential Primes: m (3), m (4, 5) Min exp: f(a,b,c) = a’bc + ab’
5 variable K-map c d b e c d b e a Neighbors of 5 are: 1, 4, 13, 7, and 21 Neighbors of 10 are: 2, 8, 10,14, and 26
6 variable K-map d e c f d e c d e c f d e c a b f f
Min product of sums Given F = m (3, 5), D = m (0, 4) b c a Prime Implicates: M (0,1), M (0,2,4,6), M (6,7) Essential Primes Implicates: M (0,1), M (0,2,4,6), M (6,7) Min exp: f(a,b,c) = (a+b)(c )(a’+b’)
Corresponding Circuit a b a’ b’ c f(a,b,c,d)
Another min product of sums example Given F = m (0, 3, 4, 14, 15) D = m (1, 11, 13) K-map b c a d
Prime Implicates: M (2,6), M (2,10), M (1,5,9,13), M (5,7), M (6,7), M (8,9,10,11), M (8,9,12,13) Essential Primes: M (8,9,12,13) Min exp: M (8,9,12,13) M (5,7), M (2,6), M (8,9,10,11) or M (6,7), M (1,5,9,13), M (2,10) f(a,b,c,d) = (a+b’+d’)(a’+c’+d)(a’+b)(a’+c)