Carry (arithmetic)
   HOME

TheInfoList



OR:

In
elementary arithmetic The operators in elementary arithmetic are addition, subtraction, multiplication, and division. The operators can be applied on both real numbers and imaginary numbers. Each kind of number is represented on a number line designated to the type. ...
, a carry is a digit that is transferred from one
column A column or pillar in architecture and structural engineering is a structural element that transmits, through compression, the weight of the structure above to other structural elements below. In other words, a column is a compression member. ...
of digits to another column of more significant digits. It is part of the standard
algorithm In mathematics and computer science, an algorithm () is a finite sequence of rigorous instructions, typically used to solve a class of specific Computational problem, problems or to perform a computation. Algorithms are used as specificat ...
to
add Addition (usually signified by the plus symbol ) is one of the four basic operations of arithmetic, the other three being subtraction, multiplication and division. The addition of two whole numbers results in the total amount or '' sum'' of ...
numbers together by starting with the rightmost digits and working to the left. For example, when 6 and 7 are added to make 13, the "3" is written to the same column and the "1" is carried to the left. When used in subtraction the operation is called a borrow. Carrying is emphasized in
traditional mathematics Traditional mathematics (sometimes classical math education) was the predominant method of mathematics education in the United States in the early-to-mid 20th century. This contrasts with non-traditional approaches to math education.reform mathematics Reform mathematics is an approach to mathematics education, particularly in North America. It is based on principles explained in 1989 by the National Council of Teachers of Mathematics (NCTM). The NCTM document ''Curriculum and Evaluation Standa ...
do not emphasize any specific method to find a correct answer. Carrying makes a few appearances in higher mathematics as well. In computing, carrying is an important function of adder circuits.


Manual arithmetic

A typical example of carry is in the following pencil-and-paper addition: 1 27 + 59 ---- 86 7 + 9 = 16, and the digit 1 is the carry. The opposite is a borrow, as in −1 47 − 19 ---- 28 Here, , so try , and the 10 is got by taking ("borrowing") 1 from the next digit to the left. There are two ways in which this is commonly taught: # The ten is ''moved'' from the next digit left, leaving in this example in the tens column. According to this method, the term "borrow" is a
misnomer A misnomer is a name that is incorrectly or unsuitably applied. Misnomers often arise because something was named long before its correct nature was known, or because an earlier form of something has been replaced by a later form to which the name ...
, since the ten is never paid back. # The ten is ''copied'' from the next digit left, and then 'paid back' by adding it to the subtrahend in the column from which it was 'borrowed', giving in this example in the tens column.


Mathematics education

Traditionally, carry is taught in the addition of multi-digit numbers in the 2nd or late first year of elementary school. However, since the late 20th century, many widely adopted curricula developed in the United States such as TERC omitted instruction of the traditional carry method in favor of invented arithmetic methods, and methods using coloring, manipulatives, and charts. Such omissions were criticized by such groups as Mathematically Correct, and some states and districts have since abandoned this experiment, though it remains widely used.


Higher mathematics

Kummer's theorem In mathematics, Kummer's theorem is a formula for the exponent of the highest power of a prime number ''p'' that divides a given binomial coefficient. In other words, it gives the ''p''-adic valuation of a binomial coefficient. The theorem is nam ...
states that the number of carries involved in adding two numbers in base p is equal to the exponent of the highest power of p dividing a certain
binomial coefficient In mathematics, the binomial coefficients are the positive integers that occur as coefficients in the binomial theorem. Commonly, a binomial coefficient is indexed by a pair of integers and is written \tbinom. It is the coefficient of the t ...
. When several random numbers of many digits are added, the statistics of the carry digits bears an unexpected connection with
Eulerian number In combinatorics, the Eulerian number ''A''(''n'', ''m'') is the number of permutations of the numbers 1 to ''n'' in which exactly ''m'' elements are greater than the previous element (permutations with ''m'' "ascents"). They are the coefficients ...
s and the statistics of
riffle shuffle permutation In the mathematics of permutations and the study of shuffling playing cards, a riffle shuffle permutation is one of the permutations of a set of n items that can be obtained by a single riffle shuffle, in which a sorted deck of n cards is cut into ...
s. In
abstract algebra In mathematics, more specifically algebra, abstract algebra or modern algebra is the study of algebraic structures. Algebraic structures include groups, rings, fields, modules, vector spaces, lattices, and algebras over a field. The term ''a ...
, the carry operation for two-digit numbers can be formalized using the language of group cohomology. This viewpoint can be applied to alternative characterizations of the
real number In mathematics, a real number is a number that can be used to measure a ''continuous'' one-dimensional quantity such as a distance, duration or temperature. Here, ''continuous'' means that values can have arbitrarily small variations. Every real ...
s.


Mechanical calculators

Carry represents one of the basic challenges facing designers and builders of
mechanical calculator A mechanical calculator, or calculating machine, is a mechanical device used to perform the basic operations of arithmetic automatically, or (historically) a simulation such as an analog computer or a slide rule. Most mechanical calculators wer ...
s. They face two basic difficulties: The first one stems from the fact that a carry can require several digits to change: in order to add 1 to 999, the machine has to increment 4 different digits. Another challenge is the fact that the carry can "develop" before the next digit finished the addition operation. Most mechanical calculators implement carry by executing a separate carry cycle after the addition itself. During the addition, each carry is "signaled" rather than performed, and during the carry cycle, the machine increments the digits above the "triggered" digits. This operation has to be performed sequentially, starting with the ones digit, then the tens, the hundreds, and so on, since adding the carry can generate a new carry in the next digit. Some machines, notably Pascal's calculator, the second known calculator to be built, and the oldest surviving, use a different method: incrementing the digit from 0 to 9, cocks a mechanical device to store energy, and the next increment, which moves the digit from 9 to 0, releases this energy to increment the next digit by 1. Pascal used weights and gravity in his machine. Another notable machine using similar method is the highly successful 19th century
Comptometer The Comptometer was the first commercially successful key-driven mechanical calculator, patented in the United States by Dorr Felt in 1887. A key-driven calculator is extremely fast because each key adds or subtracts its value to the accumulato ...
, which replaced the weights with springs. Some innovative machines use continuous transmission: adding 1 to any digit, advances the next one by 1/10 (which in turn advances the next one by 1/100 and so on). Some innovative early calculators, notably
Chebyshev Pafnuty Lvovich Chebyshev ( rus, Пафну́тий Льво́вич Чебышёв, p=pɐfˈnutʲɪj ˈlʲvovʲɪtɕ tɕɪbɨˈʂof) ( – ) was a Russian mathematician and considered to be the founding father of Russian mathematics. Chebyshe ...
calculator from 1870, and a design by Selling, from 1886, used this method, but neither were successful. In the early 1930,
Marchant calculator The Marchant Calculating Machine Company was founded in 1911 by Rodney and Alfred Marchant in Oakland, California. The company built mechanical, and then electromechanical calculators which had a reputation for reliability. First models were s ...
implemented continuous transmission with great success, starting with the aptly named "Silent Speed" calculator. Marchant (later to become
SCM Corporation Smith Corona is an American manufacturer of thermal labels, direct thermal labels, and thermal ribbons used in warehouses for primarily barcode labels. Once a large U.S. typewriter and mechanical calculator An electronic calculator is typi ...
) continued to use and improve it, and made continuous-transmission calculators with unmatched speed, into the late 1960s, to the end of the mechanical calculator era.


Computing

When speaking of a digital circuit like an adder, the word ''carry'' is used in a similar sense. In most
computer A computer is a machine that can be programmed to Execution (computing), carry out sequences of arithmetic or logical operations (computation) automatically. Modern digital electronic computers can perform generic sets of operations known as C ...
s, the carry from the most significant bit of an arithmetic operation (or bit shifted out from a shift operation) is placed in a special ''carry bit'' which can be used as a carry-in for multiple precision arithmetic or tested and used to control execution of a
computer program A computer program is a sequence or set of instructions in a programming language for a computer to execute. Computer programs are one component of software, which also includes documentation and other intangible components. A computer program ...
. The same ''carry bit'' is also generally used to indicate borrows in subtraction, though the bit's meaning is inverted due to the effects of
two's complement Two's complement is a mathematical operation to reversibly convert a positive binary number into a negative binary number with equivalent (but negative) value, using the binary digit with the greatest place value (the leftmost bit in big- endian ...
arithmetic. Normally, a carry bit value of "1" signifies that an addition overflowed the ALU, and must be accounted for when adding data words of lengths greater than that of the CPU. For subtractive operations, two (opposite) conventions are employed as most machines set the carry flag on borrow while some machines (such as the 6502 and the PIC) instead reset the carry flag on borrow (and vice versa).


References


External links

* *
Carrying
- nLab {{DEFAULTSORT:Carry (Arithmetic) Elementary arithmetic Computer arithmetic fr:Retenue ja:ステータスレジスタ#キャリー