inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture 16 – Floating Point II 20041006. Lecturer PSOE Dan Garcia www.cs.berkeley.edu/~ddgarcia.
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
inst.eecs.berkeley.edu/~cs61cCS61C : Machine Structures Lecture 16 – Floating Point II 20041006
Lecturer PSOE Dan Garcia
www.cs.berkeley.edu/~ddgarcia
VP debate… Cheney & Edwardstook off their gloves and both came out strong. Will you just answer the question, please? Both are seasoned orators…
cnn.com/2004/ALLPOLITICS/10/05/debate.main/
0
0111 1101
0101 0101 0101 0101 0101 010
= 0.33333…10
= 0.25 + 0.0625 + 0.015625 + 0.00390625 + …
= 1/4 + 1/16 + 1/64 + 1/256 + …
= 22 + 24 + 26 + 28 + …
= 0.0101010101… 2 * 20
= 1.0101010101… 2 * 22
ExponentSignificandObject
000
0nonzero???
1254anything+/ fl. pt. #
2550+/ ∞
255nonzero???
Gaps!
b
a

+
0
a = 1.0… 2 * 2126 = 2126
b = 1.000……1 2 * 2126 = 2126 + 2149
a  0 = 2126
b  a = 2149
Normalization and implicit 1is to blame!
RQ answer!

+
0
a = 2149
b = 2148
RQ answer!
Multiplicand10008Multiplier x100191000 0000 0000+1000 01001000
mult $s2,$s3# b*c mfhi $s0# upper half of # product into $s0mflo $s1# lower half of # product into $s1
1001 Quotient Divisor 10001001010Dividend 1000 10 101 1010 100010Remainder(or Modulo result)
div $s2,$s3# lo=c/d, hi=c%d mflo $s0# get quotientmfhi $s1# get remainder
multu
divu
ABC
1: FFF
2: FFT
3: FTF
4: FTT
5: TFF
6: TFT
7: TTF
8: TTT
MEMORIZE!
X=0 0
X=1 Kilo ~103
X=2 Mega ~106
X=3 Giga ~109
X=4 Tera ~1012
X=5 Peta ~1015
X=6 Exa ~1018
X=7 Zetta ~1021
X=8 Yotta ~1024
ExponentSignificandObject
000
0nonzeroDenorm
1254anything+/ fl. pt. #
2550+/ ∞
255nonzeroNaN