Binary Addition and the Carry

The seventh intro shows how a machine adds bits. The experiment uses two lamps, Sum and Carry, and then predicts the full adder.

Experiment: adding 1 + 1

The circuit has two bits to add, A and B, and two lamps: Sum is the low digit of the sum, Carry is the carry. With A=1 and B=1 the Sum lamp goes dark and Carry lights up: the notation reads 10, which is two. The one moved into the carry — like the 1 you write above the next column in long addition.

The half adder rule

A half adder is built from two gates: XOR gives Sum, AND gives Carry. Its truth table:

ABSumCarry
0000
0110
1010
1101

Binary column addition works like the usual one: when a digit overflows, the extra one moves to the next digit. Add 11 + 1 this way: the low digit gives 0 and a carry, the high digit plus that carry again gives 0 and one more carry. The result is 100, which is four.

Transfer: the full adder

A real adder sums three bits: A, B and the carry from the previous digit. Predict the answer for 1 + 1 + 1 before clicking: two ones make the carry, the last one stays in Sum — 11 in total, which is three.

Where it is used

The full adder you build on this level is a brick for adding any numbers. Eight such adders in a chain add two bytes: the carry runs from the low digit to the high one like a wave. This is how calculators, processors and graphics cards add numbers.

Take the intro in the game · Level 7 guide · All intros