Download presentation
Presentation is loading. Please wait.
Published byCalvin Wilkins Modified over 6 years ago
1
CSE 140 Lecture 3 Combinational Logic: Implementation
Professor CK Cheng CSE Dept. UC San Diego
2
Part I Combinational Logic.
Specification Implementation K-maps
3
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
4
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
5
Implementation Specification Schematic Diagram Net list, Flow:
Truth Table Karnaugh Map (truth table in two dimensional space) Sum of Products or Product of Sums Schematic Diagram of Two Level Logic
6
Truth Table vs. Karnaugh Map
2-variable function, f(A,B) ID A B f(A,B) f(0,0) 1 f(0,1) 2 f(1,0) 3 f(1,1) A=0 A=1 B=0 f(0,0) f(1,0) B=1 f(0,1) f(1,1)
7
Truth Table An example of 2-variable function, f(A,B) ID A B f(A,B)
minterm 1 A’B 2 AB’ 3 AB
8
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
9
0 1 1 1 f(A,B) = A + B K-Map: Truth Table in 2 Dimensions A = 0 A = 1
B = 0 B = 1 A’B AB f(A,B) = A + B
10
Another Example ID A B f(A,B) minterm 1 A’B 2 3 AB
1 A’B 2 3 AB f(A,B)=A’B+AB=(A’+A)B=B
11
On the K-map: A = A= 1 B= 0 B = 1 A’B AB f(A,B)=B
12
Using Maxterms ID A B f(A,B) Maxterm A+B 1 2 A’+B 3
A+B 1 2 A’+B 3 f(A,B)=(A+B)(A’+B)=(AA’)+B=0+B=B
13
Two Variable K-maps # possible 2-variable functions: iClicker 4 16 32
Id a b f (a, b) f (0, 0) f (0, 1) f (1, 0) f (1, 1) # possible 2-variable functions: iClicker 4 16 32 81 None of the above f(a,b) a b
14
Two Variable K-maps # possible 2-variable functions:
Id a b f (a, b) f (0, 0) f (0, 1) f (1, 0) 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)
15
Two-Input Logic Gates
16
More Two-Input Logic Gates
17
Representation of k-Variable Func.
Boolean Expression Truth Table Cube K Map Binary Decision Diagram (0,1,1,0) (0,1,1,1) (1,1,1,0) (1,1,1,1) B (0,0,1,0) (0,0,1,1) (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)
18
Truth Table vs. Karnaught Map
3-variable function, f(A,B,C) ID A B C f(A,B,C) f(0,0,0) 1 f(0,0,1) 2 f(0,1,0) 3 f(0,1,1) 4 f(1,0,0) 5 f(1,0,1) 6 f(1,1,0) 7 f(1,1,1) (A,B) (0,0) (0,1) (1,1) (1,0) C=0 f(0,0,0) f(0,1,0) f(1,1,0) f(1,0,0) C=1 f(0,0,1) f(0,1,1) f(1,1,1) f(1,0,1)
19
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
20
(0,0) (0,1) (1,1) (1,0) 1 1 1 1 0 0 0 0 Corresponding K-map b = 1
Gray code (0,0) (0,1) (1,1) (1,0) c = 0 c = 1 a = 1 f(a,b,c) = c’
21
Karnaugh Maps (K-Maps)
Boolean expressions can be minimized by combining terms K-maps minimize equations graphically
22
K-map Circle 1’s in adjacent squares
Find rectangles which correspond to product terms in Boolean expression y(A,B)=A’B’C’+A’B’C= A’B’(C’+C)=A’B’
23
Another 3-Input example
Id a b c f (a,b,c)
24
(0,0) (0,1) (1,1) (1,0) 0 1 - 1 0 0 1 1 Corresponding K-map b = 1
(0,0) (0,1) (1,1) (1,0) c = 0 c = 1 a = 1 f(a,b,c) = a + bc’
25
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 -
26
(0,0) (0,1) (1,1) (1,0) 1 - 0 1 1 0 0 1 Corresponding K-map b = 1
(0,0) (0,1) (1,1) (1,0) c = 0 c = 1 a = 1 f(a,b,c) = b’
27
Karnaugh Maps (K-Maps)
Consensus Theorem: A’B+AC+BC=A’B+AC
28
4-input K-map
29
4-input K-map
30
4-input K-map
31
K-maps with Don’t Cares
32
K-maps with Don’t Cares
33
K-maps with Don’t Cares
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.