6 - 21 6 - 21
MELSEC-Q/QnA
6 BASIC INSTRUCTIONS
(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.
K2147483647
(H7FFFFFFF)
K-2147483648
(H80000000)
+K2
(H2)
+K-2
(HFFFE)
(H80000001)
K2147483646........Because b31 is 0,
the value is positive.
(H7FFFFFFE)
K-2147483647.......Because b31 is 1,
the value is negative.
D
-
(1) Subtracts 32-bit BIN data designated by
D
from 32-bit BIN data designated by
S
and stores
the result of the subtraction at the device designated by
D
.
+1
123456 (BIN)
567890 (BIN)
b31- -b16 b15- -b0
444434 (BIN)
D
S
+1
D
S
D
+1
D
b31- -b16 b15- -b0 b31- -b16 b15- -b0
-
(2) The values for
S
and
D
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.
•
K2147483647
(H7FFFFFFF)
•
K-2147483648
(H80000000)
-K2
(H2)
(HFFFE)
-K-2
(H7FFFFFFE)
K2147483646........Because b31 is 0,
the value is positive.
(H80000001)
K-2147483647.......Because b31 is 1,
the value is negative.
[Operation Errors]
(1) There are no operation errors associated with the +(P) or -(P) instructions.
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com