Edexcel GCSE Computer Science 1CP2
Computational Thinking
Data
Computers
Networks
Issues and Impact
Problem Solving with Programming
Data
Binary addition, overflow and shifts
- 3 things to know
- Paper 1
Overview
Rules for binary addition, worked 8-bit additions, overflow and its problems, logical left and right shifts, and arithmetic right shifts on negative numbers.
What you need to know
Answer each one before you reveal it.
Add the 8-bit binary numbers 00101101 and 00011011.
Add the 8-bit binary numbers 01110110 and 00111001.
Questions from this subtopic
Each one with the model answer underneath.
- 1
State the rules for adding single binary digits.
Model answer
The sum 0 + 0 gives 0, and 0 + 1 gives 1. The sum 1 + 1 gives 0 carry 1, and 1 + 1 + 1 gives 1 carry 1.
- 2
Add the 8-bit binary numbers 00101101 and 00011011.
Model answer
The binary sum is 01001000. The denary check is 45 + 27 = 72.
- 3
Add the 8-bit binary numbers 01110110 and 00111001.
Model answer
The binary sum is 10101111. The denary check is 118 + 57 = 175.
- 4
What is overflow?
Model answer
Overflow happens when the result of a calculation needs more bits than are available to store it. The extra bit is lost, so the stored result is wrong.
- 5
What is stored when 11001000 and 01100100 are added in an 8-bit register?
Model answer
The register stores 00101100, which is 44. The true sum is 100101100, or 300, which needs 9 bits, so the leading 1 overflows.
- 6
How can you spot that overflow has happened when adding two 8-bit unsigned numbers?
Model answer
Overflow has happened if a carry comes out of the most significant bit. The true answer would need a ninth bit.
Other ways to work this
The same content, four other ways.
What is inside Levo
Six ways to work the same material.
Every question in Data, on a schedule.
Attempt a question from memory, write the correct version, then attempt it again. Levo records the jump between your first attempt and your last, and brings each question back on the day you are due to forget it.
Or £46 a year, about £3.83 a month. Cancel anytime.