Professional Documents
Culture Documents
WK 1 D 2
WK 1 D 2
WK 1 D 2
Boolean algebra g
Boolean Algebra
B={ {0, , 1} } Variables represent 0 or 1 only Operators return 0 or 1 only Basic operators
is logical AND: a AND b returns 1 only when both a=1 and b=1 + is logical OR: a OR b returns 1 if either (or both) a=1 or b=1 is logical NOT: NOT a returns the opposite of a (1 if a=0 a=0, 0 if a=1)
OR
AND x
NOT F
duality: 16. X + Y + ... X Y ... generalized duality: 17. f (X1,X2,...,Xn,0,1,+,) f(X1,X2,...,Xn,1,0,,+) Different Diff t th than d deMorgans M L Law
this is a statement about theorems this is not a way to manipulate (re-write) expressions
6
Proving g theorems
Using the axioms of Boolean algebra:
e.g., g , prove p the theorem:
distributivity (8) p y (5) ( ) complementarity identity (1D)
X Y + X Y = X
X Y + X Y X (Y ( + Y) ) X (1) = X (Y + Y) = X( (1) ) = X9
X+XY
X X X X + XY 1 + XY (1 + Y) (1)
= X
= = = = X X X X 1 + XY (1 + Y) (1) 9
7
(X Y) + (Y Z) + (X Z) identity complementarity distributivity commutativity factoring null identity (X Y) + (1) (Y Z) + (X Z) (X Y) + (X + X) (Y Z) + (X Z) (X Y) + (X Y Z) + (X Y Z) + (X Z) (X Y) + (X Y Z) + (X Y Z) + (X Z) (X Y) (1 + Z) + (X Z) (1 + Y) (X Y) (1) + (X Z) (1) (X Y) + (X Z) 9
8
X 0 0 1 1 X 0 0 1 1
Y 0 1 0 1 Y 0 1 0 1
X X 1 1 0 0 X 1 1 0 0
Y Y 1 0 1 0 Y 1 0 1 0
(X + Y) Y) X X Y Y
(X Y)
X + Y
10
CSE140: Components and Design Techniques for Digital Systems Combinational circuit building blocks: Building gates from transistors
Tajana Simunic Rosing
11
Inverter delay
NOT x F x 0 1 1 F 1 0 1 1 1 1
F = x
0 0 0
12
x 0
F = x
AND/OR gates g
OR/AND are harder to make than NOR/NAND
OR x y x 0 0 1 1 1 y x F F= x or y y x 0 y 0 x 0 0 F 1 x 1 y F=x & y y 0 1 0 1 F 0 1 1 1 F x y x 0 0 1 1 y 0 1 0 1 F 0 0 0 1 1 F AND
14
Completeness p of NAND
Any logic function can be implemented using just NAND gates. Likewise for NOR. Why? g y
Need AND, OR and NOT
15
XOR/XNOR Gates
XOR XNOR
x 0 0 1 1 y 0 1 0 1 F 0 1 1 0 x 0 0 1 1 y 0 1 0 1 F 1 0 0 1
16
N variables
2N rows N 2(2 ) possible functions
24 = 16 possible functions p f3
0 0 1 1
Cost
a
0 0 1 1
b
0 1 0 1
f0
0 0 0 0
f1
0 0 0 1
f2
0 0 1 0
f4
0 1 0 0
f5
0 1 0 1
f6
0 1 1 0
f7
0 1 1 1
f8
1 0 0 0
f9
1 0 0 1
aX XOR b
aN NOR b
a XN NOR b
a (F12) and b (F10): require 2 transistors for an inverter (not gate) a nor b (F4) and a nand b (F14): require 4 transistors a or b (F7) and a and b (F1): require 6 transistors a = b (F9) and a b (F6): require 12 transistors
a NA AND b
aA AND b
a OR b
1 17
Sum 0 1 1 0 1 0 0 1
18
a3 b3 a b ci F A co co s s3
a2 b2 a b ci F A co s s2 (a)
a1 b1 a b ci A F co s s1
a0 b0 ci a b ci A F co s s0
19
two-level realization
21
22
23
CMOS Example p
24
Another example p
25
26
CMOS Example
The rules:
NMOS connects to GND, , PMOS to power p supply pp y Vdd Duality of NMOS and PMOS Rp ~ 2 Rn => PMOS in series is much slower than NMOS in series
27
28
Summary y
What we covered thus far:
Number representations p Switches, MOS transistors, Logic gates Boolean algebra Supplement: NMOS and PMOS transistor characteristics
What is next:
Combinational logic:
Representations Minimization Implementations
29