# Algorithms for Arithmetic

An algorithm is a sequence of steps or instructions that outline how to solve a particular problem. One can think of an algorithm as a problem-solving formula or recipe. The term "algorithm" derives its name from al-Khwarizmi (c. 780c. 850), an Arab mathematician who wrote an influential book on algebraic methods.

In the Hindu-Arabic number system, often referred to as the Arabic system, ten numerals or digits (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) are used in a sequence to form a number. Each digit , when the number is written in expanded form, represents a multiple of a power of ten; for example, 247 = 2 × 102 + 4 × 101 + 2 × 100. Therefore, this number system is called a base-10 , or decimal, number system.

An algorithm that uses ten to an integer power n, 10n, to perform calculations is a base-10 algorithm. Many of the rules that are used in fundamental arithmetic are actually algorithms for the base-10 system.

The base-10 number system is used every day and may seem ordinary, but it is a very powerful and elegant system with which to express numbers. Although most people may not be aware of it, when adding and subtracting numbers, for example, one is essentially using shortcut rules that are based on base-10 algorithms.

Consider 448 + 246.

The base-10 algorithm for the same problem is shown explicitly below.

But 14 × 100 = (10 + 4) × 100 = 10 + 4 × 100. The 10 here is responsible for the 1 "carry-over" to 8, the first digit on the left. Therefore,

= 6 × 102 + (8 + 1) × 101 + 4 × 100

= 6 × 102 + 9 × 101 + 4 × 100

= 600 + 90 + 4

= 694.

## Subtraction Algorithms

A base-10 algorithm for solving the subtraction problem 764 - 347 follows.

764 - 347 = (700 + 60 + 4) - (300 + 40 + 7)

Here the idea is to subtract corresponding numbers: 7 from 4, 40 from 60, and 300 from 700. It is known that 7 is greater than 4, and 7 from 4 is -3, but suppose nothing is known about negative numbers. In the first parentheses, write 60 as 50 + 10.

764 - 347 = (700 + 50 + 10 + 4) - (300 + 40 + 7)

In the first parenthesis, add 10 to 4, so 14 is greater than 7.

764 - 347 = (700 + 50 + 14) - (300 + 40 + 7)

So now the resulting problem is to subtract 7 from 14, 40 from 50, and 300 from 700.

764 - 347 = (700 - 300) + (50 - 40) + (14 - 7)

= 400 + 10 + 7

= 417

Another algorithm for subtraction is called "subtraction by taking complements." Consider 764 - 347 again. Adding the same number, c, to both the terms will not affect the answer, because c + (-c ) = 0. So effectively the value does not change.

764 - 347 = (764 + c ) - (347 + c )

Choose c so that 347 + c becomes a multiple of 10, say 1,000. Therefore, c = 653.

764 - 347 = (764 + 653) - (347 + 653)

= 1,417 - 1,000

= 417

## Multiplication Algorithms

The following presents a multiplication algorithm in a vertical and horizontal format. Consider 24 × 12. To understand this, write 24 as 20 + 4, and 12 as 10 + 2.

Using the distributive property of multiplication over addition, one can write

= (10 × 20) + (10 × 4) + (2 × 20) + (2 × 4)

= 200 + 40 + 40 + 8

= 288.

## A Division Algorithm

Consider the division of a decimal number by another decimal number; for example, 28.75026 divided by 21.685. By using a division algorithm, this problem can be solved in three steps. The first step is to multiply the divisor by a power of ten that makes the divisor a whole number. Multiplying by 10 moves the decimal point one place to the right. Therefore, the divisor should be multiplied by 1,000, or 103, because there are three digits to the right of the decimal point in the divisor.

The second step is to multiply the numerator by 103. This is a necessary step to keep the division answer unchanged because multiplying both the dividend and the divisor by the same number keeps the fraction unchanged. Therefore, the decimal point in the dividend is moved three places to the right.

The resulting problem is to divide 28,750.26 by 21,685. The third step is to proceed with long division to get the answer.

Consider the following problem. There are 224 bananas. Each crate is packed with 16 bananas. How many crates are needed to pack all the bananas? Find the number that results from dividing 224 by 16. In other words, how many groups of 16 bananas are there in 224 total bananas?

In the first step of the division algorithm for 224/16, find the number of bananas that would be packed in the first ten crates and subtract it from the total bananas.

The next step is to figure out how many groups of 16 consist of 64.

Therefore, 224/16 = 14. In fact, all arithmetic calculations are based on base-10 algorithms.

see also Bases; Decimals; Powers and Exponents.

## Bibliography

Devine, Donald F., Judith Olsen, and Melfried Olsen. Elementary Mathematics for Teachers, 2nd ed. New York: John Wiley, 1991.

Dugopolski, Mark. Elementary Algebra, 2nd ed. New York: Addison-Wesley Publishing Company, 1996.

Miller, Charles D., Vern E. Heeren, and E. John Hornsby, Jr. Mathematical Ideas, 9th ed. Boston: Addison-Wesley, 2001.

Young, Robyn V., ed. Notable Mathematicians, from Ancient Times to the Present. Detroit: Gale Research, 1998.

Pick a style below, and copy the text for your bibliography.

• MLA
• Chicago
• APA

"Algorithms for Arithmetic." Mathematics. . Encyclopedia.com. 17 Mar. 2019 <https://www.encyclopedia.com>.

"Algorithms for Arithmetic." Mathematics. . Encyclopedia.com. (March 17, 2019). https://www.encyclopedia.com/education/news-wires-white-papers-and-books/algorithms-arithmetic

"Algorithms for Arithmetic." Mathematics. . Retrieved March 17, 2019 from Encyclopedia.com: https://www.encyclopedia.com/education/news-wires-white-papers-and-books/algorithms-arithmetic

### Citation styles

Encyclopedia.com gives you the ability to cite reference entries and articles according to common styles from the Modern Language Association (MLA), The Chicago Manual of Style, and the American Psychological Association (APA).

Within the “Cite this article” tool, pick a style to see how all available information looks when formatted according to that style. Then, copy and paste the text into your bibliography or works cited list.

Because each style has its own formatting nuances that evolve over time and not all information is available for every reference entry or article, Encyclopedia.com cannot guarantee each citation it generates. Therefore, it’s best to use Encyclopedia.com citations as a starting point before checking the style against your school or publication’s requirements and the most-recent information available at these sites:

#### Modern Language Association

http://www.mla.org/style

#### The Chicago Manual of Style

http://www.chicagomanualofstyle.org/tools_citationguide.html

#### American Psychological Association

http://apastyle.apa.org/

##### Notes:
• Most online reference entries and articles do not have page numbers. Therefore, that information is unavailable for most Encyclopedia.com content. However, the date of retrieval is often important. Refer to each style’s convention regarding the best way to format page numbers and retrieval dates.
• In addition to the MLA, Chicago, and APA styles, your school, university, publication, or institution may have its own requirements for citations. Therefore, be sure to refer to those guidelines when editing your bibliography or works cited list.