Edexcel IGCSE Computer Science 4CP0
Algorithms
Searching and Sorting Algorithms
Decomposition and Abstraction
Developing and Testing Code
Programming Constructs and Operators
Data Types and Data Structures
Input, Output and Validation
Data Representation
Data Storage and Compression
Encryption
Hardware and the CPU
Software
Programming Languages and Translators
Networks
Network Security
The Internet and the World Wide Web
Emerging Trends, Issues and Impact
Binary
Binary addition, shifts and overflow
- 3 things to know
- Papers 1 and 2
Overview
Adding binary numbers, overflow, and logical and arithmetic shifts with their effect on a number's value.
What you need to know
Answer each one before you reveal it.
Add the unsigned 8-bit binary numbers 10101010 and 01100110, and state whether overflow occurs
Add the unsigned 8-bit binary numbers 11110000 and 00010001, and state whether overflow occurs
Questions from this subtopic
Each one with the model answer underneath.
- 1
Add the binary numbers 01101101 and 00110110.
Model answer
The sum of 01101101 and 00110110 is 10100011, which is 109 + 54 = 163 in denary.
- 2
When does overflow occur when adding two unsigned 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.
- 3
What is the effect of a logical left shift of one place?
Model answer
A logical left shift of one place multiplies the binary number by 2, as long as no 1 bits are lost from the left.
- 4
What is the effect of a logical right shift of one place?
Model answer
A logical right shift of one place divides the binary number by 2, and any remainder is lost.
- 5
Perform a logical left shift of two places on 00010110.
Model answer
Shifting 00010110 two places left gives 01011000. The value changes from 22 to 88, which is multiplied by 4.
- 6
Perform a logical right shift of one place on 00010110.
Model answer
Shifting 00010110 one place right gives 00001011. The value changes from 22 to 11, which is divided by 2.
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 Binary, 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.