In ARM VPF, why does the exponent part should add 127(in 32-bit) to represent the exponent?
In VPF 32-bit mode, a float number is store as follow:
31 30... ...23 22... ...0
S Exponent Mantissa
As for +0.5, the exponent is -1 ( +0.5 = 1*1*2^(-1) ). But in fact, the Exponent is stored as 126(-1+127), so I want ask why we should add a 127 then store the number in Exponent?
The answer I copy it as follow from the wikipedia:
In IEEE 754 floating point numbers, the exponent is biased in the engineering sense of the word – the value stored is offset from the actual value by the exponent bias. Biasing is done because exponents have to be signed values in order to be able to represent both tiny and huge values, but two's complement, the usual representation for signed values, would make comparison harder.