Explain why the hidden bit of floating point format does not need to be represented.
help? I know that the hidden bit exists for more precision but why doesn't it need to be represented?
Many floating point representations have an implicit hidden bit in the mantissa. This is a bit which is present virtually in the mantissa, but not stored in memory because its value is always 1 in a normalized number.
Floating point representation makes numerical computation much easier. You could write all your programs using integers or fixed-point representations, but this is tedious and error-prone.
In computers, floating-point numbers are represented in scientific notation of fraction ( F ) and exponent ( E ) with a radix of 2, in the form of F×2^E . Both E and F can be positive as well as negative.
Floating-point decimal values generally do not have an exact binary representation due to how the CPU represents floating point data. For this reason, you may experience a loss of precision, and some floating-point operations may produce unexpected results.
If you mean by the hidden bit the the one preceding the mantissa H.xxxxxxx, H=hidden, the answer is that it is implicitly 1, when exponent>0 and it's zero, when exponent==0.
Omitting the bit, when it can be calculated from the exponent, allows one more bit of precision in the mantissa.
@Aki's answer is correct. The implied bit is not always 1.
For 0.0, -0.0 & denormal numbers (gradual underflow) the implied bit if any would be 0.
Those numbers are all the ones having a zero biased exponent.
Non finite float (+inf -inf NaN) don't need any concept of implied bit at all.
Though, adding such a bit wouldn't hurt
Those numbers are all the ones having biased exponent set to all ones.
For every other float, implied bit would be 1.
Technically, the answer is that we don't need to store the implied bit because we put additional logic in FPU circuitry to reconstruct it from above rules ;).
For example, the implied bit could be obtained by ORing all the bits of biased exponent, so it's not that expensive after all.
It will be always one so we don't represent it You will only get a hidden bit when you normalize a binary number and the meaning of normalization is writing a number in the form of
1.xxxx x 2^x (eg: 110.11 becomes 1.1011x2^2)
so the first bit always becomes 1 so we don't need to represent it
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With