The Role of Arithmetic: EE 486 Winter 02-03
The Role of Arithmetic: EE 486 Winter 02-03
Winter 02-03
Stanford University
Stanford University
SIA Roadmap - 1
Total Transistors per Chip
Frequency (in MHz)
25000
No. of Transistors (in million)
SIA Roadmap - 2
On-Chip Clocks
16000 14000 12000 10000 8000 6000 4000 2000 0 180nm 2001 130nm 2003 100nm 2005 70nm 2008 50nm 2011 35nm 2014
20000 15000 10000 5000 0 180nm 2001 130nm 2003 100nm 2005 70nm 2008 50nm 2011 35nm 2014
Stanford University
Stanford University
Stanford University
M J Flynn
EE 486
Winter 02-03
The integers
Weighted positional number system (wpns)
Non redundant and redundant forms X = d00 + d11 + + dn-1 n-1 where is the radix and {di} is the digit set If number of symbols in digit set {di} = then we have non redundant system If number of symbols in digit set {di} > then we have redundant system
The integers
In general redundant numbers can offer some advantages, such as carry free addition. The Roman Numeral system is a redundant system if one allows for the use of improper forms. The only redundant system of interest to us is the signed digit system (sds) which well consider later.
Computer Architecture & Arithmetic Group 8 Stanford University
Stanford University
bn
10
Stanford University
0 Negative nos.
0 is min
12
Stanford University
M J Flynn
EE 486
Winter 02-03
14
Stanford University
Overflow detection
Cout Overflow 0 0 1 1 0 1 no yes no yes no, x>y no, y>x
Computer Architecture & Arithmetic Group 16 Stanford University
x
Signs +=0 -=1
Cin signs 0 0 0 0 1 1
15
0 0 1 1 1 1
0 0 1 1 0 0
0 1 1 0 0 1
Stanford University
V Y
Computer Architecture & Arithmetic Group 17 Stanford University Computer Architecture & Arithmetic Group
X
18
Sign of X
Stanford University
M J Flynn
EE 486
Winter 02-03
19
Stanford University
20
Stanford University
Integer multiply
n bits x n bits = 2n bits unsigned In s + m product is 2n-1 bits In 2s complement 2n is representable in n bits but the product 2n x 2n is not representable in 2n-1 bits
n ALU
RR correction Corrected result
Computer Architecture & Arithmetic Group 21 Stanford University
22
Stanford University
Division
x/y= q + r/y; any (q,r) satisfies this, so the division result has many correct results. : s signed division: select q so that the quotient is the same regardless of the signs of x,y. : m modular division: select q so that the remainder is always the least positive remainder. Many other forms:such as floor division, q closest integer to 0 and r is a signed remainder.
24
Stanford University
M J Flynn
EE 486
Winter 02-03
shifts
Logical shifts: all bits shift (left or right). Arithmetic shifts: sign is fixed, other bits shift left or right.
Left shift by p multiplies by 2p; shift 0s into the lsb. Right shift by p divides by 2p; shift sign bit into the msb BUT be careful, the result depends on the complement coding used.
Integer divide
On arithmetic shift division results depend on the type of integer complement coding thats used.
If magnitude q is the same regardless of the signs of a,b result is signed division If r is always the lpr (least positive-incl 0 remainder) then (q,r) result is modular division 1s complement produces a signed (q,r) 2s complement produces a modular (q,r)
Computer Architecture & Arithmetic Group 26 Stanford University
25
Stanford University
28
Stanford University
M J Flynn