Mantissa question

Good. You have all the information you need- except for one thing: when you say "the sign of the exponent" and "the exponent itself" what is the base? Because you are working in binary, I will assume that is "2". The largest positive number will have sign +, of course, have positive exponent and that exponent will be 1. The largest possible mantissa will be 11111 in binary. What is that in base 10? Then multiply by \(\displaystyle 2^1= 2\). Do you see why?

The smallest positive number will be the same thing except multiplied by 1/2 rather than 2. Do you see why?
 
A friend of mine told me i have to do the following:

Since we have only one bit for the exponent, but allow it to be positive or negative, whatever number is given by the mantissa is multiplied by
png.latex
= 1,
png.latex
or
png.latex
. With 5 bits for the mantissa, the largest that can be is
png.latex
. Huh? What happened to 21? Since that can be multiplied by 2, the largest number that can be represented in that way is 2(63)= 126 and, of course, 127 will cause overflow. The smallest non-zero mantissa is, of course, 00001= 1. Since it can be multiplied by 1/2, the smallest positive number that can be represented in that way is 1/2. There are
png.latex
different mantisas of which 31 are non-zero. Those, combined with the three possible mantissas, You mean exponents (gives 3(31)= 93 different positive numbers. Only if there is no overlap in the numbers Adding the 93 different negative number, and, of course, 0, there are 187 different numbers representable in this way.

Is this correct?
One thing i don't understand, if this is correct is how the largest mantissa is 63, 11111 = 31 not 63! (11111, of course in base 2)

Thanks
Let's go to basics.

Let's assume that: (1) the mantissa sign is plus, (2) the exponent sign bit is plus, and (3) the exponent bit is 0.

If the mantissa had one bit, how many numbers could be represented and what would be the largest?

If the mantissa had two bits, how many numbers could be represented and what would be the largest?

If the mantissa had three bits, how many numbers could be represented and what would be the largest?

But the mantissa has five bits, so how many numbers can be represented and what is the largest?

OK, so you now know that you made a big error up above.

Case I: assume that: (1) the mantissa sign is plus, (2) the exponent sign bit is plus, and (3) the exponent bit is 0.

How many numbers can we represent, running from what to what?

Case II: assume that: (1) the mantissa sign is plus, (2) the exponent sign bit is minus, and (3) the exponent bit is 0.

How many numbers can we represent, running from what to what?

Are any of those numbers identical to numbers that we got in Case I? So how many additional numbers have we added?

Case III: assume that: (1) the mantissa sign is plus, (2) the exponent sign bit is plus, and (3) the exponent bit is 1.

How many numbers can we represent, running from what to what?

Are any of those numbers identical to numbers that we got in Cases I or II? So how many additional numbers have we added?

What is the largest number we can represent? What is the next largest?

Case IV: assume that: (1) the mantissa sign is plus, (2) the exponent sign bit is minus, and (3) the exponent bit is 1.

How many numbers can we represent, running from what to what?

Are any of those numbers identical to numbers that we got in Cases I, II, or III. So how many additional numbers have we added?

What is the smallest positive number that we can represent?

What is the largest non-integer number that we can represent?

Now considering Cases I, II, III, and IV, how many distinct numbers can we represent if the sign of the mantissa is plus?

So how many distinct numbers can we represent if the sign of the mantissa is either plus or minus?
 
Could anyone show me how to do this question, im really stuck!

Please answer the questions Jeff had asked you above - that'll unstuck you. If not - we will help again after you show your work along with the answers to Jeff's question.
 
I'm guessing that i need to use the formula, number = [0.(x_1)*(x_2)*(x_2)*....]*2^e, where e is the exponent and x_1*x_2*.... is the mantissa.
Now for the first question you asked i get; number = +[0.(x_1)*(x_2)*(x_2)*....]*2^0, but what would i replace 0.(x_1)*(x_2)*(x_2)*.... by? Could you show me how to do the first question you asked, so that i can apply it to the rest. Were looking at 1 bit at the first stage so i was thinking of the combinations 0.00001, 0.00010, 0.00100, 0.01000, 0.10000 for the mantissa section.

Also, im not really sure how to evaluate [0.(x_1)*(x_2)*(x_2)*....]*2^e once we have 0.(x_1)*(x_2)*(x_2)*....?

thanks
You really are making this infinitely more difficult than it needs to be. A bit can be in two states, 0 and 1. So how many numbers can it represent? If the implied binary point precedes the first digit of the normalized mantissa, then it represents

\(\displaystyle 0.0_2 = \left(\dfrac{0}{2}\right)_{10}\ and\ 0.1_2 = \left(\dfrac{1}{2}\right)_{10}.\) 21 = 2 possible numbers, largest (2 - 1)/2.

Two bits can be in four states: 00, 01, 10, 11.

\(\displaystyle 0.00_2 = \left(\dfrac{0}{4}\right)_{10}\ and\ 0.01_{2} = \left(\dfrac{1}{4}\right)_{10}\ and\ 0.10_2 = \left(\dfrac{2}{4}\right)_{10}\ and\ 0.11_2 = \left(\dfrac{3}{4}\right)_{10}.\)

22 = 4 possible numbers, largest (4 - 1)/4.

Figure out what a five bit normalized mantissa could represent before worrying about sign bits or exponent bits or sign of exponent bits. Formulas are handy when you understand what you are doing, but they are dangerous if you use them mechanically.

Once you understand what the possible values of the mantissa are you will will be in a position to think about what happens with various exponents and various signs. Make sense?
 
Last edited:
You really are making this infinitely more difficult than it needs to be. A bit can be in two states, 0 and 1. So how many numbers can it represent? If the implied binary point precedes the first digit of the normalized mantissa, then it represents

\(\displaystyle 0.0_2 = \left(\dfrac{0}{2}\right)_{10}\ and\ 0.1_2 = \left(\dfrac{1}{2}\right)_{10}.\) 21 = 2 possible numbers, largest (2 - 1)/2.

Two bits can be in four states: 00, 01, 10, 11.

\(\displaystyle 0.00_2 = \left(\dfrac{0}{4}\right)_{10}\ and\ 0.01_{2} = \left(\dfrac{1}{4}\right)_{10}\ and\ 0.10_2 = \left(\dfrac{2}{4}\right)_{10}\ and\ 0.11_2 = \left(\dfrac{3}{4}\right)_{10}.\)

22 = 4 possible numbers, largest (4 - 1)/4.

Figure out what a five bit normalized mantissa could represent before worrying about sign bits or exponent bits or sign of exponent bits. Formulas are handy when you understand what you are doing, but they are dangerous if you use them mechanically.

Once you understand what the possible values of the mantissa are you will will be in a position to think about what happens with various exponents and various signs. Make sense?

So
 
Last edited:
So for 5 bits we can have \(\displaystyle 2^5 = 32\) possible numbers, largest \(\displaystyle \dfrac{32-1}{32} = \dfrac{31}{32}\) YES!
I am sure that this problem can be worked out exclusively in terms of formal mathematical reasoning. I am equally sure that the results can be summarized in purely mathematical formulas that could be memorized. But, as I said before, using formulas without understanding them is dangerous. In any case, I stopped working on computers (as opposed to working with computers) in 1970 and so remember no formulas at all. Moreover, it appears that this problem has been very carefully designed to let you physically see what is going on so that you intuitively understand whatever formulas you are being taught.

Physically, the mantissa is just a binary integer.

5 bits in the mantissa. Two possible states for each bit. 25 = 32 possible distinct states. Because the state with the smallest absolute value physically represents zero, the largest physically represents 31. HOWEVER, a binary point is implicitly assumed in front of the mantissa so the logical intepretation of the mantissa alone equals its physical state times 2(-5) = 1/32. Do you understand why?

\(\displaystyle .00000_2 = 0_{10} * \left(\dfrac{1}{2^5}\right)_{10} = \left(\dfrac{0}{32}\right)_{10}.\)

\(\displaystyle .00001_2 = 1_{10} * \left(\dfrac{1}{2^5}\right)_{10} = \left(\dfrac{1}{32}\right)_{10}.\)

\(\displaystyle .00010_2 = 2_{10} * \left(\dfrac{2}{2^5}\right)_{10} = \left(\dfrac{2}{32}\right)_{10}.\)

\(\displaystyle .00011_2 = 3_{10} * \left(\dfrac{3}{2^5}\right)_{10} = \left(\dfrac{3}{32}\right)_{10}\)

.
.
.


\(\displaystyle .11100_2 = 28_{10} * \left(\dfrac{1}{2^5}\right)_{10} = \left(\dfrac{28}{32}\right)_{10}.\)

\(\displaystyle .11101_2 = 29_{10} * \left(\dfrac{1}{2^5}\right)_{10} = \left(\dfrac{29}{32}\right)_{10}.\)

\(\displaystyle .11110_2 = 30_{10} * \left(\dfrac{1}{2^5}\right)_{10} = \left(\dfrac{30}{32}\right)_{10}.\)

\(\displaystyle .11111_2 = 31_{10} * \left(\dfrac{1}{2^5}\right)_{10} = \left(\dfrac{31}{32}\right)_{10}.\)

I suggest that you create an Excel spreadsheet that shows all 32 values in a column.

Are you completely solid to here? If so, we can go on. If not, let's work on the preceding before proceeding.

For the cases you stated i have done the following, hope i'm right:

Sign of mantissa can be \(\displaystyle \pm\), exponent can be \(\displaystyle \pm 0\)

You can proceed this way, but I think it is easier to understand if we remain within the non-negative numbers for as long as possible.

The sign of the exponent is represented by one bit and so can have only two states (representing plus and minus). IN THIS PROBLEM, the exponent has only one bit and so can have only two states, 0 and 1. So how many combinations are possible? How many distinct exponents can be represented? If you had to create a formula for the number of distinct exponents that can be represented as a function of the number of bits reserved for the exponent, what would that formula be?

Please answer the preceding questions, and we can proceed.
 
I received this as a private message, but it may be more helpful to other students if I respond publicly. Moreover, if I err, someone can correct me and send me to the corner with denis.

After all this time i think i've finally got it except for one bit:

So far i have done the following:

-mantissa has 5 bits.
-1 bit for the exponent which can take the values -1, 0 or 1. Correct because + 0 = - 0 = 0. So if x is the number of bits reserved for the exponent, the number of distinct exponents is 2x - 1.

The smallest positive mantissa is +(0.00001)_(2) = 0.03125_(10)

Correct, but, as you will see, the fractional representation is easier to work with. The values run as follows

\(\displaystyle \left(\dfrac{0}{32}\right)_{10},\ \left(\dfrac{1}{32}\right)_{10},\ \left(\dfrac{2}{32}\right)_{10}, ...,\ \left(\dfrac{30}{32}\right)_{10},\ \left(\dfrac{31}{32}\right)_{10} \)

Hence, the smallest positive number that can be represented is 0.03125 * 2^(-1) = 0.015625 Yes indeed.



The biggest positive mantissa is +(0.11111)_(2) = 0.96875 Still on track


The, the biggest positive number that can be represented is 0.96875 * 2^(1) = 1.9375 Doing fine.

So the computer will overflow when the number is greater than 1.9375 i.e when it is 1.9376. AT LEAST 1.9376

Hope, i'm correct so far.

Now i know that there are 2^5 = 32 possible values for the mantissa (31 are non-zero) for a start but i don't know how to do the bit which says "How many numbers can be represented in this way?" I have an idea. I was thinking if we use the formula (+ or -)mantissa *(2)^((+ or -)exponent), so we have the combinations +mantissa *2^(+exponent), +mantissa *2^(-exponent), -mantissa *2^(-exponent), -mantissa *2^(+exponent), but the exponent can still be 0,-1,1 so trying all this will take a long long time. I'm guessing that there is a shorter way to go about this?

Thanks
Actually, if you use an excel spreadsheet, you can evaluate all the cases quite quickly, but you will find that there are duplicate values. It is eliminatiing the duplicates that takes some time doing it this way.

Let's try a more generalized way in steps (though playing with the spreadsheet may make all this more intuitive). Suppose that the number of distinct values is y when the sign bit represents plus. So how many distinct values are there, given that the mantissa's sign bit can be plus or minus?

OK. So we can limit our thinking to the possibilities when the sign bit for the mantissa is positive. Does that make sense?

Time to think about computing y.

\(\displaystyle Let\ m = the\ mantissa\ in\ base\ 10.\)

Under what circumstances will it be true that

\(\displaystyle \dfrac{m_1}{32} = \dfrac{m_2}{32} * 2^{-1} = \dfrac{m_2}{64}.\) So what kind of number is \(\displaystyle m_2\)?

What is the largest number that \(\displaystyle m_2\) can be? So what is the largest number that \(\displaystyle m_1\) can be?

Of the possible values when the exponent = 0, how many duplicate values that are possible when the exponent = - 1. What percentage of the total values possible with exponent 0 are duplicated by values with exponent - 1? What is the largest value that is duplicated between exponent - 1 and exponent 0.

But the same issue will arise between exponent 0 and exponent 1.

Now can you calculate y?
 
Last edited:
I'm sorry. I do not understand any of your last three posts.

I assume s/he is deleting the posts to avoid detection by the instructor. However, some his posts were answered with quotation - thus cannot be deleted.

This is why always answer a post from a student "with quote".
 
I assume s/he is deleting the posts to avoid detection by the instructor. However, some his posts were answered with quotation - thus cannot be deleted.

This is why always answer a post from a student "with quote".
Subhotosh Khan

That explains why the private message as well. I did not look back at the earlier posts. I just noticed that the posts after my latest made no sense.

As for the advice, I shall take it. Thanks.
 
Top