Vous êtes sur la page 1sur 4

START

Sign Check

If ( A > 0 ) If ( B > 0 )

CH = 0 CL = 0

If ( A < 0 ) If ( B < 0 )

CH = 1 CL = 1

PUSH CX

The first bit of A and B is set to 0


as if they were positive number
Original values are restored
at the end
15th bit check

To reduce the number of


iterations we round the number
up by adding 1 to the MSB of the
number (if this doesn't cause
overflow)

Estimation of Results

Using the invariance property


we compute an estimated result

Then we calculate A* by multiplying the


obtained value with the second operand

A* = TMP_low*B_low +
+ (TMP_low*B_high + TMP_high*B_low)*2^16 +
+ TMP_high*B_high*2^32
Y
A = A* END

A > A*

N Y

A = A* - B S = A - A*

N
A* = A* + B S<B

R=S

END
Restoration

Finally we restore the sign of the


operands by popping CX and
we make final controls on the
residual