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

  • Thread starter Thread starter shamieh
  • Start date Start date
  • Tags Tags
    Float
AI Thread Summary
The discussion revolves around a question regarding a computer's 10-bit representation for integers and real numbers. The first part of the question, concerning the range of integers, was resolved by determining that the smallest 10-bit binary number is -512 and the largest is 511, leading to a range of -512 to 511. The second part, which addresses the range of real numbers, proved more complex. The participant initially attempted to convert binary to decimal but faced uncertainty about the validity of the conversion with a 10-bit float. Another contributor clarified that the mantissa can range from 1/16 to 15/16, while the exponent ranges from -16 to +15. Consequently, the overall range for the floating-point number is from -15/16 × 2^15 to +15/16 × 2^15, with the smallest positive number being 1/16 × 2^(-16).
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
 
Technology 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}$$
 
Thank you so much.
 
Thread 'Is this public key encryption?'
I've tried to intuit public key encryption but never quite managed. But this seems to wrap it up in a bow. This seems to be a very elegant way of transmitting a message publicly that only the sender and receiver can decipher. Is this how PKE works? No, it cant be. In the above case, the requester knows the target's "secret" key - because they have his ID, and therefore knows his birthdate.
I tried a web search "the loss of programming ", and found an article saying that all aspects of writing, developing, and testing software programs will one day all be handled through artificial intelligence. One must wonder then, who is responsible. WHO is responsible for any problems, bugs, deficiencies, or whatever malfunctions which the programs make their users endure? Things may work wrong however the "wrong" happens. AI needs to fix the problems for the users. Any way to...
Back
Top