We learned how to represent numbers as a sequence of on or off bits. If not, check it out.

Addition is an important operation and also quite simple. If we place two blocks next to each other, how wide will the resulting block be? One way is to place them next to each other and see the total width. What is the total width of the combined block of black and brown?

Width =

What we really want is a way to determine the sum based on the binary representations of two numbers. So first, what are the widths of each block?

Width =
Width =

Hopefully, you figured out that the sum we want is +.

Width =

You should note that this sum is really just a matter of rearranging the blocks. And changing the order of the blocks does not change the width, so we can rearrange blocks as needed to make the addition easier.

Let's try to determine an algorithm to perform addition without needing to check which arrangement of blocks fits exactly. However, whatever algorithm we create should match the answer generated from measuring the width of the combined block.

Start with the simplest cases. What are +, +, +, and +?

Gray means off so there is no width, so + and + will both simply be . And + = . The more complicated question is the sum of two of the same blocks. The combined width will be twice as wide so the answer is .