Computer Architechture: Size of Mantissa

  • Thread starter Thread starter wclawson
  • Start date Start date
  • Tags Tags
    Computer
Click For Summary

Discussion Overview

The discussion revolves around the floating point representation in computer architecture, specifically focusing on the size of the mantissa given a ratio of Xmax/Xmin and the implications of different mantissa formats (0.xxx vs. 1.xxx). Participants explore the calculations involved in determining the size of the mantissa and the number of representable values.

Discussion Character

  • Homework-related, Technical explanation, Exploratory

Main Points Raised

  • Participants question the correctness of the exponent value in the given ratio of Xmax/Xmin, suggesting it should be 4096 instead of 4076.
  • There is discussion about the total number of bits in the floating point representation, with typical sizes mentioned as 32, 64, or 80 bits.
  • Some participants propose that if 1 bit is used for the sign and 12 bits for the exponent, the remaining bits can be calculated for the mantissa.
  • There is uncertainty about whether the mantissa size includes the leading 1 in the representation (1.M), with some participants suggesting it does not.
  • Participants explore the implications of using 0.xxx instead of 1.xxx for the mantissa, questioning how this affects the number of representable values and the range of numbers.
  • One participant suggests that using 0.xxx would halve the number of representable values, while another argues that the range remains unchanged.
  • There is a clarification regarding the representation being binary, not decimal, and the correct form of the maximum number displayable based on the mantissa.
  • One participant expresses gratitude for the assistance and seeks confirmation on their understanding of the bias and maximum number representation.

Areas of Agreement / Disagreement

Participants generally agree on some aspects of the floating point representation, such as the bit allocation for the sign and exponent. However, there are competing views regarding the implications of different mantissa formats and the calculations for maximum representable values, indicating that the discussion remains unresolved in these areas.

Contextual Notes

There are limitations in the discussion regarding the assumptions made about the total number of bits in the floating point representation and the specific implications of using different mantissa formats. The exact calculations for the number of representable values and the effect on range are not fully resolved.

wclawson
Messages
17
Reaction score
0

Homework Statement


Floating Point representation:
Given Xmax/Xmin=2^4076, what is the size of the mantissa? How many numbers can exist?
If mantissa is 0.xxx instead of 1.xxx, how many numbers can exist?

Homework Equations



(-1)S x 1.M x BE

The Attempt at a Solution



I'm not sure, but is this the correct method to use?
{(-1)-S'(1.M')(BE'-E'')+(-1)-S''(1.M'')}BE''
 
Physics news on Phys.org
wclawson said:

Homework Statement


Floating Point representation:
Given Xmax/Xmin=2^4076, what is the size of the mantissa? How many numbers can exist?
If mantissa is 0.xxx instead of 1.xxx, how many numbers can exist?

Homework Equations



(-1)S x 1.M x BE

The Attempt at a Solution



I'm not sure, but is this the correct method to use?
{(-1)-S'(1.M')(BE'-E'')+(-1)-S''(1.M'')}BE''

Do you have a typo in your given information about Xmax/Xmin? The exponent should be 4096, I believe. 4096 = 212, which means 12 bits for the exponent of your floating point number.

You didn't mention how many bits there are overall in your floating point number, but the typical sizes are 32 bits, 64 bits, and sometimes 80 bits. If 1 bit is used for the sign, and 12 bits for the exponent, how many bits are left for the mantissa?

If the mantissa is assumed to be 1.xxx rather than 0.xxx, how many bits do you save by doing this?
 
Mark44 said:
Do you have a typo in your given information about Xmax/Xmin? The exponent should be 4096, I believe. 4096 = 212, which means 12 bits for the exponent of your floating point number.

You didn't mention how many bits there are overall in your floating point number, but the typical sizes are 32 bits, 64 bits, and sometimes 80 bits. If 1 bit is used for the sign, and 12 bits for the exponent, how many bits are left for the mantissa?

If the mantissa is assumed to be 1.xxx rather than 0.xxx, how many bits do you save by doing this?

Yes, thank you for noticing my mistake it should be 4096.

So a FP number with 32 bits would have 32-12-1=19 bits, but does that include the 1 preceding the M (1.M)?

By having 0.xx instead of .xx, does that mean that only half the amount of numbers represented with 1.xx can be used? What is it's effect of number range?
 
wclawson said:
Yes, thank you for noticing my mistake it should be 4096.

So a FP number with 32 bits would have 32-12-1=19 bits, but does that include the 1 preceding the M (1.M)?
No, it doesn't. That bit is assumed to be 1, and this gives you an extra bit for the mantissa.
wclawson said:
By having 0.xx instead of .xx, does that mean that only half the amount of numbers represented with 1.xx can be used? What is it's effect of number range?
Yes. There's no effect on the range, as xmin and xmax are still the same. It gives you a little more precision though.
 
Mark44 said:
No, it doesn't. That bit is assumed to be 1, and this gives you an extra bit for the mantissa.
Yes. There's no effect on the range, as xmin and xmax are still the same. It gives you a little more precision though.

Ok, I see. Let me make sure I have this straight.

Since there are 12 bits for E, that means the bias is 2047.
Therefore the largest number possible to display is 22047 times 1.9999... (from the mantissa), right?
 
wclawson said:
Ok, I see. Let me make sure I have this straight.

Since there are 12 bits for E, that means the bias is 2047.
I think this is right.
wclawson said:
Therefore the largest number possible to display is 22047 times 1.9999... (from the mantissa), right?
It wouldn't be 1.9999... The representation is binary, not decimal. It would be 1.1111...111, with 20 1's after the binary point. (Remember, that leading one to the left of the binary point is assumed.)
 
Mark44 said:
I think this is right.
It wouldn't be 1.9999... The representation is binary, not decimal. It would be 1.1111...111, with 20 1's after the binary point. (Remember, that leading one to the left of the binary point is assumed.)

Sorry, I should have said 1.9, written in base 10. For finding the max number, this rounds to 2 and is multiplied by the largest exponent (22047)?

Thanks, you have been a huge help.
 
Last edited:
Sure, you're welcome!

Here's a link to some related material on the IEEE 754 standard for floating point matters. This particular page is about 32-bit floats, similar to but not identical to what you're doing. http://en.wikipedia.org/wiki/Binary32
 

Similar threads

  • · Replies 17 ·
Replies
17
Views
3K
Replies
9
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
Replies
10
Views
4K
Replies
4
Views
2K
Replies
6
Views
10K
  • · Replies 5 ·
Replies
5
Views
6K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K