Intel 80286 Computer Accessories User Manual


 
inter
OVERVIEW OF NUMERIC PROCESSING
t = sign is compler:nent of original operand's sign
$ = sign is "exclusive or" original operand signs
(+
if operands
had
same sign, - if operands had
different signs)
INDEFINITE
For every 80287 numeric data type, one unique encoding
is
reserved for representing the special value
indefinite. The 80287 produces this encoding
as
its response to a masked invalid-operation exception.
In the case of reals, the indefinite value can be stored and loaded like any
NaN,
and it always retains
its special identity; programmers are advised not to use this encoding for any other purpose. Packed
decimal
indefinite may be stored by the
NPX
in a FBSTP instruction; attempting
to
use this encoding
in a FBLD instruction, however,
will
have an undefined result. In the binary integers, the same encod-
ing may represent either
indefinite or the largest negative number supported by the format
(-2
15
,
- 2
31
,
or -
263).
The 80287
will
store this encoding
as
its masked response to an invalid operation, or
when the value
in
a source register represents or rounds to the largest negative integer representable
by the destination. In situations where its origin may be ambiguous, the .invalid operation exception
flag can be examined to see if the value
was
produced by an exception response. When this encoding
is
loaded, or used by an integer arithmetic or compare operation, it
is
always interpreted
as
a negative
number; thus
indefinite cannot be loaded from a packed decimal
or
binary integer.
ENCODING OF DATA TYPES
Tables 1-13 through 1-16
show
how.each of the special values just described
is
encoded for each of the
numeric data types. In these tables, the least-significant bits are shown to the right and are stored
in
the lowest memory addresses. The sign bit
is
always the left-most bit of the highest-addressed byte.
Table 1-13. Binary Integer Encodings
Class Sign Magnitude
.,
(Largest)
0
11
...
11
GI
·
·
~
'iii
· ·
0
· ·
0.
(Smallest)
0 00 ...
01
Zero
0
00
... 00
.,
(Smallest) 1 11...11
GI
.:::
·
·
-:u
·
·
C)
GI
· ·
z
(Largest/ Indefinite") 1 00 ... 00
Word:
Short:
......
1----15
bits-----l
..
~1
1
......
11----31
bits
-----t
..
~1
Long:
1
......
1---
63
bits
-----t
..
~1
NOTES:
If
this encoding is used
as
a source operand
(as
in
an
integer load or integer arithmetic instruction), the
80287 interprets it
as
the largest negative number representable
in
the format:
-2'5,
-2
3
"
or -263. The
80287 will deliver this encoding to
an
integer destination
in
two cases:
1)
If the result is the largest negative number
2)
As
the response to a masked invalid operation exception,
in
which case it represents the special value
integer indefinite.
1-29