Download Print this page

F1Oating~Point-Data Format - IBM 4300 Manual

Processors principles of operation for ecps: vse mode
Hide thumbs Also See for 4300:

Advertisement

I
magnitude of the operands. The result is forced to
be a true zero when:
1. An exponent underflow occurs and the
exponent-underflow mask bit in the PSW is
zero,
2. The result fraction of an addition or subtraction
operation is zero and the significance mask bit
in the PSW is zero, or
3. The operand of HALVE, one or both operands
of MULTIPLY, or the dividend in DIVIDE has
a zero fraction.
When a program interruption for exponent
underflow occurs, a true zero is not forced; instead,
the fraction and sign remain correct, and the
characteristic is too large by 128. When a program
interruption for significance occurs, the fraction
remains zero, the sign is positive, and the
characteristic remains correct.
The sign of a sum, difference, product, or
quotient with a zero fraction is positive. The sign
of a zero fraction resulting from other operations is
established from the operand sign, the same as for
nonzero fractions.
Normalization
A quantity can be represented with the greatest
precision by a floating-point number of a given
fraction length when that number is normalized. A
normalized floating-point number has a nonzero
leftmost hexadecimal fraction digit.
If
one or more
leftmost fraction digits are zeros, the number is said
to be unnormalized.
Unnormalized numbers are normalized by
shifting the fraction left, one digit at a time, until
the leftmost hexadecimal digit is nonzero and
reducing the characteristic by the number of
hexadecimal digits shifted. A number with a zero
fraction cannot be normalized; its characteristic
either remains unchanged, or it is made zero when
the result is forced to be a true zero.
Floating-point operations may be performed with
or without normalization. Most operations are
performed only with normalization. Addition and
subtraction with short or long operands may be
specified as either normalized or unnormalized.
With unnormalized operations, leftmost zeros in
the result fraction are not eliminated. The result
mayor may not be normalized, depending upon the
original operands.
In both normalized and unnormalized operations,
the initial operands need not be in normalized
form. The operands for multiplication and division
are normalized before the arithmetic process. For
9-2
IBM 4300 Processors Principles of Operation
other normalized operations, normalization takes
place when the intermediate arithmetic result is
changed to the final result.
When the intermediate result of addition,
subtraction, or rounding causes the fraction to
overflow, the fraction is shifted right by one
hexadecimal-digit position and the value one is
placed in the vacated leftmost digit position. The
fraction is then truncated to the final result length,
while the characteristic is increased by one. This
adjustment is made for both normalized and
unnormalized operations.
Programming Note
Up to three leftmost bits of the fraction of a
normalized number may be zeros, since the
nonzero test applies to the entire leftmost
hexadecimal digit.
Floating-Point-Data Format
Floating-point numbers have a 32-bit (short)
format, a 64-bit (long) format, or a 128-bit
(extended) format. Numbers in the short and long
formats may be designated as operands both in
storage and in the floating-point registers, whereas
operands having the extended format can be
designated only in the floating-point registers.
The floating-point registers contain 64 bits each
and are numbered 0, 2, 4, and 6. A short or long
floating-point number requires a single
floating-point register. An extended floating-point
number requires a pair of these registers: either
registers 0 and 2 or register 4 and 6; the two
register pairs are designated as 0 or 4, respectively.
When the R
1
or R2 field of a floating-point
instruction designates any register number other
than 0, 2, 4, or 6 for the short or long format, or
any register number other than 0 or 4 for the
extended format, the operation is suppressed, and a
program interruption for specification exception
occurs.
Short F1oating-Point Number
=ls=l=c=h=a=r=a=c=t=e=r=i=st==iC==1
==6=-=D=i=9=i=t=~=r=ac==t=io=n===
o
8
31
Long F1oating-Point Nmber
~r-------------~~------/----------~
S Characteristic
14-Digit Fraction
~~------~----~--------/----------~
o
8
63
(

Advertisement

loading