Cambridge IGCSE Computer Science 0478
Data Representation
Data Transmission
Hardware
Software
The Internet and Its Uses
Automated and Emerging Technologies
Algorithm Design and Problem-Solving
Programming
Data Representation
Binary addition, shifts and two's complement
- 3 things to know
- Paper 1
Overview
Adding 8-bit binary numbers, overflow, logical left and right shifts, and representing negative numbers in two's complement.
What you need to know
Answer each one before you reveal it.
Add the 8-bit binary numbers 10101010 and 01100110, and state whether overflow occurs
Add the 8-bit binary numbers 11110000 and 00010001, and state whether overflow occurs
Questions from this subtopic
Each one with the model answer underneath.
- 1
What are the four rules of binary addition?
Model answer
In binary addition, 0 + 0 = 0 and 0 + 1 = 1. The sum 1 + 1 = 0 carry 1, and 1 + 1 + 1 = 1 carry 1.
- 2
Add the binary numbers 01101101 and 00110110.
Model answer
The sum of 01101101 and 00110110 is 10100011, which is 109 + 54 = 163 in denary.
- 3
What is an overflow error?
Model answer
An overflow error happens when the result of a calculation is too large to fit in the number of bits available.
- 4
When does overflow occur when adding two 8-bit binary numbers?
Model answer
Overflow occurs when the result is greater than 255, because 255 is the largest value an 8-bit register can hold.
- 5
What happens when 11001000 and 01100100 are added in an 8-bit register?
Model answer
The true sum is 300, which needs a ninth bit. The ninth bit is lost, so the register holds 00101100, which is 44, and an overflow error occurs.
- 6
What is a logical shift?
Model answer
A logical shift moves every bit in a register left or right by a set number of places. Bits shifted off the end are lost and zeros fill the empty places at the other end.
Other ways to work this
The same content, four other ways.
Everything in your subscription
Runs, plus a mode for every other kind of session.
Every question in Data Representation, on a schedule.
Learn it in runs of four questions, each ending on a brain dump against the clock. Every question you lock in comes back the next day, then at longer gaps, each time just before you would forget it.
Or £46 a year, about £3.83 a month. Cancel anytime.