# Why mantissa and exponent are stored differently in a float?

As we know, in IEEE 754 standard, float number's exponent and mantissa are stored differently. While the exponent is stored as an unsigned number, taking advantage of the bias, the mantissa is in sign-magnitude format.

The reason to use a bias seems to be the fact that another value of exponent can be achieved this way, effectively providing a considerable amount of "new" numbers that can be represented (2^24 for 32 bit floats).

On the other hand, using the same system in mantissa would provide only 2^8 new values which, given the whole range of a 32 bit number, is nothing.

For humans, it would obviously be much more difficult to read float numbers with mantissa expressed the same way the exponent is.

Is that the sole reason against such notation?

Isn't a unified notation system, simplified arithmetics and a tiny bit larger range worth the hassle?

• Human consumption of the format is most certainly not the reason behind these choices. The format was designed for computer arithmetic. – Yuval Filmus Feb 2 '17 at 11:13
• In my opinion the use of bias in the exponent makes much more easier to check whether or not you have subnormal numbers, checking infinity and NaN is also easy, because it reduce to or reduce operations, or and reduce operations. Checking if your number is 0 is also easy. Storing mantissa in that specific way (sign and magnitude) makes much easier to perform the normal arithmetic operations. – user8469759 Feb 2 '17 at 11:31
• @user8469759 There are indeed many readability features, but as it was already mentioned, that shouldn't, and probably isn't the biggest priority. As for the ease of arithmetics, nothing beats 2C format. – Dart Dega Feb 2 '17 at 12:59
• @DartDega, I'm not entirely sure what do you mean by "they're stored differently", both exponent and mantissa are actually fixed point numbers (unsigned), it is how you use them together that provides the interpretation. And even if you think "2C" isn't beat by anything, I wouldn't say that it is actually true, because it's quite common especially for advanced design of digital arithmetic operators to switch such format to intermediate ones (carry-save... booth encoding, are some of them). – user8469759 Feb 2 '17 at 13:44
• It's all context dependent (namely: performance, effectiveness, granularity etc). All most famous and well known numerical analysis algorithms are analyzed assuming floating point arithmetic is used, so whatever kind of advantage you think 2C could possible have over FP one should say in first instance that FP must be used anyway, however in practice you probably can work out that using fixed point formats is actually better for many many reasons. They generally have different error properties, and to design FP operators you actually need fixed point arithmetic (2C). – user8469759 Feb 2 '17 at 13:49