I'm having a little difficulty understanding how floating point numbers work. Specifically in the following representations below (correct my mistakes):
Representing 0: this is represented by a full 0 bits in the exponent bits (8 in single precision and 11 in double precision). If I have all zeros in the exponent bits, will I still be able to represent zero even if my mantissa is not all zero?
Wikipedia shows that zero is represented by (−1)signbit×2^{−126}× 0.significandbits Why is it 2^{-126} when the lowest exponent value we can reach is 2^{-127} instead?
Representing denormal numbers: I suppose denormal numbers are represented as this format as well: (−1)signbit×2^{−126}× 0.significandbits. They are used to represent values lower than the smallest normal number. I'm guessing this is 2^{-127}, but if the representation for denormal numbers is as such, wouldn't denormal numbers still represent larger values than normal ones?
normalised numbers: (−1)signbit×2^{exponentbits−127}× 1.significandbits. I'm supposing the actual representation of the exponentbits is in terms of 0 to 255, as they don't represent in two complements form.
plus/minus infinity represented by a full 1 bits in the exponent bits. Again, does a non-zero mantissa matter if we use this representation to signify infinity?
Per IEEE 754-2008:
The exponent used with subnormals is 1 rather than 0 so that the numbers change from (normal) 1.000…000•21−127 to (subnormal) 0.111…111•21−127. If 0 were used, there would be a jump to 0.0111…1111•21−127.
The formula for the values of subnormals works for zeros too. So zeros do not actually need to be listed separately above.