Professional Documents
Culture Documents
DDCA Ch1
DDCA Ch1
Copyright 2007
1-<1>
Chapter 1 :: Topics
Background
The Game Plan
The Art of Managing Complexity
The Digital Abstraction
Number Systems
Logic Gates
Logic Levels
CMOS Transistors
Power Consumption
Copyright 2007
1-<2>
Background
Microprocessors have revolutionized our world
Cell phones, Internet, rapid advances in medicine, etc.
Copyright 2007
1-<3>
Copyright 2007
1-<4>
Copyright 2007
1-<5>
Abstraction
Copyright 2007
Application
Software
programs
Operating
Systems
device drivers
Architecture
instructions
registers
Microarchitecture
datapaths
controllers
Logic
adders
memories
Digital
Circuits
AND gates
NOT gates
Analog
Circuits
amplifiers
filters
Devices
transistors
diodes
Physics
electrons
1-<6>
Discipline
1-<7>
Hierarchy
A system divided into modules and submodules
Modularity
Having well-defined functions and interfaces
Regularity
Encouraging uniformity, so modules can be easily
reused
Copyright 2007
1-<8>
Hierarchy
Three main modules:
lock, stock, and
barrel
Submodules of lock:
hammer, flint,
frizzen, etc.
Copyright 2007
1-<9>
Modularity
Function of stock:
mount barrel and
lock
Interface of stock:
length and location
of mounting pins
Regularity
Interchangeable
parts
Copyright 2007
1-<10>
Copyright 2007
1-<11>
1-<12>
Copyright 2007
1-<13>
Copyright 2007
1-<14>
Number Systems
Decimal numbers
1's column
10's column
100's column
1000's column
537410 =
Binary numbers
1's column
2's column
4's column
8's column
11012 =
1-<15>
Copyright 2007
Number Systems
Decimal numbers
1's column
10's column
100's column
1000's column
three
hundreds
seven
tens
four
ones
Binary numbers
1's column
2's column
4's column
8's column
11012 = 1 23 + 1 22 + 0 21 + 1 20 = 1310
one
eight
Copyright 2007
one
four
no
two
one
one
1-<16>
Powers of Two
20 =
21 =
22 =
23 =
24 =
25 =
26 =
27 =
Copyright 2007
28 =
29 =
210 =
211 =
212 =
213 =
214 =
215 =
1-<17>
Powers of Two
28 = 256
20 = 1
21 = 2
29 = 512
22 = 4
210 = 1024
23 = 8
211 = 2048
24 = 16
212 = 4096
25 = 32
213 = 8192
26 = 64
214 = 16384
27 = 128
215 = 32768
Handy to memorize up to 29
Copyright 2007
1-<18>
Number Conversion
Copyright 2007
1-<19>
Number Conversion
Copyright 2007
1-<20>
Copyright 2007
1-<21>
Hexadecimal Numbers
Hex Digit
Decimal Equivalent
10
11
12
13
14
15
Copyright 2007
Binary Equivalent
1-<22>
Hexadecimal Numbers
Hex Digit
Decimal Equivalent
Binary Equivalent
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
10
1010
11
1011
12
1100
13
1101
14
1110
15
1111
Copyright 2007
1-<23>
Hexadecimal Numbers
Base 16
Shorthand to write long binary numbers
Copyright 2007
1-<24>
Copyright 2007
1-<25>
Copyright 2007
1-<26>
Bits
10010110
most
significant
bit
least
significant
bit
byte
10010110
nibble
Bytes
CEBF9AD7
most
significant
byte
Copyright 2007
least
significant
byte
1-<27>
Powers of Two
210 = 1 kilo
220 = 1 mega
230 = 1 giga
Copyright 2007
1000 (1024)
1 million (1,048,576)
1 billion (1,073,741,824)
1-<28>
Copyright 2007
1-<29>
Copyright 2007
1-<30>
Addition
Decimal
Binary
Copyright 2007
11
3734
+ 5168
8902
carries
11
1011
+ 0011
1110
carries
1-<31>
1001
+ 0101
1011
+ 0110
1-<32>
1
1001
+ 0101
1110
111
1011
+ 0110
10001
Overflow!
Copyright 2007
1-<33>
Overflow
Copyright 2007
1-<34>
Sign/Magnitude Numbers
Twos Complement Numbers
Copyright 2007
1-<35>
Sign/Magnitude Numbers
1 sign bit, N-1 magnitude bits
Sign bit is the most significant (left-most) bit
Positive number: sign bit = 0
Negative number: sign bit = 1
A : a N 1 , a N 2 ,L a2 , a1 , a0
A ( 1)
an 1
n 2
i
a
2
i
i 0
1-<36>
Sign/Magnitude Numbers
1 sign bit, N-1 magnitude bits
Sign bit is the most significant (left-most) bit
Positive number: sign bit = 0
Negative number: sign bit = 1
A : a N 1 , a N 2 ,L a2 , a1 , a0
A ( 1)
an 1
n 2
i
a
2
i
i 0
Copyright 2007
1-<37>
Sign/Magnitude Numbers
Problems:
Addition doesnt work, for example -6 + 6:
1110
+ 0110
10100 (wrong!)
Two representations of 0 ( 0):
1000
0000
Copyright 2007
1-<38>
Copyright 2007
1-<39>
A an 1 2n 1 ai 2i
i 0
1-<40>
A an 1 2n 1 ai 2i
i 0
1-<41>
Copyright 2007
1-<42>
Copyright 2007
1-<43>
Copyright 2007
1-<44>
1-<45>
1110
+ 0011
Copyright 2007
1-<46>
Copyright 2007
1110
+ 0011
10001
1-<47>
Sign-extension
Zero-extension
Copyright 2007
1-<48>
Sign-Extension
Example 1:
Example 2:
Copyright 2007
1-<49>
Zero-Extension
Example 1:
Example 2:
Copyright 2007
1-<50>
Range
Unsigned
[0, 2N-1]
Sign/Magnitude
[-(2N-1-1), 2N-1-1]
Twos Complement
[-2N-1, 2N-1-1]
-7
-6
-5
-4
-3
-2
-1
Unsigned
Copyright 2007
10
11
12
13
14
15
0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111
1000 1001 1010 1011 1100 1101 1110 1111 0000 0001 0010 0011 0100 0101 0110 0111
0000
0001 0010 0011 0100 0101 0110 0111
1000
Two's Complement
Sign/Magnitude
1-<51>
Logic Gates
Perform logic functions:
inversion (NOT), AND, OR, NAND, NOR, etc.
Single-input:
NOT gate, buffer
Two-input:
AND, OR, XOR, NAND, NOR, XNOR
Multiple-input
Copyright 2007
1-<52>
NOT
A
Copyright 2007
Y
Y=A
Y=A
A
0
1
Y
1
0
A
0
1
Y
0
1
1-<53>
NOT
A
Copyright 2007
Y
Y=A
Y=A
A
0
1
Y
1
0
A
0
1
Y
0
1
1-<54>
AND
A
B
A
B
Y=A+B
Y = AB
A
0
0
1
1
B
0
1
0
1
Copyright 2007
Y
0
0
0
1
A
0
0
1
1
B
0
1
0
1
Y
0
1
1
1
1-<55>
AND
A
B
A
B
Y=A+B
Y = AB
A
0
0
1
1
B
0
1
0
1
Copyright 2007
Y
0
0
0
1
A
0
0
1
1
B
0
1
0
1
Y
0
1
1
1
1-<56>
NAND
A
B
Y
Y=A+B
A
0
0
1
1
B
0
1
0
1
NOR
Y
Y = AB
Y
0
1
1
0
Copyright 2007
A
0
0
1
1
B
0
1
0
1
A
B
XNOR
Y
Y=A+B
Y
1
1
1
0
A
0
0
1
1
B
0
1
0
1
A
B
Y
Y=A+B
Y
1
0
0
0
A
0
0
1
1
B
0
1
0
1
1-<57>
NAND
A
B
Y
Y=A+B
A
0
0
1
1
B
0
1
0
1
NOR
Y
Y = AB
Y
0
1
1
0
Copyright 2007
A
0
0
1
1
B
0
1
0
1
A
B
XNOR
Y
Y=A+B
Y
1
1
1
0
A
0
0
1
1
B
0
1
0
1
A
B
Y
Y=A+B
Y
1
0
0
0
A
0
0
1
1
B
0
1
0
1
1-<58>
Y
1
0
0
1
NOR3
A
B
C
Y
Y = A+B+C
A
0
0
0
0
1
1
1
1
B
0
0
1
1
0
0
1
1
C
0
1
0
1
0
1
0
1
Copyright 2007
A
B
C
D
Y = ABCD
1-<59>
NOR3
A
B
C
Y
Y = A+B+C
A
0
0
0
0
1
1
1
1
B
0
0
1
1
0
0
1
1
C
0
1
0
1
0
1
0
1
Y
1
0
0
0
0
0
0
0
A
B
C
D
Y = ABCD
A
0
0
0
0
1
1
1
1
B
0
0
1
1
0
0
1
1
C
0
1
0
1
0
1
0
1
Y
0
0
0
0
0
0
0
1
Copyright 2007
1-<60>
Logic Levels
Define discrete voltages to represent 1 and 0
For example, we could define:
0 to be ground or 0 volts
1 to be VDD or 5 volts
Copyright 2007
1-<61>
Logic Levels
Define a range of voltages to represent 1 and 0
Define different ranges for outputs and inputs to
allow for noise in the system
What is noise?
Copyright 2007
1-<62>
Logic Levels
Define a range of voltages to represent 1 and 0
Define different ranges for outputs and inputs to
allow for noise in the system
Copyright 2007
1-<63>
What is Noise?
Copyright 2007
1-<64>
What is Noise?
Anything that degrades the signal
E.g., resistance, power supply noise, coupling to
neighboring wires, etc.
Copyright 2007
Receiver
4.5 V
1-<65>
Copyright 2007
1-<66>
Logic Levels
Driver
Receiver
Output Characteristics
Logic High
Output Range
VO H
VDD
Input Characteristics
Logic High
Input Range
NMH
Forbidden
Zone
VO L
Logic Low
Output Range
NML
VIH
VIL
Logic Low
Input Range
GND
Copyright 2007
1-<67>
Noise Margins
Driver
Receiver
Output Characteristics
Logic High
Output Range
VO H
VDD
Input Characteristics
Logic High
Input Range
NMH
Forbidden
Zone
VO L
Logic Low
Output Range
NML
VIH
VIL
Logic Low
Input Range
GND
1-<68>
DC Transfer Characteristics
Ideal Buffer:
V(Y)
Real Buffer:
A
V(Y)
VDD
VOH
VOH VDD
Unity Gain
Points
Slope = 1
VOL
VOL 0
V(A)
VDD / 2
VDD
V(A)
0
VIL VIH
VDD
VIL, VIH
DC Transfer Characteristics
A
V(Y)
Output Characteristics
VDD
VOH
VO H
VDD
Input Characteristics
NMH
Forbidden
Zone
Unity Gain
Points
Slope = 1
VOL
V(A)
0
VIL
VIH
Copyright 2007
VDD
VO L
NML
GND
1-<70>
VIH
VIL
VDD Scaling
Chips in the 1970s and 1980s were designed
using VDD = 5 V
As technology improved, VDD dropped
Avoid frying tiny transistors
Save power
1-<71>
Logic Family
VDD
VIL
VIH
VOL
VOH
TTL
2.0
0.4
2.4
CMOS
5 (4.5 - 6)
1.35
3.15
0.33
3.84
LVTTL
3.3 (3 - 3.6)
0.8
2.0
0.4
2.4
LVCMOS
3.3 (3 - 3.6)
0.9
1.8
0.36
2.7
Copyright 2007
1-<72>
Transistors
Logic gates are usually built out of transistors
Transistor is a three-ported voltage-controlled switch
Two of the ports are connected depending on the voltage
on the third port
For example, in the switch below the two terminals (d and
s) are connected (ON) only when the third terminal (g) is 1
d
g=0
g=1
ON
OFF
s
Copyright 2007
1-<73>
Copyright 2007
1-<74>
Silicon
Transistors are built out of silicon, a semiconductor
Pure silicon is a poor conductor (no free charges)
Doped silicon is a good conductor (free charges)
n-type (free negative charges, electrons)
p-type (free positive charges, holes)
Free electron
Si
Si
Si
Si
Si
Si
Si
Si
Si
Si
Si
Si
Si
Silicon Lattice
Copyright 2007
Free hole
Si
Si
Si
As
Si
Si
Si
Si
Si
Si
n-Type
+
-
Si
Si
Si
p-Type
1-<75>
MOS Transistors
Metal oxide silicon (MOS) transistors:
Polysilicon (used to be metal) gate
Oxide (silicon dioxide) insulator
Doped silicon
source
gate
drain
Polysilicon
SiO2
n
p
substrate
gate
source
Copyright 2007
drain
nMOS
1-<76>
Transistors: nMOS
Gate = 0, so it is OFF
Gate = 1, so it is ON
(no connection between (channel between
source and drain)
source and drain)
source
drain
source
gate
gate
VDD
drain
GND
n
p
GND
Copyright 2007
substrate
+++++++
------channel
p
n
substrate
GND
1-<77>
Transistors: pMOS
pMOS transistor is just the opposite
ON when Gate = 0
OFF when Gate = 1
source
gate
drain
Polysilicon
SiO2
p
n
substrate
gate
source
Copyright 2007
drain
1-<78>
Transistor Function
g=0
d
nMOS
pMOS
g=1
d
OFF
ON
OFF
ON
d
Copyright 2007
1-<79>
Transistor Function
nMOS transistors pass good 0s, so connect source
to GND
pMOS transistors pass good 1s, so connect source
to VDD
pMOS
pull-up
network
inputs
output
nMOS
pull-down
network
Copyright 2007
1-<80>
VDD
Y
Y=A
A
0
1
Y
1
0
P1
Y
N1
GND
P1
N1
0
1
Copyright 2007
1-<81>
VDD
Y
Y=A
A
0
1
Y
1
0
P1
Y
N1
GND
P1
N1
ON
OFF
OFF
ON
Copyright 2007
1-<82>
P2
Y
Y = AB
A
0
0
1
1
B
0
1
0
1
Y
1
1
1
0
A B P1
P1
N1
N2
P2
N1
N2
0 0
0 1
1 0
1 1
Copyright 2007
1-<83>
P2
Y
Y = AB
A
0
0
1
1
B
0
1
0
1
Y
1
1
1
0
P1
N1
N2
A B P1
P2
N1
0 0 ON
ON
OFF OFF 1
0 1 ON
OFF OFF ON
1 0 OFF ON
ON
1 1 OFF OFF ON
Copyright 2007
N2
Y
1
OFF 1
ON
1-<84>
pMOS
pull-up
network
inputs
output
nMOS
pull-down
network
Copyright 2007
1-<85>
NOR Gate
Copyright 2007
1-<86>
NOR3 Gate
A
B
C
Y
Copyright 2007
1-<87>
Copyright 2007
1-<88>
A
B
Copyright 2007
1-<89>
Transmission Gates
nMOS pass 1s poorly
pMOS pass 0s poorly
Transmission gate is a better switch
EN
A
EN
EN = 0 and A is connected to B
Copyright 2007
1-<90>
Pseudo-nMOS Gates
nMOS gates replace the pull-up network with a
weak pMOS transistor that is always on
The pMOS transistor is called weak because it
pulls the output HIGH only when the nMOS
network is not pulling it LOW
weak
Y
inputs
Copyright 2007
nMOS
pull-down
network
1-<91>
Pseudo-nMOS Example
Pseudo-nMOS NOR4
weak
Y
A
Copyright 2007
1-<92>
1-<93>
Moores Law
Copyright 2007
1-<94>
Power Consumption
Power = Energy consumed per unit time
Two types of power consumption:
Dynamic power consumption
Static power consumption
Copyright 2007
1-<95>
1-<96>
Copyright 2007
1-<97>
VDD = 1.2 V
C = 20 nF
f = 1 GHz
IDD = 20 mA
Copyright 2007
1-<98>
VDD = 1.2 V
C = 20 nF
f = 1 GHz
IDD = 20 mA
P = CVDD2f + IDDVDD
= (20 nF)(1.2 V)2(1 GHz) +
(20 mA)(1.2 V)
= 14.4 W
Copyright 2007
1-<99>