Decrementing 16-bit binary data
DEC(_U)
These instructions decrement the specified 16-bit binary data by one.
ST
ENO:=DEC(EN,d);
■Execution condition
Instruction
DEC
DEC_U
Setting data
■Description, range, data type
Operand
Description
(d)
DEC
Decrement target device
DEC_U
EN
Execution condition
ENO
Execution result
■Applicable devices/labels
Operand
Bit
SB
(d)
Processing details
• These instructions decrement the 16-bit binary data in the device specified by (d) by one.
(d)
b15
b0
b15
···
5678 (BIN)
-1
• When the DEC instruction is executed while the data in the device specified by (d) is -32768, 32767 is stored in the device
specified by (d).
• When the DEC_U instruction is executed while the data in the device specified by (d) is 0, 65535 is stored in the device
specified by (d).
Operation error
There is no operation error.
Execution condition
RX, RY, LB
(d)
b0
···
5677 (BIN)
ENO:=DEC_U(EN,d);
Range
-32768 to 32767
0 to 65535
Word
SW
G, RWw, RWr, LW
6.1 Arithmetic Operation Instructions
Data type
ANY16_S
ANY16_U
BOOL
BOOL
Constant
K, H
6 BASIC INSTRUCTIONS
6
73