Logic Instructions
5-18-4
BINARY DIVIDE – DVB(53)
Description
Flags
5-19
Logic Instructions
5-19-1
COMPLEMENT – COM(29)
Description
Example
Ladder Symbols
DVB(53)
@DVB(53)
Dd
Dr
R
When the execution condition is OFF, DVB(53) is not executed. When the
execution condition is ON, DVB(53) divides the content of Dd by the content
of Dr and the result is placed in R and R+1: the quotient in R, the remainder
in R+1.
Quotient
Dr
ER:
Dr contains 0.
Indirectly addressed DM word is non-existent. (Content of *DM word
is not BCD, or the DM area boundary has been exceeded.)
EQ:
ON when the result is 0.
The logic instructions – COM(29), ANDW(34), ORW(35), XORW(36), and
XNRW(37) – perform logic operations on word data.
Ladder Symbols
COM(29)
@COM(29)
Wd
When the execution condition is OFF, COM(29) is not executed. When the
execution condition is ON, COM(29) clears all ON bits and sets all OFF bits
in Wd.
15
Original
1
15
Complement
0
IR, SR, AR, DM, HR, TC, LR, #
Dd
IR, SR, AR, DM, HR, TC, LR, #
Dr
R
Remainder
R
R + 1
Dd
Wd
0
0
1
1
0
0
1
1
0
0
1
1
Section 5-19
Operand Data Areas
Dd: Dividend word (binary)
Dr: Divisor word (binary)
R: First result word
IR, AR, DM, HR LR
Operand Data Areas
Wd: Complement word
IR, AR, DM, HR, LR
1
1
0
0
1
1
0
0
0
1
1
0
0
1
00
0
1
00
1
0
179