Overflow Errors - When Numbers Get Too Big
Part of Binary Arithmetic — GCSE Computer Science
This key facts covers Overflow Errors - When Numbers Get Too Big within Binary Arithmetic for GCSE Computer Science. Revise Binary Arithmetic in Memory & Storage for GCSE Computer Science with 15 exam-style questions and 18 flashcards. This topic appears regularly enough that it should still be part of a steady revision cycle. It is section 4 of 10 in this topic. Use this key facts to connect the idea to the wider topic before moving on to questions and flashcards.
Topic position
Section 4 of 10
Practice
15 questions
Recall
18 flashcards
Overflow Errors - When Numbers Get Too Big
What is Overflow?
When the result of a calculation is too large to fit in the available number of bits, an overflow error occurs. The extra bits are lost!
Example: 8-bit Overflow
8-bit can store: 0 to 255 (00000000 to 11111111)
What happens if we add 200 + 100?
11001000 (200)
+ 01100100 (100)
----------
¹¹¹¹¹¹¹ ← carries
1 00101100 (This would be 300, but...)
↑
This 9th bit doesn't fit in 8 bits!
Computer sees: 00101100 = 44 (WRONG!)
Overflow error! The carry out of the MSB is lost.
Detecting Overflow:
- Unsigned binary: Overflow if carry out of the MSB
- Real-world: Games showing "99999" max score, counters wrapping around
- Example: Pac-Man kill screen at level 256 (8-bit overflow: 255+1 = 0)