computations in which the range of values used varies widely.
It is called floating point because the radix-point placement,
or scaling, is automatically maintained by the machine.
The key to floating-point data representation is the
(scale) of the number. Thus, the number is expressed as a
fraction times a power of 16.
A floating-point number has two associated sets of values.
is called the fraction. The second set specifies the power
(exponent) to which 16 is raised and indicates the location
of the binary point of the number.
The two numbers (the fraction and exponent) are recorded
in a single word, a doubleword, or two doublewords.
Since each of these two numbers is signed, some method
must be employed to express two signs in an area that
fraction sign use the sign associated with the word (or
doubleword) and expressing the exponent in exccss-64
notation; that is, the exponent is added as a signed number
to 64.
characteristic can vary from
scale
fraction, if normalized, must be less than one and greater
than or equal to 1/16, so the range covered by the
L6 -65
63
or more precisely:
In the
16 -6
5
63
In the long format:
16 -6 5
6
3
In the
65
:::;;;
28
) X 16
63
In decimal terms:
16-
65
is approximately equal to 5.4 x 10-
79
16
63
is a.pproximately equal to 7.2 x 10
75
Floating .. point data in System/370 may be recorded in
short, long, or extended formats. Each format uses a sign
bit in bit position
positions 1-7. Short floating-point operands contain the
fraction in bit positions 8-31; long operands have the
fraction in bit positions 8-63 and 72-127.
Long Floating-Point Number
o 1 8
Extended Floating-Point Number
o 1
8
64 72 127
The sign of the fraction is indicated by a zero or one bit in
bit position
respectively.
Within a given fraction length (6, 14, or 28 digits), a
floating-point operation provides the greatest precision if
the fraction is normalized. A fraction is normalized when
the high-order digit (bit positions 8, 9,
zeros.
If normalization of the operand is desired, the
used. This automatic normalization is accomplished by
left-shifting the fraction (four bits per shift) until a nonzero
digit occupies the high-order digit position. The
Convert the decimal
floating-point operand. (Appendix G provides tables for
the conversion of hexadecimal and decimal integers and
fractions.)
1. The number is decomposed into decimal integer and a
decimal fraction:
149.25 = 149 plus
representation.
3. The decimal fraction is converted to its hexadecimal
representation.
as a fraction times a power of 16 (exponent).
95.4 16 =0.95416 X 16
2