1 / 15

CS 140 Lecture 2 Combinational Logic

This lecture covers the specification, implementation, and optimization of combinational logic circuits using truth tables, minterms, maxterms, and Karnaugh maps.

donnanoble
Download Presentation

CS 140 Lecture 2 Combinational Logic

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 2 Combinational Logic CK Cheng 4/04/02

  2. I. Combinational Logic1. Specification Keywords: Truth Table Minterm a * b * c Maxterm a + b + c Some Identities: x * 0 = 0 x + 0 = x x * 1 = x x + 1 = 1

  3. Example Id a b c a’bc a+b’+c 0 0 0 0 0 1 1 0 0 1 0 1 2 0 1 0 0 0 3 0 1 1 1 1 4 1 0 0 0 1 5 1 0 1 0 1 6 1 1 0 0 1 7 1 1 1 0 1

  4. Incompletely Specified Function Id a b f (a, b) 0 0 0 1 1 0 1 0 2 1 0 1 3 1 1 - • The input does not happen. • The input happens, but the output is ignored. If it is not specified, it gives us flexibility to optimize the logic. • Examples: • Decimal number 0… 9 uses 4 bits. (1,1,1,1) does not happen. • If addition overflows, we don’t care about the sum.

  5. There are three sets On Set F = Sm (1) Off Set R = Sm(0,2) Don’t Care Set D = Sm(3) Definitions: Literals xi or xi’ Product Term x2x1’x0 Sum Term x2 + x1’ + x0 Minterm of n variables: A product of n variables which every variable appears exactly once. Maxterm of n variables Obj: minimize (1) number of terms, (2) number of literals.

  6. II. Implementation Karnaugh map – 2D table Id a b f (a, b) 0 0 0 0 1 0 1 1 2 1 0 1 3 1 1 1 Determines row a = 0 a = 1 0 2 0 1 1 1 b = 0 b = 1 1 3 Determines column

  7. Function can be represented by sum of minterms: f(a,b) = a’b + ab’ + ab We want to minimize the number of literals and terms however. We factor out common terms – ab’ + ab = a(b’+b) = a * 1 = a a + a = a ab + ab = ab f(a,b) = a + b

  8. On the K-map however: a = 0 a = 1 ab’ 0 2 0 1 1 1 b = 0 b = 1 1 3 a’b ab

  9. Two variable K-maps Id a b f (a, b) 0 0 0 f (0, 0) 1 0 1 f (0, 1) 2 1 0 f (1, 0) 3 1 1 f (1, 1) 2 variables means we have 22 entries and thus we have 2 to the 22 possible functions for 2 bits. a b f(a,b)

  10. All possible 2 variable functions 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 b b b b b b b b b b b b b b b b a a a a 0 0 0 1 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 1 1 1 0 0 1 0 1 0 0 1 0 0 1 1 1 0 0 1 1 0 1 0 0 1 0 1 0 1 1 1 1 1 0 1 1 1 1 0 1 1 1 1 0 1

  11. K-maps and Corresponding functions 0 2 0 2 0 2 0 2 1 3 1 3 1 3 1 3 b b b a 0 1 0 1 f(a,b) = ab’ + ab = a b 1 0 1 1 f(a,b) = a’b + ab 1 0 1 0 f(a,b) = a’b + a’b’ = a’ 1 1 0 0 f(a,b) = b’a’ + b’a = b’

  12. Three variables K-maps Id a b c f (a,b,c,d) 0 0 0 0 0 1 0 0 1 1 2 0 1 0 1 3 0 1 1 - 4 1 0 0 0 5 1 0 1 0 6 1 1 0 1 7 1 1 1 1

  13. Corresponding K-map b = 1 Gray code (a,b) (0,0) (0,1) (1,0) (1,0) 0 2 6 4 c = 0 0 1 1 0 1 3 7 5 c = 1 1 - 1 0 a = 1 f(a,b,c) = a’b’c + a’bc’ + abc’ + abc + a’bc = a’bc + b = a’c + b

  14. Another example in reverse direction f(a,b,c) = a’c Id a b c a’c 0 0 0 0 0 1 0 0 1 1 2 0 1 0 0 3 0 1 1 1 4 1 0 0 0 5 1 0 1 0 6 1 1 0 0 7 1 1 1 0

  15. Corresponding K-map b 0 2 6 4 0 0 0 0 1 3 7 5 c 1 1 0 0 a a’c This rectangle correpsonds to the case where a is 0 and c is 1.

More Related