

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


In the Intel Pentium “FDIV” bug, five entries in the SRT lookup table were removed. This effectively set the entries to zero when they should have contained 2’s. Consider the region of the table between R Dk = 43 and 53 where the table could return either 2 or 1 and still result in a correct answer. In the version of the SRT algorithm that we covered in class, we divided this region such that any entry above the midpoint ( R Dk = 32 ) returns a value of 2, and any entry below returns 1.
Let us suppose that the engineer in charge of the SRT lookup table is not good at plotting straight lines, and ends up using a line that is slightly “higher” than R Dk = 32 (shown as a bold line in the figure below – the “correct” line would have terminated slightly lower where the dash-dot horizontal line hits the end of the table). That is, he uses the line Rk D =^
3 2 + ∆^ (see the figure below). How would this affect the correctness of the divider? Assuming you cannot change the lookup table, how would you modify the algorithm to fix the problem?
Rk = 83 D
Rk = 43 D
Rk = 23 D Rk = 13 D
Rk = − 13 D Rk = − 23 D
Rk = − 43 D Rk = − 53 D
Rk = − 83 D
q = 2 Rk = 53 D
q = 1
q = 0
q = − 1
q = − 2
Rk = ( 32 + ∆)D
D Rk
Hint: Consider that (1) the region is supposed to be able to return either 1 or 2, and (2) the table is not indexed with Rk and D, but rather by the approximated versions R˜k and D˜.
In class we covered the IEEE single- and double-precision floating point formats. Let us consider a “half-precision” format:
Sign Exp Mantissa s e e e e e m m m m m m m m m m
Except for the different field sizes, assume that the format is in all other respects the same as the single- and double- precision FP formats.
(a) What is the largest representable real number using this format? (not counting +∞) (b) What is the smallest representable (normalized) non-zero number? (c) What is the base-10 value of the half-precision number 1110011001011000? (d) What is the half-precision binary representation of 1332?
( Problem 3 on next page. )