Try Booth's algorithm and fully parallel multipliers. They have been combined for even higher hardware performance, at the cost of lots of silicon real estate.
Try Booth's algorithm and fully parallel multipliers. They have been combined for even higher hardware performance, at the cost of lots of silicon real estate.
Ant not one of them understand the implications of R's representations and R's-1 representations.
How about you research the 40 year old Booth's algorithm, or the 50 year old Wallace tree method. You just might learn something about how modern hardware actually works. I happen to know that most modern general purpose processors use a combination of the two, specifically later x86, SPARC, and PPC families.
I have very fond memories of BIX, I used to be snipped-for-privacy@bix.com, frow well before BIX became box.com and got an internet SMTP gateway. :-)
OK.
I've written long division routines that work the same way.
For table-driven multiplication I'm partial to x^2 tables, they make it trivial to fit at least an 8-bit wide table into fast memory.
Terje
I think you've just demonstrated why no kid is likely to solve that several hundred digit problem you posted earlier, which another kind poster solved in a few seconds using fixed sized arithmetic hardware.
Now, how much money were you offering?
Shades of "Cheaper by the Dozen" where Pa Gilbreth had his kids memorize the squares of 1 through 50 for multiplication. What scares me is that I read the book 40 years ago and still remember that detail...
- Erik
Multiplication as thought to kids in school is based on the "math table" , "lookup table", "and table" concept.
If one understand the full algorithm one can do arbitrary/infinite precision math.
Let's discuss a little bit how a modern cpu could achieve this.
Since a modern cpu does need to do some multi tasking.
Maybe the cpu could do it in little pieces and safe it's memory state during context switches, or maybe a special coprocessors is preferred... ?
I also wonder how much faster or slower the hardware implementation would be compared to the same optimal software implementation.
Bye, Skybuck.
For square, there's a short-cut that makes memorizing them not-so-useful. And for numbers ending in 5, it's even easier.
Jan
I had a pair of Nova computers about 15 years ago.
In article , Terje Mathisen wrote: [...]
The LSB of (A-B) is the same as the LSB of (A+B)
(A+B)^2 - (A-B)^2
= A^2 + 2AB + B^2 - A^2 + 2AB -B^2
= 4AB
You can improve the speed by a little creative table generation.
The LGP-30 [my first computer!] was bit serial, with discrete vacuum tubes! And in fact, only 15 bits of state were stored in the vacuum tube flip-flops -- all of the rest of it was stored on the drum, including the PC, the instruction register, and the accumulator. Despite that, it had hardware multiply (two kinds: save upper 31 bits of result or save lower 31 bits) and hardware divide. See:
-Rob
----- Rob Warnock
627 26th Avenue San Mateo, CA 94403 (650)572-2607
Sounds vaguely like the G-15: (CAUTION! 2.8 MB .pdf file)
Which was the first computer I learned to program, in about 1966. :-)
Cheers! Rich
Have something to add? Share your thoughts — no account required.
Ask the community — no account required