# Long multiplication

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.

## Example

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).

23958233 × 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 )