0
votes

I've been studying IEEE 754 for a while,and there's a thing that I do not manage to understand. According to my notes, in IEEE simple precision, you have 1 bit for the sign, 8 for exponent and 23 for mantissa, making a total of 32 bits. The exponent could be described as following: the first bit gives the sign, and then the remaining 7 bits describe some number, which means that the biggest possible value for exponent is 2^+127, and the lowest 2^-127. But according to Wikipedia (and other websites), the lowest possible value is -126 which you get if you consider the exponent as a number determined by: e-127 and e is an integer between 1 and 254. Why can't e take the value 0 which will enable the exponent -127?

1
2^+127. I think you meant 2^7 - 1 = 127. I'm not going to edit this into the question in case you did mean what you typed, in which case we should discuss why its incorrect. - user47589
I did mean 2^+127,is it incorrect ?? - Yacine Aoun

1 Answers

0
votes

Look up 'subnormal' or denormalized numbers; they have a biassed exponent value of 0.

A denormal number is represented with a biased exponent of all 0 bits, which represents an exponent of −126 in single precision (not −127).

Also, there are 24 logical bits in the mantissa, but the first is always 1 so it isn't actually stored.

Signed zeros are represented by exponent and mantissa with all bits zero, and the sign bit may be 0 (positive) or 1 (negative).