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

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        )
```
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}