Delta Electronics Extension Digital I/O Module DOP-EXIO14RAE User Manual
Page 116
![background image](/manuals/79046/116/background.png)
Appendix D Use of Application Instructions|DOP-EXIO Series
Revision March, 2008, Doc. Name: 2007PDD23000014
D-35
Mnemonic
Operands Function
DIV
D
S
1
S
2
D
Division
Bit Devices
Word Devices
X Y M S K H
KnX
KnY
KnM KnS
T
C
D
E
F
S
1
S
2
D
y
Note:
1. If
S
1
and S
2
are used in device F, only 16-bit instruction is applicable.
2. If D is used in device E, only 16-bit instruction is applicable.
16-bit instruction (7 Steps)
DIV
Continuous
execution
32-bit instruction (13 Steps)
DDIV
Continuous
execution
y
Flags: None
Operands:
S
1
: Dividend
S
2
: Divisor
D
: Quotient and remainder
Explanations:
1. This instruction divides S
1
and S
2
in BIN format and stores the result in D. Be careful with the
positive/negative signs of S
1
, S
2
and D when doing 16-bit and 32-bit operations.
2. This instruction will not be executed when the divisor is 0.
3. In 16-bit BIN division,
+1
=
/
Quotient
Remainder
When D serves as a bit device, it can designate K1 ~ K8 and construct a 32-bit result, and
bringing forth the quotient and remainder.
4. In 32-bit BIN division,
+1
/
=
+1
+1
+3
+2
Quotient
Remainder
When D serves as a bit device, it can designate K1 ~ K8 and construct a 32-bit result, and
bringing forth only quotient without the remainder.