Specifications

7. Application Instructions
© DELTA ELECTRONICS, INC. ALL RIGHTS RESERVED
7-17
32-bit operation
b31..b16
X
=
+1
b31 is a symbol bit b31 is a symbol bit b63 is a symbol bit )ERI'
b31=0,S(S+1) are positive value
11
b31=1,S(S+1) are negative value
11
b31=0,S(S+1) are positive value
22
b31=1,S(S+1)
22
DUHQHJDWLYHYDOXH
b63=0, D1(D1+1) (D1+2) (D1+3) are positive value
b63=1, D1(D1+1) (D1+2) (D1+3) are negative value
b15..b00 b31.. b16 b15..b00
+1
b63. b48 b47. b32 b31. b16 b15. b00
+3 +2 +1
Program Example (16-bit)
X0
MUL D0 D20D10
Ϩʳ The above program stores the multiplication result of D0 and D10 in
BIN to D20 and D21 when X0 turns on.
Ϩʳ The upper 16-bit will be saved in D21 and the lower 16-bit will be
saved in the D20.
Ϩʳ The polarity of the result is indicated by the OFF/ON of the most
significant bit. OFF indicates the value of positive 0 and ON indicates
the value of negative 1.
Program Example (32-bit)
X0
DMUL D0 D20D10
Ϩʳ The above program stores the multiplication result of the 32-bit BIN
data of D0 and D1 and the 32-bit BIN data of D10 and D11 to the 64-bit
BIN data of D20 to D23.
Ϩʳ The polarity of the result is indicated by the OFF/ON of the most
significant bit. OFF indicates the value of positive 0 and ON indicates
the value of negative 1.
D
23 DIV
S1 S2 D Performs the division BIN data
Bit device Word device
Device
Operand
X Y M S K H KnX KnY KnM KnS T C D E F
S1
ϨϨϨϨϨϨϨϨϨϨϨ
S2
ϨϨϨϨϨϨϨϨϨϨϨ
D
Ϩ Ϩ Ϩ ϨϨϨϨϨ
Performs the division of BIN data
S1
and the BIN data
S2
, and
stores the result into the device
D
.
In regards to the operation result, the quotient and remainder are
stored using 32 bits for a word device, and only the quotient is stored
using 16 bits for a bit device.
The judgment of whether the data of
S1
and
S2
are positive or
negative is made at the highest bit (b15) and for
D
, at (b31).
When using the DDIV command, the special register (additional special
device D) cannot serve as indirect assigned function.
16 bit operation
b15..............b00
/
=
b15.............. b00 b15.............. b00 b15.............. b00
+1
Quotient Remainder
Quotient : Stored to the lower 16 bits.
Remainder : Stored to the upper 16 bits. (Stored only in the case
of a word device.