Arithmetic and NumbersMathematics · Book 1
0 / 0

Shelves / Arithmetic and Numbers

AN·03

Adding and Subtracting, and Why the Methods Work

Addition and subtraction from the inside: number facts and the strategies behind them, why column addition and carrying are correct, three ways to subtract (borrowing, equal addition, counting up) and why each works, checking an answer, and what changes when a computer adds.

33 topics · ~30 min read · 15-question quiz
Updated Suggest a correction

Start here

What this chapter answers

Why do we start adding from the right? What is a carry, really, and why is it never more than 1 when you add two numbers? Why does borrowing work, and why do some people "pay back" instead? How does a shopkeeper count change without subtracting at all? How can you check an answer without redoing it? And why can a computer, adding the same numbers in a different order, give a different total?

Adding in one picture

Two piles of beads, bundled in tens as in chapter 2: the first has 4 bundles and 7 loose beads (47), the second 3 bundles and 8 loose (38). Push them together. You now have 7 bundles and 15 loose beads. But 15 loose beads is more than nine, so it isn't a proper numeral yet: tie ten of them into a bundle. Now you have 8 bundles and 5 loose beads: 85.

That's column addition. Adding the columns is putting the piles together, size by size. Carrying is re-bundling: when a column reaches ten, ten of that size become one of the next size up. Everything below is that picture, made fast and checked.

Facts and strategies

The addition facts

Every column of every addition, however long, uses a fact about two single digits: 7 + 8 = 15, 6 + 9 = 15, and so on. There are 100 such facts (0 + 0 up to 9 + 9), but far fewer to learn. Commutativity halves them (7 + 8 and 8 + 7 are one fact), adding 0 is free, and adding 1 is counting on. What's left can be reached by a few strategies rather than memorised one by one.

Strategies that make facts from facts

  • Make ten. 8+5 =8+2+3 =10+3 =13. Split the second number so that part of it completes a ten. This works because of associativity: 8+(2+3)=(8+2)+3.
  • Doubles and near-doubles. 6+7=6+6+1=13. Doubles are easy to remember; a near-double is a double plus or minus one.
  • Bridge through ten for larger numbers. 47+8 =47+3+5 =50+5 =55.
  • Number bonds. Pairs that make ten (1 and 9, 2 and 8, …, 5 and 5) and pairs that make a hundred (37 and 63) are worth knowing cold, because so many strategies pass through a round number.

These aren't tricks on top of arithmetic. Each one is commutativity or associativity applied deliberately, choosing the grouping that makes the work easy.

Compensation

To add or subtract a number close to a round one, use the round one and correct afterwards:

498+367=500+367−2=865,803−397=803−400+3=406.

Notice the correction's direction. Adding 500 adds 2 too many, so take 2 away. Subtracting 400 subtracts 3 too many, so add 3 back. Getting that sign wrong is the commonest slip; the beads settle it every time.

Column addition

The method

Write the numbers with their digits lined up by place value, ones under ones. Starting from the right, add each column, including any carry from the column before. Write the ones digit of the column total below the column, and carry the tens digit into the next column on the left.

Interactive diagram: Column addition and carrying: 4786 + 3597. It needs JavaScript; the text around it says the same.
Text
    1 1 1      carries
    4 7 8 6
  + 3 5 9 7
  ---------
    8 3 8 3

The small 1s are carries: 6 + 7 = 13 (write 3, carry 1); 8 + 9 + 1 = 18 (write 8, carry 1); 7 + 5 + 1 = 13 (write 3, carry 1); 4 + 3 + 1 = 8.

Why it works

Expanded form turns the sum into a sum of place values, and commutativity and associativity let you regroup it by place:

4786+3597=(4+3)×1000+(7+5)×100+(8+9)×10+(6+7).

That's distributivity, too: 4×1000+3×1000 =(4+3)×1000. So adding each column separately is legitimate. But the column totals (7, 12, 17, 13) aren't digits: some are ten or more, and a numeral needs every digit below ten. Carrying fixes each one, from the right: 13=1×10+3, so 13 ones is 1 ten and 3 ones; move the ten into the tens column. Then the tens column has 17+1=18 tens, which is 1 hundred and 8 tens; and so on. When every column is a single digit, uniqueness (chapter 2) says you have the numeral of the sum.

How big can a carry be?

When you add two numbers, a column holds at most 9+9 plus an incoming carry. If every carry so far has been at most 1, the column total is at most 9+9+1=19, so the next carry is at most 1 too. Since the first column has no incoming carry, carries are always 0 or 1: induction, in miniature. Adding three numbers, a column can reach 9+9+9+2=29, so carries can be 2. Adding a long list, a column total can be large and the carry is its tens (and hundreds) part; the method is the same.

Adding in any base

Nothing above used ten except as the bundle size. In base b, a column that reaches b or more carries one into the next column. In binary, 1+1=102: write 0, carry 1. Adding 45 and 100 in binary:

Text
    1 1   1 1      carries
    0 0 1 0 1 1 0 1     45
  + 0 1 1 0 0 1 0 0    100
  ---------------
    1 0 0 1 0 0 0 1    145

which is 145. The binary addition table has only four facts (0 + 0, 0 + 1, 1 + 0, 1 + 1), which is why a circuit to add is so simple; the lab builds one.

Subtraction

Three stories, one calculation

Chapter 1 gave three stories for subtraction: taking away, comparing, and finding a missing part. They all give the same number, which is why one calculation serves all three. But different methods match different stories, and choosing the method that matches the situation often makes the arithmetic easier.

Decomposition (borrowing)

Line up the columns and subtract from the right. When a top digit is smaller than the one below it, unbundle one from the next column on the left: one ten becomes ten ones.

Text
    6 9 12 12    after regrouping
    7 0  3  2
  - 2 8  4  5
  -----------
    4 1  8  7

Ones: 2 − 5 can't be done, so take one ten from the 3 tens (leaving 2) and make 12 ones: 12−5=7. Tens: 2 − 4 can't be done, and the hundreds column is empty, so go to the thousands: one thousand becomes ten hundreds (thousands now 6), one of those hundreds becomes ten tens (hundreds now 9, tens now 12): 12−4=8. Hundreds: 9−8=1. Thousands: 6−2=4.

It's correct because unbundling never changes the top number, only how it's written. By the time every column has what it needs, 7,032 has been rewritten as 6 thousands, 9 hundreds, 12 tens and 12 ones, and 6000+900+120+12=7032: the same quantity. Subtracting each column from that is honest, because nothing was added or lost. Borrowing across a zero is the case that trips people, and it's the case above.

Equal addition ("borrow and pay back")

An older method, still taught in some places: when a top digit is too small, add ten to it, and add one to the next digit of the bottom number instead of reducing the top one. For 7032−2845: ones 12−5=7, then the tens become 3−(4+1), so add ten again: 13−5=8; hundreds 0−(8+1): 10−9=1; thousands 7−(2+1)=4. Same answer, 4187, and no crossing zeros.

It works because of a fact worth knowing for its own sake:

In equal addition you add ten ones to the top number and one ten to the bottom number: the same amount, written in two different columns. The comparison story makes it obvious: if two people are 25 years apart in age, they're still 25 years apart ten years later.

Counting up (the shopkeeper's method)

The missing-part story suggests a third method: start from the smaller number and count up to the larger in convenient steps, then add the steps. For a bill of ₹263 paid with a ₹500 note:

263→+7270→+30300→+200500,7+30+200=237.

This is how change is traditionally counted out, coin by coin, and it's often the easiest mental method, because adding is easier than subtracting and round numbers are easy targets. 7032−2845 by counting up: +5 to 2,850, +150 to 3,000, +4000 to 7,000, +32 to 7,032, total 4187.

Subtracting from a power of ten

To subtract from 100, 1,000 or 10,000, take each digit from 9 and the last from 10: 1000−386=614, because 3 from 9 is 6, 8 from 9 is 1, 6 from 10 is 4. It works because 1000=999+1, and subtracting from 999 never needs a borrow: each digit is just taken from 9. Some books present this as "Vedic mathematics" (from a 1965 book by Bharati Krishna Tirtha); whatever its origin, it's sound place-value arithmetic, and it's the same idea computers use to subtract by adding (the lab shows how).

Checking an answer

Undo it

Subtraction undoes addition, so check a subtraction by adding: 4187+2845=7032. ✓ And check an addition by subtracting one addend from the total. This is the inverse relationship from chapter 1, used as a tool.

Estimate first

Before calculating, round: 4786+3597≈4800+3600 =8400. An answer of 8,383 is plausible; 7,383 or 83,830 would be a dropped carry or a slipped column. Chapter 11 is about estimation; the habit starts here.

Casting out nines

Add the digits of each number, repeatedly, until one digit is left (treat 9 as 0). For a correct addition, the digit-sums of the parts add up to the digit-sum of the total:

4786→25→7,3597→24→6,7+6=13→4;8383→22→4.✓

It works because every power of ten is one more than a multiple of nine, so every number leaves the same remainder on division by 9 as its digit sum; chapter 5 proves it. The check catches most slips, but not all: swapping two digits (8,383 written as 8,833) keeps the digit sum and slips through. A check that passes is evidence, not proof.

Lab: adding with a machine

Experiment 1: column addition as code

The school method, written out: right to left, digit by digit, with a carry. It prints each column for one sum, then checks the method against Python's own + on 100,000 random pairs of twelve-digit numbers.

Python
import random

def column_add(a, b):
    """Add two decimal numerals the school way: right to left, digit by digit, carrying."""
    a, b = a.zfill(len(b)), b.zfill(len(a))
    out, carry, steps = "", 0, []
    for x, y in zip(reversed(a), reversed(b)):
        s = int(x) + int(y) + carry
        out = str(s % 10) + out
        steps.append((x, y, carry, s % 10, s // 10))
        carry = s // 10
    return (str(carry) if carry else "") + out, steps

total, steps = column_add("4786", "3597")
print(total)
for x, y, cin, d, cout in steps:
    print(f"  {x} + {y} + carry {cin} = {int(x) + int(y) + cin:2}  -> write {d}, carry {cout}")
random.seed(1)
wrong = sum(1 for _ in range(100_000)
            if int(column_add(str(a := random.randrange(10**12)), str(b := random.randrange(10**12)))[0]) != a + b)
print("random sums checked: 100000  wrong:", wrong)
Text
8383
  6 + 7 + carry 0 = 13  -> write 3, carry 1
  8 + 9 + carry 1 = 18  -> write 8, carry 1
  7 + 5 + carry 1 = 13  -> write 3, carry 1
  4 + 3 + carry 1 =  8  -> write 8, carry 0
random sums checked: 100000  wrong: 0

Every carry is 0 or 1, as proved above, and the method agrees with the machine on every one of the hundred thousand sums. s % 10 and s // 10 are the "write" and "carry" steps: the remainder and quotient on division by ten, the same pair as chapter 2's repeated division.

Experiment 2: an adder made of logic

A computer adds in binary, one column at a time, with a circuit called a full adder. Its sum bit is 1 when an odd number of its three inputs (two bits and a carry) are 1, which is the logical operation XOR; its carry is 1 when at least two are. Eight full adders in a row, each passing its carry to the next, add two bytes.

Python
def full_adder(a, b, carry_in):
    """One column of binary addition, from logic gates: XOR gives the sum bit, AND/OR the carry."""
    s = a ^ b ^ carry_in
    carry_out = (a & b) | (carry_in & (a ^ b))
    return s, carry_out

def add_bits(x, y, width=8):
    """A ripple-carry adder: eight full adders in a row, the way simple hardware adds bytes."""
    carry, out = 0, 0
    for i in range(width):
        s, carry = full_adder((x >> i) & 1, (y >> i) & 1, carry)
        out |= s << i
    return out, carry

for a, b, cin in [(0, 0, 0), (0, 1, 0), (1, 1, 0), (1, 1, 1)]:
    print(a, b, cin, "->", full_adder(a, b, cin))
print(add_bits(45, 100), format(45, "08b"), "+", format(100, "08b"), "=", format(add_bits(45, 100)[0], "08b"))
print(add_bits(200, 100), "(200 + 100 = 300 does not fit in 8 bits: 300 - 256 =", 300 - 256, ")")
print("all 8-bit pairs agree:", all(add_bits(x, y) == ((x + y) % 256, (x + y) // 256) for x in range(256) for y in range(256)))
Text
0 0 0 -> (0, 0)
0 1 0 -> (1, 0)
1 1 0 -> (0, 1)
1 1 1 -> (1, 1)
(145, 0) 00101101 + 01100100 = 10010001
(44, 1) (200 + 100 = 300 does not fit in 8 bits: 300 - 256 = 44 )
all 8-bit pairs agree: True

The four lines are the binary addition facts, with a carry: 1+1=102 is "write 0, carry 1", and 1+1+1=112 is "write 1, carry 1". The adder agrees with ordinary addition on all 65,536 pairs of bytes. And 200 + 100 shows what happens when a sum is too big for its storage: the eight bits hold 44, and the carry out of the last column, worth 256, falls off the end. That's overflow, the computer's version of an odometer rolling over from 99,999 to 00,000.

Experiment 3: subtracting by adding

Python
def nines_complement(n, width):
    return int("".join(str(9 - int(d)) for d in str(n).zfill(width)))

a, b, w = 7032, 2845, 4
c = nines_complement(b, w)
s = a + c + 1
print(f"{b} -> nines' complement {c}; {a} + {c} + 1 = {s}; drop the leading 1 -> {s - 10**w}")
print("check:", a - b)
print("1000 - 386 =", nines_complement(386, 3) + 1, "(all from 9, the last from 10)")
Text
2845 -> nines' complement 7154; 7032 + 7154 + 1 = 14187; drop the leading 1 -> 4187
check: 4187
1000 - 386 = 614 (all from 9, the last from 10)

Taking each digit from 9 gives 9999−2845=7154, the nines' complement, with no borrowing. Then 7032+7154+1 =7032+(10000−2845), which is 7032−2845 plus 10,000; dropping the leading 1 removes the 10,000. Subtraction has become a digit-by-digit flip and an addition. Computers do exactly this in binary, where "take each digit from 1" just flips every bit; it's called two's complement, and chapter 9 shows how it also gives negative numbers.

Experiment 4: when the order of adding matters

On paper, addition is associative: you can add in any order. Floating-point numbers, the computer's approximate decimals, are rounded after every operation, so the order can change the answer.

Python
import math

def loop_sum(xs):
    total = 0.0
    for x in xs:
        total += x          # one rounded addition at a time, left to right
    return total

tenths = [0.1] * 10
print(loop_sum(tenths), sum(tenths), math.fsum(tenths))
print((1e16 + 1) - 1e16, (1e16 - 1e16) + 1)
xs = [1e16, 1.0, -1e16] * 1000
print(loop_sum(xs), sum(xs), math.fsum(xs))
Text
0.9999999999999999 1.0 1.0
0.0 1.0
0.0 1000.0 1000.0
JavaScript
const tenths = Array(10).fill(0.1);
console.log(tenths.reduce((a, b) => a + b, 0));
console.log((1e16 + 1) - 1e16, (1e16 - 1e16) + 1);
Text
0.9999999999999999
0 1

Adding 0.1 ten times, one rounded step at a time, gives 0.9999999999999999 in both languages: each 0.1 is slightly off (chapter 1), and the errors pile up. (1016+1)−1016 gives 0 while (1016−1016)+1 gives 1: near 1016, floating-point numbers are spaced 2 apart, so 1016+1 rounds back to 1016 and the 1 is lost. Floating-point addition is not associative. Python's built-in sum has, since version 3.12, used compensated summation for lists of floats, which keeps track of the lost low-order parts, so it gets 1.0 and 1000.0 (an integer mixed into the list turns this off; the companion shows the case); math.fsum goes further and returns the correctly rounded sum. A plain loop, and JavaScript's reduce, don't.

Worked examples

Choosing a method

Borrowing across zeros

Time and money

Exercises

Practice

  1. Use "make ten" to find 7+6, 9+8 and 48+7. Write the associativity step for one of them.
  2. Add in columns, showing carries: (a) 3,658+4,789; (b) 9,999+1; (c) 456+789+987.
  3. Subtract by decomposition: (a) 824−357; (b) 6,000−2,358; (c) 10,101−9,898.
  4. Do 3(b) and 3(c) again by counting up, and 3(a) by equal addition.
  5. Use compensation: (a) 1,998+2,456; (b) 732−296; (c) 5,000−1,999.
  6. Add in binary and check in decimal: (a) 10112+1102; (b) 11112+12.
  7. Check 2(a) by casting out nines. Then write a wrong answer that casting out nines would not catch.
Answers
  1. 7+6=7+3+3=13; 9+8=9+1+7=17; 48+7=48+2+5=55. For example, 7+(3+3) =(7+3)+3 =10+3.
  2. (a) 8,447 (carries of 1 in every column: 8 + 9 = 17, 5 + 8 + 1 = 14, 6 + 7 + 1 = 14, 3 + 4 + 1 = 8); (b) 10,000 (a carry ripples through every column); (c) 2,232 (ones: 6 + 9 + 7 = 22, write 2 carry 2; tens: 5 + 8 + 8 + 2 = 23, write 3 carry 2; hundreds: 4 + 7 + 9 + 2 = 22).
  3. (a) 467; (b) 3,642; (c) 203.
  4. 3(b): 2,358 → 2,360 (+2) → 2,400 (+40) → 3,000 (+600) → 6,000 (+3,000): 3,642. 3(c): 9,898 → 9,900 (+2) → 10,000 (+100) → 10,101 (+101): 203. 3(a) by equal addition: 14−7=7; tens 2−(5+1) becomes 12−6=6; hundreds 8−(3+1)=4: 467.
  5. (a) 2000+2456−2=4454; (b) 732−300+4=436; (c) 5000−2000+1=3001.
  6. (a) 100012=17 (11 + 6); (b) 100002=16 (15 + 1), a carry through every column, like 9,999 + 1.
  7. 3658→22→4, 4789→28→10→1, 4+1=5; 8447→23→5. ✓ Any rearrangement of the answer's digits, such as 8,474, has the same digit sum and passes; so does an answer that is off by exactly 9 or a multiple of 9, such as 8,456.

Harder

  1. Prove that when you add three numbers in columns, a carry is never more than 2. How large can a carry be when adding n numbers?
  2. Explain, with the beads, why borrowing across a zero (as in 500−1) changes two digits of the top number before any subtraction is done.
  3. Show that the equal-addition method and decomposition always give the same answer, using the same-difference rule.
  4. An odometer shows 99,950 km at the start of a trip and 00,213 km at the end. How far was the trip, and what assumption did you make?
  5. In 8-bit arithmetic (as in Experiment 2), what is 250+10? What is 5−10 if you subtract by adding the complement and drop the carry? Explain the second answer.
Answers
  1. A column of three digits holds at most 27, plus an incoming carry. If the incoming carry is at most 2, the total is at most 29 and the outgoing carry is at most 2; the first column has no incoming carry, so by induction every carry is at most 2. With n numbers, a column total is at most 9n+c where c is the incoming carry; if c≤n−1 then the total is at most 10n−1, whose tens part is at most n−1. So carries are at most n−1.
  2. 500 is 5 boxes, no bundles, no loose beads. To take away 1 loose bead you need a loose bead, and there are no bundles to open either. So open a box (5 boxes become 4) into 10 bundles, then open a bundle (10 bundles become 9) into 10 loose beads. The top number is now written 4 | 9 | 10, the same 500, and 10−1=9 gives 499.
  3. In equal addition, each time a column borrows, you add ten to the top number's column and one to the next column of the bottom number: the same amount added to both. By same difference, (a+k)−(b+k)=a−b, the difference is unchanged at every step, and the final column subtractions need no borrowing. Decomposition instead rewrites the top number without changing it. Both compute a−b, and the numeral of a number is unique (chapter 2), so they give the same digits.
  4. The odometer rolled over at 100,000. From 99,950 to 100,000 is 50 km, then 213 km more: 263 km. The assumption is that it rolled over exactly once; a five-digit odometer can't tell 263 km from 100,263 km.
  5. 250+10=260, and 260−256=4: the byte holds 4, with a carry out. For 5−10: complement of 10 is 255−10=245; 5+245+1=251, and there's no carry to drop. The result 251 is 256−5: the bit pattern for −5 in two's complement. Chapter 9 explains how the same bits mean 251 or −5 depending on how you read them.

Challenge

  1. Floating-point addition isn't associative, but it is commutative: x+y and y+x always round to the same value. Why would rounding break one property and not the other? Then suggest an order for adding a long list of positive numbers of very different sizes that loses less to rounding, and explain why it helps.
Discussion

Each floating-point operation computes the exact result and then rounds it. x+y and y+x have the same exact result, so they round to the same value: commutativity survives. But (x+y)+z rounds x+y first and then rounds again, while x+(y+z) rounds a different intermediate result; the two rounding errors differ, so the totals can differ. For a long list of positive numbers, adding the smallest first lets them accumulate into a total large enough to register when it finally meets the big numbers; added one at a time to a big running total, each small number might be rounded away (as the 1 was next to 1016). Compensated summation, as in Python's sum since 3.12, tracks the rounding error of each step and feeds it back in.

In real life

Misconceptions and limits

The model to keep

Common misconceptions

Misconception What's actually true Where it's shown
"When the top digit is smaller, subtract the other way round." Taking the smaller digit from the larger gives 52−38=26 (5−3 tens, 8−2 ones). The ones column must borrow instead, and the answer is 14. Decomposition (borrowing)
"Borrowing changes the top number." Regrouping changes only how the number is written: 6 thousands, 9 hundreds, 12 tens and 12 ones is still 6000+900+120+12=7032. Decomposition (borrowing)
"A carry can be any size." Adding two numbers, a carry is always 0 or 1; adding n numbers, at most n−1. How big can a carry be?
"Equal addition is a trick that happens to work." It's the same-difference rule: adding ten to the top and one ten to the bottom adds the same amount to both. Equal addition ("borrow and pay back")
"If casting out nines checks out, the answer is right." It misses swapped digits and errors of a multiple of nine. It's a quick check, not a proof. Casting out nines
"Computers add exactly." Integers do (until they overflow); floating-point numbers round after every step, so the order of adding can change the result. Experiment 4: when the order of adding matters
"Left to right is the wrong way to add." Either order works; right to left just avoids fixing digits when carries arrive. Mental methods often go left to right. Why right to left

Limits and trade-offs

  • Column methods need the same base and aligned places. Mixed units (hours and minutes, metres and centimetres) must be converted or handled with their own bundle sizes; chapter 11 is about units.
  • Subtraction of whole numbers stops at zero. 3−5 has no answer among the natural numbers; chapter 9 extends the numbers so it does.
  • Machine integers have a fixed width. Beyond the largest value they overflow, wrapping round or raising an error depending on the language; Python's integers don't overflow, while most languages' do.
  • Checks have blind spots. Inverse checks catch errors in the method but not in copying the question; casting out nines misses rearrangements. Use more than one when it matters.

Revision sheet

Key ideas

  • Column addition adds place by place (distributivity and regrouping), then carries: a column total of ten or more becomes one of the next place up.
  • Adding two numbers, carries are 0 or 1; adding n numbers, at most n−1.
  • In any base, carry when a column reaches the base; in binary 1+1=102.
  • Strategies: make ten, near doubles, number bonds, compensation (round, then correct in the right direction).
  • Decomposition: unbundle one from the next place when a column is short; the number doesn't change.
  • Equal addition: add ten to the top column and one to the next bottom column; uses same difference, (a+k)−(b+k)=a−b.
  • Counting up: the missing-part story; best when numbers are close or near round ones.
  • From a power of ten: each digit from 9, the last from 10; computers' complements use the same idea.
  • Check by the inverse, by estimating, by casting out nines (which misses swapped digits).
  • Floating-point addition rounds each step, so order matters.

Glossary

  • Addend: a number being added.
  • Sum: the result of an addition.
  • Minuend and subtrahend: in a−b, the number subtracted from (a) and the number subtracted (b).
  • Difference: the result of a subtraction.
  • Carry: in column addition, the part of a column total that moves to the next place to the left.
  • Decomposition: the subtraction method that regroups the top number, unbundling one of a higher place into ten of the place below ("borrowing").
  • Equal addition: the subtraction method that adds ten to a column of the top number and one to the next column of the bottom number.
  • Compensation: adjusting a number to a convenient one for calculating, then correcting the result.
  • Number bond: a pair of numbers with a convenient sum, such as 3 and 7 for ten.
  • Nines' complement: the number obtained by subtracting each digit from 9; 9999−n for a four-digit n.
  • Casting out nines: checking a calculation by comparing the remainders of its numbers on division by 9, found from digit sums.
  • Full adder: a circuit that adds two bits and an incoming carry, giving a sum bit and an outgoing carry.
  • Overflow: a result too large for the fixed number of digits or bits that store it.