crammy90
Member
- Joined
- Mar 26, 2006
- Messages
- 264
- Gender
- Male
- HSC
- 2008
so as the exponent could be neg or pos
i.e. (-1 for 1x10^-1 i.e. 0.1) or (1 for 1x10^1 i.e. 10) there has to be away to when way to move the decimal point along the real number (i.e. if it is a large number or a small number)
I get this is because we represent numbers in scientific notation and what not.
QUESTION:
"The standard specifies that the exponent is represented as the actual value plus 127. As we have 8 bits for the exponent we can represent integer values from 0 to 255. Subtracting 127 gives us a better range from -127 to 128".
(from same davis)
i dont understand why we are subtracting 127 from 255 to get 128.
MY THOUGHT: i dont see why if we do this we cant represent range 0-127 (1 from 128 as 1 have to be 0) and -1 to -128 (like the range for all other numbers i.e. 2's comp).
So just say we had to represent -128 exponent (according to my though) we would add the 127 to get -1 which is still negative. Is this why its from -127 - 128 rather than -128 to 127?
Also if we have to represent 127 exponent, thats 127 + 127 = 254. Is this why the range is max positive of 128 so 128 + 127 = 255 = the max number for 8-bit?
so yeh
just wondering
a) why its that range of -127 - 128 instead of -128 - 127 like usual
b) why it is we subtract the 127 to get the range and then add it on again when we are encoding the exponent into ieee 754 form.
c) for the exponent to be negative when we are putting it into ieee 754 is it in 2's complement and then we have to put it back into normal form and then add the 127 or do we add the 127 to the 2's compliment
thanks to any1 that can help i really need this!!!
i.e. (-1 for 1x10^-1 i.e. 0.1) or (1 for 1x10^1 i.e. 10) there has to be away to when way to move the decimal point along the real number (i.e. if it is a large number or a small number)
I get this is because we represent numbers in scientific notation and what not.
QUESTION:
"The standard specifies that the exponent is represented as the actual value plus 127. As we have 8 bits for the exponent we can represent integer values from 0 to 255. Subtracting 127 gives us a better range from -127 to 128".
(from same davis)
i dont understand why we are subtracting 127 from 255 to get 128.
MY THOUGHT: i dont see why if we do this we cant represent range 0-127 (1 from 128 as 1 have to be 0) and -1 to -128 (like the range for all other numbers i.e. 2's comp).
So just say we had to represent -128 exponent (according to my though) we would add the 127 to get -1 which is still negative. Is this why its from -127 - 128 rather than -128 to 127?
Also if we have to represent 127 exponent, thats 127 + 127 = 254. Is this why the range is max positive of 128 so 128 + 127 = 255 = the max number for 8-bit?
so yeh
just wondering
a) why its that range of -127 - 128 instead of -128 - 127 like usual
b) why it is we subtract the 127 to get the range and then add it on again when we are encoding the exponent into ieee 754 form.
c) for the exponent to be negative when we are putting it into ieee 754 is it in 2's complement and then we have to put it back into normal form and then add the 127 or do we add the 127 to the 2's compliment
thanks to any1 that can help i really need this!!!