Adding Binary Numbers and Overflow
Adding binary numbers column by column with a carry, and what happens when the answer needs more bits than the space it has.
What a learner can do afterwards
- Add two 8-bit binary numbers, carrying correctly
- Spot an addition whose result no longer fits in 8 bits
- Describe what a program shows when a value overflows
1 · Read
Think of a step counter or a game score climbing by one each time. Underneath, it is adding in binary: column by column just like decimal, except 1 + 1 makes 10 in binary. Write 0 and carry 1 into the next column left, lining the numbers up on the right and working left one bit at a time.
Add 01101101 and 01011010 the slow way, carrying each 1 + 1 forward. The columns build 11000111, which reads as 199. Since 199 sits below 256, the answer still fits in 8 bits.
Eight bits hold 256 patterns, 0 to 255, and no more. When an addition passes the limit, the extra bit falls off the end and the stored answer wraps to a small number, and that event is called overflow. The program may then show a wrong-looking answer, so the fix is more bits or a size check first.
Always fold the incoming carry into the column before you read it. Most wrong sums come from a carry that was quietly ignored.
Add binary leftward with carries, and call it overflow when the answer outgrows its bits.
2 · Watch
Take it off screen
Where it sits
8 questions wait behind this lesson, each with its answer explained. Every answer feeds the sky: stars light as they are learned, and dim when it is time to come back.