Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

IEEE-754-2008 standard questions

31 views
Skip to first unread message

Daku

unread,
Feb 4, 2012, 11:18:43 PM2/4/12
to
May be my query is more appropriate for the comp.arch.arithmetic
forum, but lately it has
become filled up by spam and trash. I have a
few questions regarding the IEEE-754-2008
standard.
As per this standard, the general format for a
32 bit number converted to his format is
1 bit for sign, 8 bits for exponent and 23 bits
for mantissa/significand. The mantissa is
always of the form 1.<fraction part>. So for
example, 12.375 converted to this format is
1.5468.., with exponent of 3. The standard
32 representation does not contain the "1.",
-- the "hidden bit".
So, given all of this, how would one convert
a number from the IEEE-754-2008 format
to the standard human understandable form.
For example, 2*12.375 = 24.75, but in the
IEEE-754-2008 32-bit format it is 1.<some
fraction>
Any hints/suggestions would be greatly
appreciated. Thanks in advance for your help.

Quadibloc

unread,
Feb 5, 2012, 5:05:52 PM2/5/12
to
On Feb 4, 9:18 pm, Daku <dakup...@gmail.com> wrote:

> So, given all of this, how would one convert
> a number from the IEEE-754-2008 format
> to the standard human understandable form.

I'm not understanding your question.

The fact that there is a "hidden bit" doesn't make it that much more
difficult to convert such a number to a human-readable value. All
that's needed is to read the standard carefully enough to know exactly
where to place the binary point - exactly what offset is to be applied
to the exponent.

Everything else is just about the same as converting any other
floating-point format.

John Savard

Brian Drummond

unread,
Feb 7, 2012, 4:43:43 AM2/7/12
to
On Sat, 04 Feb 2012 20:18:43 -0800, Daku wrote:

> As per this standard, the general format for a 32 bit number converted
> to his format is 1 bit for sign, 8 bits for exponent and 23 bits for
> mantissa/significand. The mantissa is always of the form 1.<fraction
> part>.

> So, given all of this, how would one convert a number from the
> IEEE-754-2008 format to the standard human understandable form. For
> example, 2*12.375 = 24.75, but in the IEEE-754-2008 32-bit format it is
> 1.<some fraction>

No it isn't.
It is 1.<some fraction> * 2^<exponent - bias>

Hope this helps.

- Brian
0 new messages