OVERVIEW OF NUMERIC PROCESSING
Table 1-5. Real Number Notation
Notation Value
Ordinary Decimal 178.125
Scientific Decimal
1A78125E2
Scientific Binary
1A0110010001E111
Scientific Binary
1A0110010001E10000110
(Biased Exponent)
80287 Short Real
Sign
Biased Exponent Significand
(Normalized)
0 10000110
~100100010000000000000
1 A (implicit)
BINARY INTEGERS
The three binary integer formats are identical except for length, which governs the range that can be
accommodated
in
each format. The leftmost bit
is
interpreted as the number's sign: O=positive and
1 = negative. Negative numbers are represented
in
standard two's complement notation (the binary
integers are the only
80287 format
to
use two's complement). The quantity zero
is
represented with a
positive sign (all bits are
0). The 80287 word integer format
is
identical to the 16-bit signed integer
data type of the
80286.
DECIMAL INTEGERS
Decimal integers are stored in packed decimal notation, with
two
decimal digits "packed" into each
byte, except the leftmost byte, which carries the sign bit (O=positive, 1 = negative). Negative numbers
are not stored in two's complement form and are distinguished from positive numbers only
by
the
sign bit. The most significant digit of the number
is
the leftmost digit. All digits must be
in
the range
OH-9H.
REAL NUMBERS
The 80287 stores real numbers in a three-field binary format that resembles scientific, or exponential,
notation. The number's significant digits are held
in
the significand field, the exponent field locates
the binary point within the significant digits (and therefore determines the number's magnitude), and
the
sign field indicates whether the number
is
positive or negative. (The exponent and significand are
analogous to the terms
"characteristic" and "mantissa" used
to
describe floating point numbers
on
some computers.) Negative numbers differ from positive numbers only
in
the sign bits of their
significands.
Table
1-5
shows
how
the real number 178.125 (decimal)
is
stored in the 80287 short real format. The
table lists a progression of equivalent notations that express the same value to
show
how
a number can
be
converted from one form
to
another. The ASM286 and PL/M-286 language translators perform a
similar process when they encounter programmer-defined real number constants. Note that not every
decimal fraction has an exact binary equivalent. The decimal number
1/10, for example, cannot be
expressed exactly in binary
Gust as the number
1/3
cannot
be
expressed exactly in decimal). When a
translator encounters such a value, it produces a rounded binary approximation of the decimal value.
1-17