Professional Documents
Culture Documents
2 CMOSLogic
2 CMOSLogic
voltages...
Digital Representation
Example: representing a B&W picture: Black = 0 V White = 1 V 80% grey = 0.8 V ... Represent by scanning picture in xed order. Let's try doing some computation with the voltages...
Digital Representation
Flip image:
Flip back and forth...
Logic Levels
0V
"unknown"
3.3V
5V
Combinational Devices
A combinational device: Output is a function of inputs only ("memoryless") Takes input to valid, stable outputs Combinational devices restore marginally valid signals!
valid input logic 0 0V valid input logic 1 3.3V
noise margin
Example
Input: logic 0 if O utput logic 0
if 1
3.3V
Vil
Vout
Vol
0V 3.3V
Vin
Digital View
If input is 0 , output is 1 If input is 1, output is 0
In 0 1
O ut 1 0
Im p le m e n t a t io n : S w itc h in g N e t w o rks
Ntransistor
a
Connect a and b if g = 0.
Connect a and b if g = 1.
in
in out
out 1 0
0 1
GND
a
a
b out 0 0 1 1 1 1 1 0
0
out
1 0
b
GND
a
a out
b out 0 0 1 1 1 0 0 0
0 1 0 1
GND
AND:
=
OR:
=
Logic Equations
AND:
OR: NOT:
out = a + b out = a b
out = in out = in
Logic Equations
Fun with identities:
a+a=1 a+0=a a+1=1
Write down function: Two 1-bit inputs, a and b Two 1-bit outputs, sum and carry Truth-table: a 0 1 0 1 b carry sum 0 0 0 0 0 1 1 0 1 1 1 0
ab+ab
a b
ab
+2
carry
a b a b
ab
+3 +3
ab + ab
+5
sum
ab
Numbers indicate the number of sequential steps from input to output (worst-case).