How a Computer Works · Computer science

Binary addition

Binary addition is an interactive experiment in How a Computer Works, a free simulation from StudyFi Lab that runs right in your browser.

The numbers are added column by column from the right, just like on paper, except that 1 + 1 = 10: write 0 and carry 1 into the next column. If a carry falls out of the 8th bit, the result does not fit in 8 bits — an overflow. A computer subtracts a − b as a + (b inverted) + 1, i.e. it adds the two’s complement.

Try this: Set 200 + 100 and step through: a carry falls off the left and the result is only 44. Then try the subtraction 5 − 12.

Frequently asked questions

What does the “Binary addition” experiment show?

The numbers are added column by column from the right, just like on paper, except that 1 + 1 = 10: write 0 and carry 1 into the next column. If a carry falls out of the 8th bit, the result does not fit in 8 bits — an overflow. A computer subtracts a − b as a + (b inverted) + 1, i.e. it adds the two’s complement.

How do I try “Binary addition”?

Set 200 + 100 and step through: a carry falls off the left and the result is only 44. Then try the subtraction 5 − 12.

Studying for a test?

Upload your notes and StudyFi turns them into flashcards, tests and podcasts.

Try StudyFi free