Compare the range of representable numbers for 16-bit floating-point word with 7-bit exponent and 9-bit mantissa as (i) fraction and (ii) integer.
I know how to find range for a 16 bit integer but not sure how to find same for floating point and how it changes with exponent and mantissa. Kindly help to share detailed answer with some additional examples.
A floating point number is typically stored as
The first blank being the mantissa (excluding the leading one), and the second blank being the exponent plus some constant k. One exponent value is usually reserved to indicate zero and subnormals, and another value is usually reserved for the NaNs and infinities.
The described format is weird since it doesn't have space for a sign bit.
⇒ Are we to assume it can only represent positive numbers?
The description of the format is lacking, missing any mention of k, and missing instructions on how to save zero, NaNs and infinities.
⇒ Are we to assume it can't represent zero?
⇒ Are we to assume k is zero, meaning it can't represent number smaller than 1? (For example, 0.1 would not be representable.)
If so, the smallest number representable is
And the largest is
But again, that's based on a lot of guesswork about the specifics for the format.