-1
$\begingroup$

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!).

$\endgroup$
  • $\begingroup$ Are you asking about pencil-and-paper algorithms to add large numbers? $\endgroup$ – hardmath May 28 '15 at 1:20
  • $\begingroup$ We note that $+$ is associative and commutative so you can add numbers in whichever order you like. Then we make use of decimal notation which tells us for instance that $1234 = 1000+200+30+4$. $\endgroup$ – user137731 May 28 '15 at 1:29
  • 2
    $\begingroup$ Possible duplicate? $\endgroup$ – user137731 May 28 '15 at 1:33
  • $\begingroup$ @Bye_World Thanks, but no, I clarified why that wasn't a duplicate just now. $\endgroup$ – YoTengoUnLCD May 29 '15 at 20:56
  • 2
    $\begingroup$ I agree. If you bar any notion of multiplication, you can't even use $1234$ to really represent that number. It might denote it, but it's just shorthand for $\text{SSSSSS}\ldots\text{SSS}0$, where there are $1234$ S's. Speaking of which, you can shuttle S back and forth between two numbers in a sum; that is, $\text{SSSS}0+\text{S}0 = \text{SSS}0+\text{SS}0$. Continue until one of the numbers is $0$. Does that serve as an algorithm for performing addition? $\endgroup$ – Brian Tung May 29 '15 at 21:03
2
$\begingroup$

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).

$\endgroup$
  • 2
    $\begingroup$ (Well, if a pile of rocks is considered an acceptable encoding of a number, then we can just lump the piles together with a bulldozer to compute the sum!) $\endgroup$ – Chris Culter May 28 '15 at 1:56
  • $\begingroup$ Haha that's a good point :) $\endgroup$ – Zev Chonoles May 28 '15 at 2:12
0
$\begingroup$

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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.