On 2013-04-17, at 09:31, DASDBILL2 wrote:

> I tried your algorithm with 13 multiplied by 81 and produced the correct 
> answer.  This algorithm is undoubtedly how the microcode for the M (multiply 
> fullword) instruction does its math.
>
It has a lot to do with where the 1-bits are in the binary representation
of the multiplier, yes.

GIYF.  "Wallace tree"

PDP-6 et al. inspected two bits of the multiplier at each iteration
and mixed adds and subtracts to get a 2s complement product without
a restoring step.

> ----- Original Message -----
> From: "Gerhard Postpischil"
> Sent: Wednesday, April 17, 2013 10:19:22 AM
>
> Simple - you write the two numbers with the larger on the left. In the
> next row, double the number on the left, and halve the number on the
> right, discarding any fraction. Upon reaching 1 on the right, cross out
> any row where the right number is even. Add the remaining rows on the left.

-- gil

Reply via email to