precisionieee-754digitalnumber-systems

Floating point number representation


enter image description here

This is quite old question asked in 1996, so ignore the errors.

Here the exponent is of 8 bits then we will take bias as 128 Right ? but how to proceed further in the question please help.


Solution

  • Likely the intended answer is D, but the question is poorly posed.

    First, B and D are equivalent answers in the sense that the representable numbers in “0.5 [inclusive] to 1 [exclusive]” are the same as those in “0.5 [inclusive] to (1 − 2−23) [inclusive].” It is ambiguous to describe an interval by endpoints without specifying whether they are inclusive or exclusive.

    Given the author has failed to specify this, my sense is they intend the intervals to be inclusive of both endpoints, which makes D the intended answer. That is based solely on my sense of the prevalence of various human behaviors and thinking, not upon any mathematical or logical requirements of the problem.

    Second, “the range of the magnitude of the normalized numbers in this representation” must span some interval [x, 2x], due to the nature of floating-point representations. (Here we understand “magnitude” to mean the value of the significand1, separate from the sign or the exponent.) This is because significands are numerals of fixed length in the floating-point base, which is two in this case. When the significand is normalized, its leading digit is non-zero. So, neglecting the radix point, the digits of normalized base-two significands can range from 1000…0002 to 1111…1112. Each floating-point format fixes the location of the radix point in this significand numeral, but, wherever it is fixed, that gives the first endpoint some value x and the second endpoint some value just under 2x. Thus, normalized binary significands always span some interval [x, 2x]. Answers A and C do not conform to this, so they cannot be correct.

    Although this allows us to narrow the choices to B and D, this is an excessive amount of reasoning for a simple review question in initial floating-point lessons. The question ought to have stated how the bits of the “Mantissa” field are interpreted. Although it states they are in “the” sign-magnitude representation, they are not a binary numeral, since this would give values from −223 to +223−1 (inclusive). So some other position has been chosen for the radix point. Intervals of [½, 1) (for the magnitude, neglecting the sign) and [1, 2) are common, but arbitrary intervals of [x, 2x) could be used. IEEE-754 nominally uses [1, 2) with an exponent bias of 127, but it could just as easily use [2−127, 2−126) and say the exponent bias is zero! That would have no effect on the specification: It would be a change in the wording but would not affect the mathematics, implementation requirements, or behavior at all. So we see that how the bits represent the significand is largely arbitrary, and the problem fails to specify the representation.

    Footnote

    1 “Significand” is the preferred term for the fraction portion (versus exponent or sign) of a floating-point number. “Mantissa” is an old term for the fraction part of a logarithm. Mantissas are logarithmic; adding to the mantissa multiplies the number represented. Significands are linear; multiplying the significand multiplies the number represented.