Bin 32-Bit Addition And Subtraction Operations - Mitsubishi Electric MELSEC-Q/L Programming Manual

Hide thumbs Also See for MELSEC-Q/L:
Table of Contents

Advertisement

BIN 32-bit addition and subtraction operations

D+(P), D-(P) [When two data are set]
High
Basic
Process
performance
D+, D
D+P, D P
(S): Data for adding/subtracting or head number of the devices where the data for adding/subtracting is stored (BIN 32 bits)
(D): Head number of the devices where the data to be added to/subtracted from is stored (BIN 32 bits)
Setting
Internal device
data
Bit
(S)
(D)
Processing details
■D+
• Adds 32-bit BIN data designated by (D) to 32-bit BIN data designated by (S), and stores the result of the addition at the
device designated by (D).
D
D
+1
b31
b16 b15
b0
567890 (BIN)
• The values for (S) and (D) can be designated at between -2147483648 and 2147483647 (BIN 32 bits).
• Judgment of whether the data is positive or negative is made on the basis of the most significant bit (b31).
• 0  Positive
• 1  Negative
• The following will happen when an underflow or overflow is generated in an operation result: The carry flag (SM700) in this
case does not turn ON.
+K2
K2147483647
(00000002
(7FFFFFFF
)
H
K 2147483648
+K 2
(80000000
)
(FFFFFFFE
H
6 BASIC INSTRUCTIONS
224
6.2 Arithmetic Operation Instructions
Redundant Universal
LCPU
Command
Command
R, ZR
Word
S
S
D
+1
b31
b16 b15
b0
b31
123456 (BIN)
691346 (BIN)
K
2147483647
)
(80000001
)
H
H
K2147483646
)
(7FFFFFFE
)
H
H
J\
Bit
Word
D
+1
b16 b15
b0
Since bit 31 value is "1",
result of operation takes a negative value.
Since bit 31 value is "0",
result of operation takes a positive value.
indicates an instruction symbol of
S
D
S
D
P
U\G
Zn
Constant
K, H
D+/
D
.
Others

Advertisement

Table of Contents
loading

Table of Contents