We started with IEEE 754 representation of floating point no.s in college . A major point of this representation is that it wants to reserve the extreme values 0 and 255 corresponding to all zeros and all ones for special no.s, which is alright . But why the bias 127 for it ?
So in 8 bits the exponent can take values from -128 to 127 , which effectively translates to 0 to 255 after adding 128 to each . Now we want to separate 0 and 255 which leaves us with 1 to 254 .
Here the IEEE 754 representation uses a bias of 127 , so the actual range of exponents becomes from -126 to 127.
If we have a bias of 128 , the range of actual exponents will be from -127 to 126.
What is the problem with the latter case , because we are still achieving to reserve 0 and 255 for special cases . Besides it looks better as we take out the extreme values from -128 to 127 to get -127 to 126?
Mike Billings is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.