Page of GA22-7000-4 Revised September 1, 1975
By TNL:GN22-0498 Add Logical
[RR]L_1 E ----l-R-----L.-' I I o 8 12 15
J
D2_____ o 8 12 16 20 31
The slecond operand is added to the first operand,
and the sum is placed in the first-operand location.
The occurrence of a carry out of the sign position is
recorded in the condition code.
Logical addition is performed by adding all 32
bits of both operands without further change to the
resulting sign bit. The instruction differs from ADD
in the meaning of the condition code and in the ab
sence of the interruption for overflow.
If a carry out of the sign position occurs, the left
most bit of the condition code is made one. In theabsence of a carry, the bit is made zero. When the
sumis zero, the rightmost bit of the condition code is
made zero. For a nonzero sum, the bit is made one.
Resulting Condition Code:
o Sum is zero, with no carry
1 Sum is not zero, with no carry
2 Sum is zero, with carry
3 Sum is not zero, with carry
Progl'am Exceptions:
Access (fetch, operand 2 of AL only)
AN1)
NR Rl,R2 [RR]120 System/370 Principles of Operation N R 1 ,D2(X2,B2) [RX] I 54 R, X
2I B2 I 0 8 12 16 20 31
NIDl(Bl),h [SI]
[
94I 12 I B, I 0, I 0 8 16 20 31
NC [SS]
The AND of the first and second operands is placed
in the first-operand location.Operands are treated as unstructured logical
quantities, and the connective AND is applied bit by
bit. A bit position in the result is set to one if the
corresponding bit positions in both operands contain
a one; otherwise, the result bit is set to zero.
For NC, each operand field is processed left to
right. When the operands overlap, the result is ob
tained as if the operands were processed one byte at
a time and each result byte were stored immediately
after the necessary operand byte is fetched.
Resulting Condition Code:
o Result is zero
1 Result not zero
2 -
3 -
Program Exceptions:
Access (fetch, operand 2, Nand NC;fetch and
store, operand 1, NI and NC)
Programming Note
The instruction AND may be used to set a bit to
zero.
The execution of NI and NC consists in fetching a
first-operand byte from main storage and subse
quently storing the updated value. These fetch and
store accesses to a particular byte do not necessarily
occur one immediately after the other. Thus, the
instruction AND cannot be safely used to update a
shared location in main storage if the possibility ex
ists that anotherCPU or a channel may also be updat
ing the location. For NI, only one byte is stored.
By TNL:
[RR]
J
D2
The slecond operand is added to the first operand,
and the sum is placed in the first-operand location.
The occurrence of a carry out of the sign position is
recorded in the condition code.
Logical addition is performed by adding all 32
bits of both operands without further change to the
resulting sign bit. The instruction differs from ADD
in the meaning of the condition code and in the ab
sence of the interruption for overflow.
If a carry out of the sign position occurs, the left
most bit of the condition code is made one. In the
sum
made zero. For a nonzero sum, the bit is made one.
Resulting Condition Code:
o Sum is zero, with no carry
1 Sum is not zero, with no carry
2 Sum is zero, with carry
3 Sum is not zero, with carry
Progl'am Exceptions:
Access (fetch, operand 2 of AL only)
AN1)
NR Rl,R2 [RR]
2
NI
[
94
NC [SS]
The AND of the first and second operands is placed
in the first-operand location.
quantities, and the connective AND is applied bit by
bit. A bit position in the result is set to one if the
corresponding bit positions in both operands contain
a one; otherwise, the result bit is set to zero.
For NC, each operand field is processed left to
right. When the operands overlap, the result is ob
tained as if the operands were processed one byte at
a time and each result byte were stored immediately
after the necessary operand byte is fetched.
Resulting Condition Code:
o Result is zero
1 Result not zero
2 -
3 -
Program Exceptions:
Access (fetch, operand 2, Nand NC;
store, operand 1, NI and NC)
Programming Note
The instruction AND may be used to set a bit to
zero.
The execution of NI and NC consists in fetching a
first-operand byte from main storage and subse
quently storing the updated value. These fetch and
store accesses to a particular byte do not necessarily
occur one immediately after the other. Thus, the
instruction AND cannot be safely used to update a
shared location in main storage if the possibility ex
ists that another
ing the location. For NI, only one byte is stored.