200
6 BASIC INSTRUCTIONS
6.2 Arithmetic Operation Instructions
Multiplying BCD 8-digit data
DB*(P)
These instructions multiply the BCD 8-digit data specified by (s1) and the BCD 8-digit data specified by (s2), and store the
results in the device specified by (d).
■Descriptions, ranges, and data types
■Applicable devices
• These instructions multiply the BCD 8-digit data specified by (s1) and the BCD 8-digit data specified by (s2), and store the
multiplication results in the device specified by (d).
• When (d) is a bit device, only the lower 8 nibbles (32 bits) of the multiplication result are stored, and the higher 8 nibbles (32
bits) cannot be specified.
Multiplication result when (d) is a bit device
Ladder diagram Structured text
Not supported
Operand Description Range Data type Data type (label)
(s1) Multiplicand data or the head device where the data to be
multiplied by another is stored
0 to 99999999 BCD 8-digit ANY32
(s2) Multiplier data or the head device where the data by which
another is to be multiplied is stored
0 to 99999999 BCD 8-digit ANY32
(d) Head device for storing the operation result BCD 16-digit ANY32_ARRAY
(Number of elements:
2)
Operand Bit Word Double word Indirect
specification
Constant Others
X, Y, M, L,
SM, F, B, SB
U\G T, ST,
C, LC
T, ST, C, D,
W, SD, SW, R
U\G Z LC LZ K, H E $
(s1)
(s2)
(d)
• K1 ... Lower 1 nibble (b0 to b3)
• K4 ... Lower 4 nibbles (b0 to b15)
• K8 ... Lower 8 nibbles (b0 to b31)
Error code
(SD0/SD8067)
Description
2820 Device specified by (d) exceeds the allowable device range
3405 BCD data in the device specified by (s1) is outside of the valid range (0 to 99999999).
BCD data in the device specified by (s2) is outside of the valid range (0 to 99999999).
(s1)+1
9 9 99
(s1)
9 9 9
(s2)+1
99 99
(s2)
9 9 999
×
(d)+1
0 0 00
(d)
0 0 01
(d)+3
9 9 99
(d)+2
9 9 98