In this computer, numbers are stored in 12-bits. We will also assume that for a floating point (real) number, 6 bits of these bits are reserved for the mantissa (or significand) with 2^(k-1)-1 as the exponent bias (where k is the number of bits for the characteristic).


What pair of floating point numbers could be represented by these 24-bits?

I have gone this far:

As described above that each number is of 12 bit so we get each number


First one is 0 bit so it is positive and

Mantissa will be 100110

Exponent will be 11100b=28

my unbiased exponent will be 2^(28-15)=2^13

How to find the floating point number from here?


Usually the mantissa is considered to have a binary point after the first bit, so your mantissa would be $1.1100_2=\frac 74=1.75_{10}$. Sometimes a leading $1$ is assumed, so your mantissa would be $(1).11100_2=\frac{15}8=1.875_{10}$ This gives one more bit of precision. To find the exponent, you subtract the offset from the stored value. You probably meant $2^{k-1}-1$ as the offset. Can you do that?

  • $\begingroup$ Yes I did a mistake there.It will be 2^(k-1)-1. $\endgroup$ – Wolverine Apr 5 '15 at 17:20
  • $\begingroup$ Can you please show the calculations for the first one? I will do it for the second one. $\endgroup$ – Wolverine Apr 5 '15 at 17:22
  • $\begingroup$ What is $k$? Can you compute $2^{k-1}-1$ and subtract it from $38$? That is the power of $2$ to multiply your mantissa by. $\endgroup$ – Ross Millikan Apr 5 '15 at 17:26
  • $\begingroup$ k is 5 here.So I need to multiply it (38-15) ie 23. $\endgroup$ – Wolverine Apr 5 '15 at 17:29
  • $\begingroup$ It looks to me like $k=6$-you have six bits of exponent. The point of the offset is that six bits of unsigned binary ranges from 0 to 63. With an offset of $2^{6-1}-1=31$ you get a range from $2^{-31}$ to $2^{32}$, which is (reasonably) logarithmically centered around $1$. You need to subtract this number from $38$ (the opposite sense of your last comment) to get $5$, so you multiply the mantissa by $2^5$ $\endgroup$ – Ross Millikan Apr 5 '15 at 17:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.