(
(
(
c
('
The following examples show
how
to
convert the floating-
point
data stored in read/write storage from hexadecimal
to
decimal:
Example
1:
In the floating-point number 43
30
88 00
00 00 00
00,
bit
0
of
byte 0
is
off
so
the number
is
positive. Bits
1-7
of
byte 0 equal hex 43 indicating
that
the hexadecimal
point
be
moved 3 half bytes
to
the right.
After
dropping the trailing
zeros
and
moving the hexa-
decimal point, the hex number
.10 88 00
00
00 00
00
becomes 108.8.
After
the hexadecimal
point
has
been
moved, the number must
be
converted
to
its decimal
value. To convert the number
to
decimal,
multiply
the
values shown in the following chart by the value
of
each
half byte in the hexadecimal number and
add
the results:
Hexadecimal
point
after conversion
. . . . . 1048576
165536
I 4096 256 16
The converted
hexadecimal number
1 x 256
Ox
16
8x1
8 x 1/16
Result
256
o
8
0.5
264.5
o 8
The decimal value
of
the floating-point number 43 10
88
00 00
00
00
00
is
264.5.
Note that
each
half byte
to
the
left
of
the hexadecimal
point
increases
by a multiple
of
16, and
each
half byte
to
the right
of
the hexadecimal
point
decreases
by a mul-
tiple
of
1/16.
1/16
1/256 1 1/409611/65536
I 1/1048576
.....
8
Language
Support
6-11