Download Print this page

IBM 2030 Manual Of Instruction page 33

Processing unit, field engineering

Advertisement

Example:
Packed-Decimal Complement Add
1st Operand +49
2nd Operand -92
+49
=
0100 1001
-92
=
1001 0010
0110 1110 Complement 2nd Opere
0100 1001 Add 1st Opere
Nc:--C---- NC From High order
1011 0111 Position indicates
Recomplement Rule 4
1011 0111
1010 0000 Rule 3
0101 0111
1010 1001 Recomplement
0000 0000 Add to Zero Rule 4
NC:--N-C-
1010 1001
1010 1010 Rule 3
-43
=
0100 0011 Result
FLOATING-POINT ARITHMETIC
Description.
Floating-point is basically a
mathemati~
cal shorthand by which numbers are
expressed as a fraction and an exponent.
This notation is an adaptation of the
scientific notation used today.
In
scientific work. very large or very
small numbers are expressed as some
number one through ten times a power of
ten.
Example
427.93456
=
4.2793456 X 10
2
0.0009762
=
9.762 X 10--
System/360 uses hexadecimal floating-
point. and the decimal point is always
to the left of the high-order digit.
The hexadecimal fraction may be thought
of as a number (base 16) X a power of
16.
Decimal numbers must first be
converted to numbers the system may use
in floating-point operations.
The sign
of the fraction will be noted in the
sign position of the floating-point
word. a 0 for plus a 1 for minus.
The
sign of the exponent will be contained
in the characteristic which will rep-
resent the exponent and
i~s
sign.
To develop the characteristic, the
exponent is expressed in excess 64
arithmetic.
The Signed exponent is
algebraically added to 64.
A result
above 64 indicates a positive exponent;
a result below 64 indicates a negative
exponent.
Conversion Example:
1.
The decimal number must be separated
into a decimal integer and a decimal
fraction.
123.725
=
123+.725
2.
The decimal integer is converted to
its hexadecimal representation.
decimal 123
=
hexadecimal 7B
3.
The decimal fraction is converted to
its hexadecimal representation.
decimal .725
=
hexadecimal .205
4.
Combine the integer and the fraction
and express as a fraction times a
power of 16.
7B.2D5
=
.7B2D5 X 162
5.
Develop the characteristics and
convert to binary
64+2
=
66
=
1000010
6.
The fraction is converted to binary
and grouped hexadecimally •
• 7B20S
=
0111 1011 0010 1101 0101
7.
The characteristic and the fraction
are stored in
floating~point
format.
The Sign position contains the sign
of the fraction
Sign
o
Characteristic
1000010
Fraction
0111 1011 0010 1101 0101 00
System/360 provides four floating-
point registers, each eight bytes in
length, for use in floating-point
operations.
The first operand of any
floating-point instruction is always
contained in one of these registers.
The result of a floating-point operation
replaces the first operand except in a
store operation.
Normalization
A quantity can be represented with the
greatest precision
by
a floating-point
number of given fraction length when
that number is normalized.
A normalized
floating-point number has a nonzero
high-order hexadecimal fraction digit.
1-29

Advertisement

loading

This manual is also suitable for:

System/360 30