BCD Calculations
5-17-13 FLOATING POINT DIVIDE – FDIV(79)
Limitations
Description
15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
1
0
1
15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
0
0
0
Flags
Ladder Symbols
FDIV(79)
Dd
Dr
R
Dr and Dr+1 cannot contain zero. Dr and Dr+1 must be in the same data
area, as must Dd and Dd+1; R and R+1.
When the execution condition is OFF, FDIV(79) is not executed. When the
execution condition is ON, FDIV(79) divides the floating-point value in Dd and
Dd+1 by that in Dr and Dr+1 and places the result in R and R+1.
Dr+1
Dr
To represent the floating point values, the rightmost seven digits are used for
the mantissa and the leftmost digit is used for the exponent, as shown in the
diagram below. The mantissa is expressed as a value less than one, i.e., to
seven decimal places.
First word
0
0
0
0
1
0
0
0
Exponent (0 to 7)
Sign of exponent
0: +
1: –
Second word
1
0
0
0
1
0
0
0
Mantissa (rightmost 4 digits)
= 0.1111113 x 10
ER:
Dr and Dr+1 contain 0.
Dd, Dd+1, Dr, or Dr+1 is not BCD.
The result is not between 0.0000001 x 10
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.
@FDIV(79)
Dd
Dr
R
Quotient
R+1
Dd+1
1
0
0
0
1
Mantissa (leftmost 3 digits)
1
0
0
1
1
–2
Section 5-17
Operand Data Areas
Dd: First dividend word (BCD)
IR, SR, AR, DM, HR, TC, LR
Dr: First divisor word (BCD)
IR, SR, AR, DM, HR, TC, LR
R: First result word
IR, AR, DM, HR LR
R
Dd
–7
and 0.999999 x 10
+7
.
169
Need help?
Do you have a question about the SYSMAC C2000H and is the answer not in the manual?