9

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?

ks1322
  • 33,961
  • 14
  • 109
  • 164
Jordan
  • 91
  • 1
  • 2

3 Answers3

7

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 Suihkonen
  • 19,144
  • 1
  • 36
  • 57
  • I find it strange that the hidden bit is zero if the exponent is zero. Isn’t it the case that there is no hidden bit in this case? Indeed, how would the number with mantissa 1.00…001 and exponent zero be represented otherwise? – Rastapopoulos Dec 14 '21 at 18:12
  • After digging a bit, it seems that that there is indeed no hidden bit when the exponent is zero. Or, equivalently, the hidden bit is 0 but the exponent is increased by 1... There is more information on this here: https://stackoverflow.com/questions/8341395/what-is-a-subnormal-floating-point-number @Aki, it would be great if you could update your answer accordingly, as it is a bit misleading at the moment. – Rastapopoulos Dec 14 '21 at 19:06
1

@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.

aka.nice
  • 9,100
  • 1
  • 28
  • 40
1

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

Eric Postpischil
  • 195,579
  • 13
  • 168
  • 312