What is the Range of Integers and Real Numbers in a 10-bit Float Type?

  • Topic:
  • Thread starter Thread starter shamieh
  • Start date Start date
  • Tags Tags
    Float
Join the discussion
Registration is free. Start your own thread to ask a follow-up.
2 replies · 3K views
shamieh
Messages
538
Reaction score
0
Hello all, (wasn't quite sure where to post this)

I'm stumped on a question my teacher is asking me...I'm not sure if it's even possible. Maybe someone can point me in the right direction?

Question: A computer uses 10 bits to store integers with 1 bit for a sign. It stores an approximation of real numbers in 10 bits. The first bit of the first five is the sign of the mantissa and the other four bits are the mantissa. The first bit of the second five is the sign of the exponent and the other four the exponent.
1)What is the range of integers?
2)what is the range of real numbers(Float Type)

The first question was simple. I just found the smallest 10 digit binary number 1000000000 = -512 and then found the largest 10 digit binary number which would have to be 0111111111 = 511, therefore the range of integers is from -512 to 511.

For the second question - I am either making this harder than it is, or it really is a challenging question. So I followed the steps and first I was thinking I would take the number 1000000000 and convert this to a decimal (assuming its a 10 bit float)...But, can you even do this with a 10 bit float??

I ended up getting 1000000000 (after denormalizing) = .000100000 = 0.625.. would that be the minimum range? If so, then I know what I need to do to find the maximum , but if not - then I am really lost.

My Process was:
1.00000 X 2^(-4) = my final result of 0.625 after converting.

Thanks in advance
 
Physics news on Phys.org
shamieh said:
Hello all, (wasn't quite sure where to post this)

I'm stumped on a question my teacher is asking me...I'm not sure if it's even possible. Maybe someone can point me in the right direction?

Question: A computer uses 10 bits to store integers with 1 bit for a sign. It stores an approximation of real numbers in 10 bits. The first bit of the first five is the sign of the mantissa and the other four bits are the mantissa. The first bit of the second five is the sign of the exponent and the other four the exponent.
1)What is the range of integers?
2)what is the range of real numbers(Float Type)

The first question was simple. I just found the smallest 10 digit binary number 1000000000 = -512 and then found the largest 10 digit binary number which would have to be 0111111111 = 511, therefore the range of integers is from -512 to 511.

For the second question - I am either making this harder than it is, or it really is a challenging question. So I followed the steps and first I was thinking I would take the number 1000000000 and convert this to a decimal (assuming its a 10 bit float)...But, can you even do this with a 10 bit float??

I ended up getting 1000000000 (after denormalizing) = .000100000 = 0.625.. would that be the minimum range? If so, then I know what I need to do to find the maximum , but if not - then I am really lost.

My Process was:
1.00000 X 2^(-4) = my final result of 0.625 after converting.

Thanks in advance

Hi shamieh,

The mantissa can take values up to .1111 (positive), which is 15/16.
The smallest positive mantissa is .0001, which is 1/16.

The range of the exponent is 10000 to 01111, which is -16 to +15.

This means that the range of the floating point number is:
$$-\frac{15}{16} \times 2^{15} \quad \text{ to } \quad +\frac{15}{16} \times 2^{15}$$

Additionally, the smallest positive number is:
$$\frac{1}{16} \times 2^{-16}$$