191
D+, D+P, D-, D-P
1
2
3
4
6
7
8
6.2
A
rithmetic Opera
tion In
str
uctions
6.2.2
D
+, D+P, D-
, D-P
When two data are set (( +1, )+( +1, ) ( +1, ), ( +1, )-( +1, ) ( +1, ))
:
Data for additing/subtracting or head number of the devices where the data for additing/subtracting is stored (BIN 32 bits)
: Head number of the devices where the data to be added to/subtracted from is stored (BIN 32 bits)
Function
D+
(1) Adds 32-bit BIN data designated by to 32-bit BIN data designated by , and stores the result of the addition at the
device designated by .
(2) The values for and can be designated at between -2147483648 and 2147483647 (BIN 32 bits).
(3) Judgment of whether the data is positive or negative is made on the basis of the most significant bit (b31).
• 0: Positive
• 1: Negative
(4) The following will happen when an underflow or overflow is generated in an operation result:
The carry flag in this case does not go ON.
D-
(1) Subtracts 32-bit BIN data designated by from 32-bit BIN data designated by and stores the result of the subtraction
at the device designated by .
(2) The values for and can be designated at between -2147483648 and 2147483647 (BIN 32 bits).
(3) Judgment of whether the data is positive or negative is made on the basis of the most significant bit (b31).
• 0: Positive
• 1: Negative
D+, D+P, D-, D-P
BIN 32-bit addition and subtraction operations
6.2.2
D+, D+P, D-, D-P
Setting
Data
Internal Devices
R, ZR
J \
U \G
Zn
Constants
K, H
Other
Bit
Word
Bit
Word
––
––
––
Basic
Process
High
performance
Redundant Universal
LCPU
D
D
S
S
D
D
D
D
S
S
D
D
Command
Command
P
D+, D
D+/
D+P, D P
S
D
S
D
D
indicates an instruction s
y
mbol of .
S
D
S
D
D
S
D
+
1
123
4
56
(
B
IN)
b0
b16
b15
+
1
567890
(
B
IN)
b31
6913
4
6
(
B
IN)
D
D
S
S
+
1
D
D
b0
b16
b15
b31
b0
b16
b15
b31
S
D
S
i
nce
b
i
t
31
va
l
ue
i
s
"
0
",
resu
l
t
of
operat
i
on
ta
k
es
a
pos
i
t
i
ve
va
l
ue
.
S
i
nce
b
i
t
31
va
l
ue
i
s
"
1
",
resu
l
t
of
operat
i
on
ta
k
es
a
negat
i
ve
va
l
ue
.
K
21
4
7
4
836
4
7
(
7
FFFFFFF
H
)
K
21
4
7
4
836
4
8
(
80000000
H
)
+K
2
(
00000002
H
)
+K
2
(FFFFFFFE
H
)
K
(
80000001
H
)
K
21
4
7
4
836
4
6
(
7
FFFFFFE
H
)
21
4
7
4
836
4
7
D
S
D
+1
123456
(
BIN
)
b0
b16 b15
567890
(
BIN
)
b31
444434
(
BIN
)
D
S
+1
D
S
D +1
D
b0
b16 b15
b31
b0
b16 b15
b31
S
D