Basic instruction (32-bit)
3.27.3
Arithmetic operation instruction
An arithmetic operation instruction instructs the addition, subtraction, multiplication or division for two BIN data, or operation of
increment or decrement.
BIN arithmetic operation (binary)
• If the operation result of an addition instruction exceeds 2147483647, the value is negative.
• If the operation result of a subtraction instruction is smaller than -2147483648, the value is positive.
• Operations of positive values and negative values are as follows.
5 + 8 13
5 - 8 -3
5 3 15
-5 3 -15
-5 (-3) 15
-5 3 -1 remainder -2
5 (-3) -1 remainder 2
-5 (-3) 1 remainder -2
3.27.4
Arithmetic operation instruction:
BIN 32-bit addition/subtraction ... D+, D+P, D-, D-P
Bit device
X
Y
M
S
D
S
S2
S2
D1
Addition/subtraction commands
Addition/subtraction commands
160
Sequence program
Applicable device
Word (16-bit) device
Constant
T
C
D
K
Digit
Level
specification
H
N
K1 to K8
Instruction symbol inside
D+, D-
Setting data
Start number of the addition/
S
subtraction data or the device in which
the addition/subtraction data is stored
Start number of the device in which the
D
added/subtracted data is stored
Start number of the added/subtracted
data or the device in which the added/
S1
subtracted data is stored
Start number of the addition/
subtraction data or the device in which
S2
the addition/subtraction data is stored
Start number of the device in which the
D1
addition/subtraction results are stored
Error flag
(SM0)