EasyManua.ls Logo

Delta DVP-20PM

Delta DVP-20PM
580 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
5 Applied Instructions and Basic Usage
DVP-20PM Application Manual
5-39
API
Applicable model
20PM
22
D
D
MUL
P
P
Binary multiplication
Bit device Word device
X Y M S K H KnX KnY KnM KnS T C D V Z
S
1
S
2
D
Note: The instruction supports V devices and Z devices. (If the 16-bit
instruction is used, Z devices can not be used. If the 32-bit
instruction is used, V devices can not be used.)
Please refer to specifications for more information about device
ranges.
16-bit instruction (7 steps)
MUL
Continuity
instruction
MULP
Pulse
instruction
32-bit instruction (9 steps)
DMUL
Continuity
instruction
DMULP
Pulse
instruction
Flag: None
Explanation
The signed binary value in S
1
is multiplied by the singed binary value in S
2
, and
the product is stored in D. Users have to notice the sign bits in S
1
, S
2
, and D when
16-bit binary multiplication or 32-bit binary multiplication is done.
S
1
: Multiplicand; S
2
: Multiplier; D: Product
16-bit binary multiplication
b15..............b0
b31.........b16
X
=
b15..............b0 b15...........b0
Bit 15 is a sign bit.
Bit 15 is a sign bit.
Bit 31 is a sign bit.
(Bit 15 in D+1 is a sign bit.)
S
D
1
2
DS
+1
Sign bit=0 (Positive sign); Sign bit=1 (Negative sign)
32-bit binary multiplication
X
=
Bit 31 is a si gn bit. Bit 63 is a si gn bit.
(Bit 15 in D+3 is a sign bit.)
Bit 31 is a sign bit.
D+1
D
DD
2
S
2
S
S
1
S
1
+1 +1
+2+3
b 31 ...b 1 6 b 15 ...b 0 b63...b 4 8
b47...b32
b 31 ...b 1 6 b 15 ...b 0b 31 ...b 1 6 b 15 ...b 0
Sign bit=0 (Positive sign); Sign bit=1 (Negative sign)
Example
The 16-bit value in D0 is multiplied by the 16-bit value in D10, and the 32-bit
product is stored in (D21, D20). The bits in D21 is the high 16 bits in (D21, D20),
whereas the bits in D20 is the low 16 bits in (D21, D20). Whether the product is a
positive value or a negative value depends on the leftmost bit in (D21, D20).
X0
MUL D0 D10 D20
MUL D0 D10 K8M0

Table of Contents

Other manuals for Delta DVP-20PM

Related product manuals