Note: Due to changes in the Riesel prime template, most of those pages (and related) are not shown properly.
This will take some time!
Wanna help? Please move any Riesel prime page first, then edit/add the base parameter.
Topics Register • News • History • How to • Sequences statistics • Template prototypes

Long multiplication

From Prime-Wiki
Jump to: navigation, search

If a positional numeral system is used, a natural way of multiplying numbers is taught in schools as long multiplication, sometimes called grade-school multiplication:

Multiply the multiplicand by each digit of the multiplier and then add up all the properly shifted results.

It requires memorization of the multiplication table for single digits.

This is the usual algorithm for multiplying by hand in base 10. Computers normally use a very similar 'shift and add' algorithm in base 2. Prime95 does not use this form of multiplication for large numbers, using FFT's is much faster. A person doing long multiplication on paper will write down all the products and then add them together; an abacus user will sum the products as soon as each one is computed.


This example uses long multiplication to multiply 23,958,233 (multiplicand) by 5,830 (multiplier) and arrives at 139,676,498,390 for the result (product).

  ×         5830
        00000000 ( =      23,958,233 ×     0)
       71874699  ( =      23,958,233 ×    30)
     191665864   ( =      23,958,233 ×   800)
  + 119791165    ( =      23,958,233 × 5,000)
    139676498390 ( = 139,676,498,390        )

Also see

External links