Omron C200HE User Manual

Page of 564
255
Example
In the following example, MBSL(––) is used to multiply the signed binary con-
tents of IR 101 and IR 100 with the signed binary contents of DM 0021 and
DM 0020 and output the result to LR 24 through LR 21.
MBSL(––)
100
DM 0020
LR 21
Address
Instruction
Operands
00000
LD
00000
00001
MBSL(––)
100
DM
0020
LR
21
00000
Md: IR 100
7
9
3
8
Mr: DM 0020
A
8
1
2
R: LR 21
4
5
F
0
R+1: LR 22
F
C
A
5
(555,320)
(–1,005,550)
(–558,402,026,000)
Md+1: IR 101
0
0
0
8
Mr+1: DM 0021
F
F
F
0
X
R+2: LR 23
F
F
7
D
R+3: LR 24
F
F
F
F
5-20-9 SIGNED BINARY DIVIDE – DBS(––)
Dd: Dividend word
IR, SR, AR, DM, HR, TC, LR, #
Dr: Divisor word
IR, SR, AR, DM, HR, TC, LR, #
Ladder Symbols
Operand Data Areas
R: First result word
IR, SR, AR, DM, HR LR
DBS(––)
Dd
Dr
R
@DBS(––)
Dd
Dr
R
Limitations
R and R+1 must be in the same data area.
Description
DBS(––) divides the signed binary content of Dd by the signed binary content of
Dr, and outputs the 8-digit signed binary result to R+1 and R. The quotient is
placed in R, and the remainder is placed in R+1. Refer to page 27 for details on
signed binary data.
Dd
Dr
  R + 1
Quotient
Remainder
Flags
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 content of R (the quotient) is 0000, otherwise OFF.
N:
ON when bit 15 of R is set to 1.
Binary Calculations
Section 5-20