Computing Atlas

How Computing Was Built
Sign In
Text size
100%
Theme
Algorithm

Long multiplication

Numerical Algorithm

Long multiplication, also called grade-school multiplication or the standard algorithm, is the method taught in schools for multiplying two numbers written in a positional numeral system such as base 10. The multiplicand is multiplied by each digit of the multiplier in turn, each partial product is shifted to the place value of that digit, and the shifted results are added together. It needs the single-digit multiplication table to be memorized and is the usual way to multiply larger numbers by hand, and it has been known since antiquity. Multiplying two numbers of n digits takes about n squared single-digit operations. Some chips implement it in hardware or microcode, and in base two it reduces to shifting and adding, which is why it is also called shift and add. Karatsuba multiplication, discovered in 1960, started research into methods faster than this quadratic cost.

Facts
Time Complexity
Time Complexity (category)
Quadratic Time -- O(n^2) 1
Connections

In Field

Source Multiplication algorithm (Wikipedia)
Sources
1. Multiplication algorithm (Wikipedia)
  • Section: Long multiplication, Usage in computers
    multiplying two n-digit numbers using long multiplication requires Θ(n2) single-digit operations (additions and multiplications)
  • In Group: Number Theory and Primality, Article lead
    The oldest and simplest method, known since antiquity as long multiplication or grade-school multiplication, consists of multiplying every digit in the first number by every digit in the second and adding the results.
  • In Field: Algorithms and Complexity Theory, Article lead
    The oldest and simplest method, known since antiquity as long multiplication or grade-school multiplication, consists of multiplying every digit in the first number by every digit in the second and adding the results.
View the Source
Comments (0)
No comments yet. Be the first to share a thought.
Reader Challenges (0)
No disputes yet. Spotted an error or a better source? Open the first one.