IEEE floating point , how to calculate the bias

10,969

I'd expect it to be 2number of bits in exponent - 1 - 1 (or 7 here), as is the case with more common IEEE-754 formats. Check Wikipedia.

Share:
10,969
nullException
Author by

nullException

Updated on June 05, 2022

Comments

  • nullException
    nullException almost 2 years

    if we have 10 bits floating point . 4 bits=exponent and 5 bits are the fraction. how to calculate the bias?

    is it 2^4=16-1= 15 ?

    is that correct?

  • Alexey Frunze
    Alexey Frunze about 12 years
    I don't understand what you're saying. In IEEE-754 there's only one bias, the exponent bias. The exponent bits are used to represent a few special cases (denormalized mantissa, infinity and "not a number") and a range of exponents from some minimum value (negative) to some maximum value (positive). This range is encoded with a positive bias (equal to the negative of the minimum exponent value (which is itself negative, hence the positive bias)). It's not 1's or 2's complement or sign-magnitude representation, it's biased. The question says that there are 4 exp bits, not 9 or 10.