1
votes

I have been working on these three lab questions for about 5 hours. I'm stuck on the last question.

Consider the following floating point number representation which stores a floating point number is 16 bits. You have a sign-bit, a six bit (excess-32) exponent, and a nine bit mantissa.

  1. Explain how the 9-bit mantissa might get you into trouble.

Here is the preceding question. Not sure if it will help in analysis.

  1. What is the range of exponents it supports?

000000 to 111111 or 0 to 63 where exponent values less than 32 are negative, and exponent values greater than 32 are positive.

I have a pretty good foundation for floating points and converting between decimals and floating points. Any guidance would be greatly appreciated.

2
I guess there is a typo in the second quote, should "32" be considered a positive or negative exponent? If we should go after the first quote, then "32" should be positive, or in fact 2^0 or simply 1. (Not that it answers the question...) - Lindydancer
Good catch, I'm not sure what the right answer is for that. The excess is 32. As I understand it that is the point where it switches from negative to positive, but which is it? - Steve's a D

2 Answers

1
votes

To me, the ratio mantissa to exponent is a bit off. Even if we assume there is a hidden bit, effectively making this into a 10 bit mantissa (with top bit always set), you can represent + or - 2^31, but in 2^31/2^10 = 2^21 steps (i.e. steps of 2097152).

I'd rather use 11 bits mantissa and 5 bit exponent, making this 2^15/2^11 = 2^4, i.e. steps of 16.

So for me the trouble would be that 9+1 bits is simply too imprecise, compared to the relatively large exponent.

0
votes

My guess is that a nine-bit mantissa simply provides far too little precision, so that any operation apart from trivial ones, will make the calculation far too inexact to be useful.

I admit this answer is a little bit far-fetched, but apart from this, I can't see a problem with the representation.