Example
2:
In the floating-point number
40
CO
00 00
00 00 00 00,
bit
0
of
byte 0
is
off,
so
the number
is
positive. Bits
1-7
equal hex
40
indicating no movement
of
the hexadecimal point.
After
dropping trailing
zeros,
the hexadecimal number
is
.C
(hex C = 12). Using the
chart in example 1, multiply
12
by 1/16, which
equals
0.75. The decimal
value
of
the floating-point number
40
CO
00 00 00 00 00 00
is
0.75.
Example
3:
In
the floating-point number
BF
50 00 00
00 00 00 00,
bit
0
of
byte 0
is
on
so
the number
is
negative. Bits
1-7
equal
3F indicating
that
the hexadecimal
point
be
moved 1 half byte
to
the left.
After
dropping
the trailing
zeros
and
moving the hexadecimal point, the
hex number .50000000000000
becomes
-0.05.
Using
the chart in example 1,
multiply:
Ox
1/16
5 x 1/256
Result
o
0.01953125
-0.01953125
So
the decimal
value
of
the floating-point number
BF
50
00
00 00 00
00
00
is
-0.01953125.
By using this procedure, any floating-point number
can
be
converted
to
its decimal value.
6-12
(
~\
/
i
/