Chhetri AcademyGCSE & A level Paper Builder

2.1.4, 2.1.5Binary addition and overflow

Edexcel GCSE Computer Science (1CP2) · Data › Binary

Practise Binary addition and overflow. 12 exam-style questions plus unlimited generated ones on this subtopic, at up to four difficulty levels, with full mark schemes and a progress tracker. Free, no account needed.

Build a paper on this topic

▶ Watch videos on Binary addition and overflow (Craig 'n' Dave Edexcel on YouTube) · Practise all of Binary

Quick recall

Cover the answers and test yourself. The app has these as flashcards that come back just before you'd forget them.

Define the term 'overflow error'.
The result of a calculation is too big to fit in the number of bits available.
State the largest score that the scoreboard can store for one team.
255

Sample questions

Written for this site in the style of Edexcel exam questions. They are not taken from real past papers.

Question 1Easy4 marks
Two 8-bit unsigned binary numbers are added: 0001 0011 and 0000 1101.
(a) Calculate the sum of the two binary numbers. Give your answer as an 8-bit binary number.[2]
(b) State whether an overflow has occurred. Give a reason for your answer.[2]
Show the answer and mark scheme
(a) Answer: 0010 0000
  • binary addition with carries, with at least 7 of the 8 bits correct
  • 0010 0000
(b) Answer: No: there is no carry out of the MSB (32 ≤ 255).
  • no (overflow has not occurred)
  • there is no carry out of the most significant bit / the answer, 32, is not greater than 255, the largest 8-bit value
Question 2Medium4 marks
A basketball scoreboard stores each team's score as an 8-bit unsigned binary integer. At half time, the home team has scored 0101 1011 points. In the second half they score another 0011 0110 points.
(a) Calculate the home team's final score by adding the two binary numbers. Give your answer as an 8-bit binary number.[2]
(b) Convert your answer to part (a) to denary.[1]
(c) State the largest score that the scoreboard can store for one team.[1]
Show the answer and mark scheme
(a) Answer: 1001 0001
  • left-hand four bits: 1001
  • right-hand four bits: 0001
(b) Answer: 145
  • 145
(c) Answer: 255
  • 255
Question 3Hard5 marks
A delivery drone stores its height above the ground, in metres, as an 8-bit unsigned binary integer. The drone is at a height of 1011 0100 metres. It is instructed to climb a further 0101 1010 metres.
(a) Calculate the 8-bit result that will be stored when the two binary numbers are added.[2]
(b) Explain why this could cause the drone to behave dangerously.[2]
(c) Give one way the programmers could prevent this problem.[1]
Show the answer and mark scheme
(a) Answer: 0000 1110 (the carry out of the most significant bit is lost)
  • left-hand four bits: 0000
  • right-hand four bits: 1110
(b) Answer: Overflow: 180 + 90 = 270, but only 14 is stored. The drone believes it is 14 m high and may act on that false height.
  • an overflow has occurred: the true height is 270 m but the stored height is only 14 m
  • the control system would think the drone is close to the ground, so it could make unsafe decisions, e.g. keep climbing / lose track of its real height / fail to avoid obstacles
(c) Answer: Use a 16-bit integer for the height.
  • store the height using more bits, e.g. 16 bits / check for overflow before storing the result / limit the maximum height to 255 m

Related subtopics

Stuck? Get 1-to-1 help. Chhetri Academy tutors GCSE and A level Maths and Science online, with a free 30-minute trial lesson.

Book a free trial