It is known that adding two numbers and looking at the carrying operation has a link with cocycles in group theory. (<https://www.jstor.org/stable/3072368?origin=crossref>)
When we add two numbers by elementary addition, we choose a basis $b$ for example $b=2$ which corresponds to the cyclic group $C\_2$.


Suppose we have words $w\_1,w\_2$ of (possibly different) lengths from this group $C\_2$, how do we add them to get a new word $w$ in elementary addition?


For example: $2=10\_2=w\_1$, $3=11\_2=w\_2$. Consider these as $w\_1$ and $w\_2$. Adding these numbers we get $5=101\_2$ so the new word $w=101$.


(1) But how exactly is the process of adding these two "words" from $C\_2 = \{0,1\}$ in group theoretic means?


(2) Is this "elementary addition" also possible for example for a non-cylcic group such as the Klein Four group?


(3) We also assign a number to such a word (b-adic expansion). Is this assignment also possible for the Klein Four group?


Thanks for your help.


**Edit**: In view of the plot given below, I decided to put the tag "fractals" to this question.



How to add two numbers from a group theoretic perspective?
I think the point is that, forgetting the final carry, the group of $n$-digit binary words is isomorphic to $C\_{2^n}$. In the simplest case, the group of 2-digit binary words is isomorphic to $C\_4$, which is built as a nontrivial extension
$$ 0 \to C\_2 \to C\_4 \to C\_2 \to 0 $$
The 2-cocycle you mention is the one corresponding to this extension. In general, $C\_{2^n}$ is built up as an iterated extension of $C\_2$'s in the same way, with each carry being the associated 2-cocycle.
If we want to avoid forgetting the final carry, we can take the limit of the whole system to get the 2-adics $\mathbb{Z}\_2$. The natural numbers $\mathbb{N}$ sit inside this as the submonoid of "finite words" (words whose digits are eventually 0 as we read right to left)


