Data Format.
Number Representation. Instructions .
ADD.
ADD HALFWORD ADD LOGICAL. AND.
BRANCH AND LINI< BRANCH ON CONDITION BRANCH ON COUNT .
BRANCH ON INDEX HIGH Contents
BRANCH ON INDEX LOW OR EQUAL. COMPARE . COMPARE AND SWAP COMPARE DOUBLE AND SWAP COMPARE HALFWORD . COMPARE LOGICAL . COMPARE LOGICAL CHARACTERS UNDER MASK COMPARE LOGICAL LONG. CONVERT TO BINARY . CONVERT TO DECIMAL. DIVIDE . EXCLUSIVE OR EXECUTE INSERT CHARACTER INSERT CHARACTERS UNDER MASK LOAD LOAD ADDRESS . LOAD AND TEST . LOAD COMPLEMENT. LOAD HALFWORD LOAD MULTIPLE . LOAD NEGATIVE. LOAD POSITIVE MONITOR CALL MOVE MOVE LONG MOVE NUMERICS. MOVE WITH OFFSET. MOVE ZONES . MULTIPLY. MULTIPLY HALFWORD OR PACK. SET PROGRAM MASK SHIFT LEFT DOUBLE SHIFT LEFT DOUBLE LOGICAL SHIFT LEFT SINGLE. SHIFT LEFT SINGLE LOGICAL SHIFT RIGHT DOUBLE . SHIFT RIGHT DOUBLE LOGICAL SHIFT RIGHT SINGLE SHIFT RIGHT SINGLE LOGICAL STORE . STORE CHARACTER. STORE CHARACTERS UNDER MASK. STORE CLOCK. STORE HALFWORD .
General Instructions · 116 · 116 · 117 · 117 · 117 · 120 · 120 · 121 · 121 · 122 · 122 · 123 · 123 · 123 · 124 · 125 · 125 · 126 · 126 · 127 · 128 · 128 · 128 · 129 · 130 · 130 · 130 · 131 · 131 · 131 · 131 · 132 · 132 · 132 · 132 · 133 · 133 · 135 · 135 · 136 · 136 · 136 · 137 · 137 · 138 · 138 · 139 · 139 139 · 140 · 140 · 140 141
141
141
141
141
142
General Instructions 115
I nstructions (continued) STORE MULTIPLE SUBTRACT.
SUBTRACT HALFWORD .
SUBTRACT LOGICAL SUPERVISOR CALL TEST AND SET. TEST UNDER MASK TRANSLATE
TRANSLATE AND TEST. UNPACK. This chapter includes all the unprivileged instruc­
tions desc:ribed in this manual, other than the deci­
mal and floating-point instructions.
Data F'ormat
The general instructions treat data as being of four
types: signed fixed-point numbers, unsigned fixed­
point numbers, unstructured logical quantities, and
decimal data. Data is treated as decimal by the con­
version, packing, and unpacking instructions and is
described in the chapter "Decimal Instructions. " Data resides in general registers or in storage or is
introduced from the instruction stream.
In a storage-to-storage operation the operand
fields may be defined in such a way that they over­
lap. The e:ffect of this overlap depends upon the
operation. When the operands remain unchanged, as
in CaMP ARE or TRANSLATE AND TEST over­
lapping does not affect the execution of the opera­
tion. For ilnstructions such as MOVE and TRANS­
LATE, one operand is replaced by new data, and the
execution of the operation may be affected by the
amount ojf overlap and the manner in which data is
fetched or stored. For purposes of evaluating the
effect of overlapped operands, data is considered to
be handled one eight-bit byte at a time. All overlap­
ping fields are considered valid.
Number Representation
Fixed-point numbers are treated as signed or un­
signed integers. In an unsigned fixed-point number, all bits are
used to express the absolute value of the number.
When two unsigned fixed-point numbers are added,
the shorter number is considered to be extended
with high-·order zeros.
For signed fixed-point numbers, the leftmost bit
represents the sign, which is followed by the integer
field. Positive numbers are represented in true binary
notation with the sign bit set to zero. Negative num- I bers are in two's-complement binary
notation with a one in the sign-bit position.
116 System/370 Principles of Operation 142
143
143
143
144
144
145
145
145
146 I Specifically, a negative num. ber is represented by
the two's complement of the positive number. The
two's complement of a number is obtained by invert-
ing each bit of the number and adding a one in the
low-order bit position.
This type of number representation can be con­
sidered the low-order portion of an infinitely long
representation of the number. When the number is
positive, all bits to the left of the most significant bit
of the number are zeros. When the number is nega­
tive, all these bits are ones. Therefore, when an oper­
and must be extended with high-order bits, the ex­
pansion is achieved by setting the bits equal to the
high-order bit of the operand.
The notation for signed fixed:-point numbers does
not include a negative zero. It has a number range in
which the set of negative numbers is one larger than
the set of positive numbers. The maximum positive
number consists of an all-one integer field with a
sign bit of zero, whereas the maximum negative
number (the negative number with the greatest ab­
solute value) consists of an all-zero integer field with
a sign bit of one.
The complement of the maximum negative num­
ber cannot be represented in the same number of
bits. When an operation, such as a subtraction of the
maximum negative number from zero, attempts to
produce the complement of the maximum negative
number, a fixed-point overflow exception is recog­
nized. An overflow does not result, however, when
the maximum negative number is complemented and
the final result is within the representable range. An
example of this case is a subtraction of the maximum
negative number from minus one. The product of
two maximum negative numbers is representable as
a double-length positive number.
In discussions of signed fixed-point numbers in
this pUblication, the expression "32-bit signed integ-. er" denotes a 31-bit integer with a sign bit, and the
expression" 64-bit signed integer" denotes a 63-bit
integer with a sign bit.
In some operations, the result is achieved by the
use of the one's coinplement of the number. The
Previous Page Next Page