How do we add numbers?

309 Views Asked by At

How do we compute sums in general? How can we tell the result of the operation $A+B$?

Even when we talk about very basic numbers like $\Bbb{N}$ I find it hard to understand the algorithm we use to compute a sum. We know things like $2+3=5$ but what about larger numbers?

How do we generalize this technique?

To clarify what I'm asking, I'm looking for an algorithm, or a way to compute a sum of two numbers that doesn't need the notion of multiplication. I've read similar threads where methods like representing $1234$ as $1 \cdot 10^3 + 2 \cdot 10^2 + 3 \cdot 10^1 + 4 \cdot 10^0$ and then operating applying the distributive, commutative and associative laws, but that only works if you've defined multiplication (and maybe even exponentiation before!).

2

There are 2 best solutions below

2
On BEST ANSWER

It very much depends on how the numbers $A$ and $B$ are encoded - if you're given a pile of $A$ rocks and a pile of $B$ rocks, you might not have any better options than to start counting. Of course a more common method is radix representation (Wikipedia link), e.g. binary, decimal; then you can use the standard "carrying" algorithm (Wikipedia link). More complex algorithms are often implemented in computers' adder circuits (Wikipedia link).

0
On

A more general approach:

In general the calculation of a anything can be traced back to its definition. The axioms concerning addition in the naturals can be found here: http://en.wikipedia.org/wiki/Peano_axioms. In particular one aims to derive faster algorithms from those definitions and prove that those algorithms agree with the most fundamental calculation of the sum.