Complement Of 2 Of Bin 16-Bit Data (Sign Inversion), Complement Of 2 Of Bin 32-Bit Data (Sign Inversion) - Mitsubishi Electric MELSEC-Q/L Programming Manual

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

Advertisement

Complement of 2 of BIN 16-bit data (sign inversion), complement
of 2 of BIN 32-bit data (sign inversion)
NEG(P), DNEG(P)
High
Basic
Process
Redundant Universal
performance
NEG, DNEG
NEGP, DNEGP
(D): Head number of the devices where the data for which complement of 2 is performed is stored (BIN 16/32 bits)
Setting
Internal device
data
Bit
Word
(D)
Processing details
■NEG
• Reverses the sign of the 16-bit device designated by (D) and stores at the device designated by (D).
b15
Before execution
D
1
0
Sign conversion
b15
0
After execution
D
• Used when reversing positive and negative signs.
■DNEG
• Reverses the sign of the 32-bit device designated by (D) and stores at the device designated by (D).
b31
Before
execution
D
1
1
1
1
0
0
0
Sign
1
1
1
conversion -
b31
After
0
0
0
D
execution
• Used when reversing positive and negative signs.
Operation error
• There is no operation error in the NEG(P) or DNEG(P) instruction.
LCPU
Command
Command
R, ZR
J\
Bit
16 bit
0
0
0
0
1
1
1
1
0
0
0
0
0
0
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
32 bit
1
1
1
1
0
1
0
0
0
0
0
0
1
1
1
1
0
1
0
0
0
0
1
0
indicates an instruction symbol of
U\G
Word
b0
0
0
0
0
1
1
1
1
0
0
0
0
0
0
0
0
1
0
1
0
1
0
1
0
b0
0
1
0
1
0
1
1
0
b0
0
0
1
0
0
-218460
0
0
0
0
0
0
0
1
0
0
b0
1
1
1
0
0
218460
NEG/DNEG.
D
P
D
Zn
Constant
Others
-21846
21846
6 BASIC INSTRUCTIONS
6.3 Data Conversion Instructions
6
287

Advertisement

Table of Contents
loading

Table of Contents