2025-03-02 18:30 UTC
Multiplying binary numbers is like grade-school long division, except you multiply by 0 or 1 at each step. You add up the terms at the end, so 64-bit numbers would add 64 terms. Too much adding! The Pentium instead multiplies in base-8 so there are 1/3 the number of terms to add. Faster but tricky.
Replies (1)
-
@kenshirriff@oldbytes.space 2025-03-02 18:31
Multiplying in base 8 means each term gets multiplied by 0 through 7. Multiplying by 2 or 4 is easy, just shift the number. A trick for ×7: multiply by 8 and subtract 1×. (This is Booth's algorithm.) For ×6, multiply by 8 and subtract 2×. But what about ×3? It needs a special circuit. 3/N