I am learning computer architecture and organization. I am stuck in the following question. Can someone please help me?
For a floating-point representation with 35 bits in the mantissa and 15 bits in the exponent, the number of significant digits in decimal and the minimum (negative) value of the exponent in decimal will be:
I know that the number of significant digits in decimal will be 10, but I don't understand how to solve the second part of the question.
This is what I tried:
As there are 15 bits in the exponent, the total numbers that can be represented = 2^15 = 32768
Since exponent may be positive, negative and zero, so this means that the range of exponent is from -16384 to +16383.
So minimum value of exponent in decimal is:
2^(-16384) = 10^y
-16384 * log(2) = y * log(10)
y = -4932.075 -- minimum exponent value = -4932 ( in decimal ).
So the minimum value of the exponent will be -4932 (in decimal) but it is wrong.
I don't understand why? The correct answer is -9864.
The number is stored in IEE-754 format.
This is the formula which perhaps I am supposed to use but I don't understand how we get the correct answer. I can get the correct answer if I use this process: 2^15 = 32768
So,
2^(-32768) = 10^y
Thus, y = -9864.1
So minimum exponent value in decimal is -9864.
But according to me we should use 2^14 = 16384
The reason why I am using 14 bits is because, suppose if we have 8 bits so we can represent 256 numbers from -128 to +127. -128 is 2^(8-1).
So,
2^(-16384) = 10^y
Thus, y = -4932.0.
So minimum exponent value in decimal is -4932.