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. 



There are many paths to the end of one's journey, Grasshopper. 

Bill Fairchild 
Franklin, TN 

“Political language is designed to make lies sound truthful and murder 
acceptable, and to give the appearance of solidity to pure wind.” [George 
Orwell] 

----- Original Message -----
From: "Gerhard Postpischil" <[email protected]> 
To: [email protected] 
Sent: Wednesday, April 17, 2013 10:19:22 AM 
Subject: Re: Good Performing Code (Was: Millicode              Instructions) 

On 4/17/2013 9:14 AM, DASDBILL2 wrote: 
> I learned how to multiply in the third grade.  Sixty years later I 
> still remember how to multiply.  It's also important to know when, 
> why, and what  to multiply. 

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. 

Gerhard Postpischil 
Bradford, Vermont 

Reply via email to