[Math] Data Representation Question

binarycomputer sciencefloating pointnumber-systems

A computer stores a number of $16$ bits word using floating-point arrangement. Given that the first bit is reserved for the sign and followed by $6$ bits for the exponent using biased form. The remaining bits are used for the mantissa with a hidden bit.

(a) Show how the computer stores $-37.87510$.

(b) What is the decimal value for $0100\ 1111\ 0111\ 0101_2$?

My Attempt Was :

(a) = $000100101.1110 = 15.D$

(b) = $2^{14} + 2^{11} + 2^{10} + 2^9 + 2^8 + 2^6 + 2^3 + 2^2 + 1 = 20341$

Please help me out, I want to know if I'm doing it correct…

Best Answer

Hints

  1. Convert $-37.8751$ forces the first bit to be set; now convert $37.8751$ to binary and express this as $1.??? \times 2^{???}$ and this is where you will get your mantissa and exponent to store in the arrangement you described.
  2. First bit is not set, so the number is positive. Exponent is the next 6, i.e. $100111$. The remaining bits are the mantissa (does it really have 2 as the last digit?), convert each one from binary $1.??? \times 2^{???}$ to decimal and you are done.