1 / 28

280 likes | 421 Views

CS 140 Lecture 3 Combinational Logic . Professor CK Cheng CSE Dept. UC San Diego. Part I Combinational Logic. Specification Implementation K-maps. Definitions. Literals x i or x i ’ Product Term x 2 x 1 ’x 0 Sum Term x 2 + x 1 ’ + x 0

Download Presentation
## CS 140 Lecture 3 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

**CS 140 Lecture 3Combinational Logic**Professor CK Cheng CSE Dept. UC San Diego**Part I Combinational Logic.**• Specification • Implementation • K-maps**Definitions**Literals xi or xi’ Product Term x2x1’x0 Sum Term x2 + x1’ + x0 Minterm of n variables: A product of n literals in which every variable appears exactly once. Maxterm of n variables: A sum of n literals in which every variable appears exactly once.**Implementation**Specification Schematic Diagram Net list, Switching expression Obj min cost Search in solution space (max performance) Cost: wires, gates Literals, product terms, sum terms We want to minimize # of terms, # of literals**Implementation (Optimization)**An example of 2-variable function f(A,B)**Function can be represented by sum of minterms:**f(A,B) = A’B+AB’+AB This is not optimal however! We want to minimize the number of literals and terms. We factor out common terms – A’B+AB’+AB= A’B+AB’+AB+AB =(A’+A)B+A(B’+B)=B+A Hence, we have f(A,B) = A+B**K-Map: Truth Table in 2 Dimensions**A = 0 A = 1 AB’ 0 2 0 1 1 1 B = 0 B = 1 1 3 A’B AB f(A,B) = A + B**Another Example**f(A,B)=A’B+AB=(A’+A)B=B**On the K-map:**A = 0 A= 1 0 2 0 0 1 1 B= 0 B = 1 1 3 AB A’B f(A,B)=B**Using Maxterms**f(A,B)=(A+B)(A’+B)=(AA’)+B=0+B=B**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) # possible 2-variable functions: For 2 variables as inputs, we have 4=22 entries. Each entry can be 0 or 1. Thus we have 16=24 possible functions. a b f(a,b)**Representation of k-Variable Func.**(0,1,1,0) (0,1,1,1) (1,1,1,0) (1,1,1,1) • Boolean Expression • Truth Table • Cube • K Map • Binary Decision Diagram B (0,0,1,1) (0,0,1,0) (1,0,1,0) (1,0,1,1) C (0,1,0,1) (1,1,0,1) D (0,0,0,0) (0,0,0,1) (1,0,0,0) (1,0,0,1) A A cube of 4 variables: (A,B,C,D)**Three-Variable K-Map**Id a b c f (a,b,c) 0 0 0 0 1 1 0 0 1 0 2 0 1 0 1 3 0 1 1 0 4 1 0 0 1 5 1 0 1 0 6 1 1 0 1 7 1 1 1 0**Corresponding K-map**b = 1 Gray code (0,0) (0,1) (1,1) (1,0) 0 2 6 4 c = 0 1 1 1 1 1 3 7 5 c = 1 0 0 0 0 a = 1 f(a,b,c) = c’**Karnaugh Maps (K-Maps)**• Boolean expressions can be minimized by combining terms • K-maps minimize equations graphically**K-map**• Circle 1’s in adjacent squares • In the Boolean expression, include only the literals whose true y(A,B)=A’B’C’+A’B’C= A’B’(C’+C)=A’B’**Another 3-Input example**Id a b c f (a,b,c) 0 0 0 0 0 1 0 0 1 0 2 0 1 0 1 3 0 1 1 0 4 1 0 0 1 5 1 0 1 1 6 1 1 0 - 7 1 1 1 1**Corresponding K-map**b = 1 (0,0) (0,1) (1,1) (1,0) 0 2 6 4 c = 0 0 1 - 1 1 3 7 5 c = 1 0 0 1 1 a = 1 f(a,b,c) = a + bc’**Yet another example**Id a b c f (a,b,c,d) 0 0 0 0 1 1 0 0 1 1 2 0 1 0 - 3 0 1 1 0 4 1 0 0 1 5 1 0 1 1 6 1 1 0 0 7 1 1 1 0**Corresponding K-map**b = 1 (0,0) (0,1) (1,1) (1,0) 0 2 6 4 c = 0 1 - 0 1 1 3 7 5 c = 1 1 0 0 1 a = 1 f(a,b,c) = b’

More Related