2 Instructions
2-182 CP1E CPU Unit Instructions Reference Manual(W483)
Function
/

/(430) divides the signed binary (16 bit) values in Dd by those in Dr and outputs the result to R, R+1.

The quotient is placed in R and the remainder in R+1.

Note Division of hexadecimal #8000 by #FFFF is undefined.

/L

/L(431) divides the signed binary values in Dd and Dd+1 by those in Dr and Dr+1 and outputs the result

to R, R+1, R+2, and R+3. The quotient is output to R and R+1 and the remainder is output to R+2 and

R+3.

Note Division of hexadecimal #80000000 by #FFFFFFFF is undefined.

Sample program
÷
R + 1 R
Dd
Dr
Remainder Quotient
(Signed binary)
(Signed binary)
(Signed binary)
÷
R + 1 R
R + 3 R + 2
Dd + 1 Dd
Dr + 1 Dr
Remainder
(Signed binary)
(Signed binary)
(Signed binary)
Quotient
0.00
When CIO 0.00 is ON in the following example, D100 will be
divided by D110 as 4-digit signed binary values and the
quotient will be output to D120 and the remainder to D121.
/
D100
D110
D120
/L
D100
D110
D120
0.00
When CIO 0.00 is ON in the following example, D101 and
D100 are divided by D111 and D110 as 8-digit signed
hexadecimal values and the quotient will be output to D121
and D120 and the remainder to D123 and D122.