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

  • MHB
  • Thread starter shamieh
  • Start date
  • Tags
    Float
In summary, the range of integers is from -512 to 511 and the range of real numbers (float type) is from $-\frac{15}{16} \times 2^{15}$ to $+\frac{15}{16} \times 2^{15}$. The smallest positive number is $\frac{1}{16} \times 2^{-16}$.
  • #1
shamieh
539
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
 
Technology news on Phys.org
  • #2
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}$$
 
  • #3
Thank you so much.
 

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

What is "Converting Float to Decimal"?

"Converting Float to Decimal" is a process of converting a floating-point number, which is a number with a decimal point, into a decimal number, which is a number with only whole numbers and a decimal point. This is often necessary in computer programming and scientific calculations.

Why do we need to convert float to decimal?

We need to convert float to decimal because computers and programming languages often have limitations on how accurately they can store and manipulate floating-point numbers. By converting to decimal, we can ensure more precise calculations and avoid errors.

How do you convert float to decimal?

To convert float to decimal, we can use the following formula: Decimal value = (Sign) * (Mantissa) * (Base)^Exponent. The sign represents the positive or negative value, the mantissa is the significant digits of the number, and the exponent indicates the decimal point's position.

What are some common challenges when converting float to decimal?

Some common challenges when converting float to decimal include rounding errors, limitations on the number of significant digits, and the potential loss of precision. It is essential to carefully consider the data type and the required level of accuracy when converting.

Can you convert decimal to float?

Yes, it is possible to convert decimal to float by reversing the conversion process. However, depending on the initial decimal value, some precision may be lost during the conversion. It is best to use decimal to float conversion only when necessary and with caution.

Back
Top