O Level Computer Science (2210) online classes
Computer Science mixes theory with problem solving. Our lessons explain how computers store data and communicate, then teach algorithms and pseudocode with every line traced, so programming questions stop being scary.
How we teach O Level Computer Science
Everything a Computer Science student needs for the Cambridge exam, in one place.
Video lectures
Every Computer Science topic in syllabus order, explained by a subject teacher with clear worked examples.
Lecture notes
Key points, definitions and formulas for each lesson, ready to revise from.
Quizzes and worksheets
A quiz after every lesson and a printable worksheet with a marking key.
Past papers by topic
269 real Cambridge questions, sorted by topic, with answers.
Exam-style practice
New questions written the way Cambridge asks them, so students apply what they learn.
Tests and mock exams
Chapter tests and timed mocks that show strengths, weak topics and a predicted grade.
AI subject teacher
Ask any Computer Science question, day or night, and get written answers checked.
Study plan and parent reports
A plan up to the exam date, and progress reports parents can follow.
O Level Computer Science (2210): every chapter
Chapter 1 is free to watch, with no account. Sign up to unlock the rest.
Chapter 1 · Lesson 1
Introduction
Lecture points
Copy these into your notebook. These are the points examiners look for.
Definitions to learn word for word
Common mistakes that lose marks
- Thinking the computer stores hex or denary inside: everything is stored as binary.
Quiz · 10 questions
Pick an answer and read the explanation.
1. Why does a computer use binary?
2. How many bits are there in one byte?
3. Which number system is base 16?
4. Where is data stored while the computer processes it?
5. Which statement about the exam is correct?
6. A single 0 or 1 is called a…
7. Which number system do people use every day?
8. Data inside a computer is processed by…
9. Which kinds of data are stored as binary?
10. How many digits does binary use?
Topic worksheet
Introduction
- Answer all questions in the spaces provided.
- Show your working in calculations and give units.
- The number of marks is shown in brackets [ ].
| Section | Marks | Out of |
|---|---|---|
| A | 6 | |
| B | 4 | |
| Total | 10 |
Why does a computer use binary?[1]
How many bits are there in one byte?[1]
Which number system is base 16?[1]
Where is data stored while the computer processes it?[1]
Which statement about the exam is correct?[1]
A single 0 or 1 is called a…[1]
Define Bit.[2]
Define Byte.[2]
[Total: 10]
Chapter 1 · Lesson 2
The binary system
Lecture points
Copy these into your notebook. These are the points examiners look for.
Definitions to learn word for word
Common mistakes that lose marks
- Writing fewer than 8 bits: 45 is 00101101, not 101101 (when the question asks for 8 bits).
- Reading the remainders of the ÷ 2 method from the top down (52 would come out as 00001011 = 11).
- Putting place values in the wrong order: 128 is on the LEFT.
- Not showing working: the table or the divisions can earn a mark even if the final answer has a slip.
Quiz · 10 questions
Pick an answer and read the explanation.
1. Why do computers use binary?
2. How many bits are in one byte?
3. What is the denary value of 00010011?
4. What is 100 in 8-bit binary?
5. What is the largest denary number one byte can hold?
6. In the ÷ 2 method for 52, the remainders are 0, 0, 1, 0, 1, 1 (top to bottom). The 8-bit binary number is…
7. Which place value is the leftmost bit of an 8-bit number?
8. What is 11000000 in denary?
9. What is 01011010 in denary?
10. What is 200 in 8-bit binary?
Topic worksheet
The binary system
- Answer all questions in the spaces provided.
- Show your working in calculations and give units.
- The number of marks is shown in brackets [ ].
| Section | Marks | Out of |
|---|---|---|
| A | 6 | |
| B | 7 | |
| C | 4 | |
| D | 5 | |
| Total | 22 |
Why do computers use binary?[1]
How many bits are in one byte?[1]
What is the denary value of 00010011?[1]
What is 100 in 8-bit binary?[1]
What is the largest denary number one byte can hold?[1]
In the ÷ 2 method for 52, the remainders are 0, 0, 1, 0, 1, 1 (top to bottom). The 8-bit binary number is…[1]
Define Bit.[2]
Define Byte.[2]
Define Binary.[2]
State why a computer uses binary to represent data.[1]
Convert the binary number 11010011 into denary.
answer = [2]
Convert the binary number 00111001 into denary.
answer = [2]
A school's smart attendance board stores the number of students present in each class as an 8-bit binary number.
(a) Convert the denary number 37 into 8-bit binary. Show your working.[2]
(b) The board shows 10011010 for Class 9-B. Convert this into denary.[1]
(c) State the largest number of students the board can store for one class, and explain why.[2]
[Total: 22]
- (a) working shown: place-value table or divisions by 2 for 37
- (a) 00100101 (all 8 bits)
- (b) 154
- (c) 255
- (c) because 8 bits (11111111) is the largest value / 8 bits give 256 values from 0 to 255
This topic came up in 7 of the last 7 Cambridge exams
From 2023 to 2026: 17 questions worth 29 marks.
- Get the paper from your teacher or school.
- Try the question yourself first.
- Press Show our answer to check your working.
Our answer: Denary (decimal).
Examiner tip: Denary is base 10; binary base 2; hex base 16.
Our answer: C: logic gates work with only two states, so data must be binary.
Examiner tip: Gates and circuits have two states: on and off.
Our answer: 00100010 = 32 + 2 = 34.
Our answer: 00010011 = 16 + 2 + 1 = 19.
Our answer: 101 = 64 + 32 + 4 + 1 = 01100101.
Our answer: 24 = 16 + 8 = 00011000.
Our answer: 2^12 - 1 = 4096 - 1 = 4095.
Our answer: 19 = 16 + 2 + 1 = 10011 (00010011). 230 = 128 + 64 + 32 + 4 + 2 = 11100110. One mark each.
Our answer: 1. 175 = 128 + 32 + 8 + 4 + 2 + 1. 2. 10101111.
Our answer: 15 = 00001111. 180 = 10110100 (128+32+16+4). 235 = 11101011 (128+64+32+8+2+1). One mark each.
Our answer: 1. Computers are made of switches and circuits with two states, on and off. 2. These two states stand for 1 and 0, so all data is stored as binary.
Our answer: 10 = 00001010. 50 = 00110010 (32+16+2). 201 = 11001001 (128+64+8+1). One mark each.
Examiner tip: Use column values 128, 64, 32, 16, 8, 4, 2, 1.
Our answer: 1. 14 = 8+4+2 = 00001110. 2. 59 = 32+16+8+2+1 = 00111011. 3. 234 = 128+64+32+8+2 = 11101010.
Examiner tip: Leading zeros may be left out.
Our answer: 1. It is base 2. 2. It uses only two digits, 0 and 1.
Our answer: 11100011 = 128+64+32+2+1 = 227.
Our answer: 1. 50 = 32+16+2 = 00110010. 2. 102 = 64+32+4+2 = 01100110. 3. 221 = 128+64+16+8+4+1 = 11011101.
Examiner tip: Use the place values 128 64 32 16 8 4 2 1 and write all 8 bits.
Our answer: B. Binary is base 2: only the digits 0 and 1.
Question papers are © Cambridge University Press & Assessment. We list where each question appeared and give our own worked answers.
Chapter 1 · Lesson 3
The hexadecimal system
Lecture points
Copy these into your notebook. These are the points examiners look for.
Definitions to learn word for word
Common mistakes that lose marks
- Writing 3 as 11 instead of 0011 when converting hex to binary: always 4 bits per hex digit.
- Grouping bits from the left when the number of bits is not a multiple of 4: group from the right.
- Writing 12 instead of C in a hex answer.
- Saying the computer "uses hex" internally: it stores binary; hex is for humans.
Quiz · 10 questions
Pick an answer and read the explanation.
1. What is the denary value of the hex digit E?
2. How many bits does one hexadecimal digit represent?
3. Convert 1100 1001 into hexadecimal.
4. Convert A7 into denary.
5. Convert 5D into 8-bit binary.
6. Convert the hexadecimal number A4B into 12-bit binary.
7. What is 255 in hexadecimal?
8. What is the hex digit for denary 11?
9. Convert 0111 1110 into hexadecimal.
10. Convert hex 4A into 8-bit binary.
Topic worksheet
The hexadecimal system
- Answer all questions in the spaces provided.
- Show your working in calculations and give units.
- The number of marks is shown in brackets [ ].
| Section | Marks | Out of |
|---|---|---|
| A | 6 | |
| B | 8 | |
| C | 4 | |
| D | 4 | |
| Total | 22 |
What is the denary value of the hex digit E?[1]
How many bits does one hexadecimal digit represent?[1]
Convert 1100 1001 into hexadecimal.[1]
Convert A7 into denary.[1]
Convert 5D into 8-bit binary.[1]
Convert the hexadecimal number A4B into 12-bit binary.[1]
Define Hexadecimal.[2]
Define Nibble.[2]
Convert the 16-bit binary number 1100 0001 0101 1111 into hexadecimal.[2]
Convert the denary number 700 into hexadecimal. Show your working.[2]
Convert the hexadecimal number 5B into denary.
answer = [2]
Convert the hexadecimal number E4 into denary.
answer = [2]
A web designer chooses the colour #2E8B57 for a school website button.
(a) The red part of the colour is the hex number 2E. Convert 2E into 8-bit binary.[2]
(b) Convert the green part, 8B, into denary. Show your working.[2]
[Total: 22]
- (a) 2 → 0010 (each digit as 4 bits)
- (a) E → 1110, so 00101110
- (b) working: 8 × 16 + 11
- (b) 139
This topic came up in 7 of the last 7 Cambridge exams
From 2023 to 2026: 28 questions worth 51 marks.
- Get the paper from your teacher or school.
- Try the question yourself first.
- Press Show our answer to check your working.
Our answer: 0A2 = 10 x 16 + 2 = 162. 104 = 1 x 256 + 0 x 16 + 4 = 260.
Examiner tip: Place values are 256, 16, 1.
Our answer: 0100 0111 0101 = 4, 7, 5 -> 475. 1010 1110 1000 = A, E, 8 -> AE8.
Examiner tip: Group the bits in fours from the right.
Our answer: 152: 1=0001, 5=0101, 2=0010 -> 0001 0101 0010. 30F: 3=0011, 0=0000, F=1111 -> 0011 0000 1111.
Examiner tip: Keep the leading zeros.
Our answer: 0010 = 2, 1101 = D, 1000 = 8. Answer: 2D8.
Examiner tip: 1101 is 13, which is D.
Our answer: 0111 = 7, 0001 = 1. Answer: 71.
Examiner tip: Split into groups of 4 bits from the right.
Our answer: 1 = 0001, 0 = 0000, 1 = 0001. Answer: 0001 0000 0001.
Examiner tip: Each hex digit gives exactly 4 bits.
Our answer: 2 = 0010, A = 1010. Answer: 0010 1010.
Examiner tip: Keep all 8 bits, including leading zeros.
Our answer: 1000 = 8 and 0010 = 2, so 82.
Our answer: E = 1110 and 3 = 0011, so 11100011.
Our answer: 5 = 0101 and 1 = 0001, so 01010001.
Our answer: Split into groups of 4 bits. 1000 1010 0001 = 8A1. 0111 0000 1011 = 70B.
Our answer: Each hex digit is 4 bits. 429 = 0100 0010 1001. 1A3 = 0001 1010 0011.
Examiner tip: Keep all 12 bits, including leading zeros.
Our answer: 12 bits = 3 hex digits, all bits 1: FFF.
Our answer: Each hex digit becomes 4 bits. 35 = 0011 0101. 8AD = 1000 1010 1101.
Our answer: Divide by 16. 109 = 6x16 + 13, so 6D (06D). 415 = 1x256 + 159, 159 = 9x16 + 15, so 19F.
Our answer: Use place values 256, 16, 1. 2C = 2x16 + 12 = 44. 10B = 1x256 + 0x16 + 11 = 267.
Our answer: Write each hex digit as 4 bits. 14B = 0001 0100 1011. 97A = 1001 0111 1010. One mark per number.
Examiner tip: Keep the 4-bit groups, even for leading zeros.
Our answer: 15 = 0001 0101. 2D = 0010 1101. 091 = 0000 1001 0001. One mark each.
Examiner tip: Change each hex digit to a 4-bit group.
Our answer: 14 = E. 100 = 64 (6x16 + 4). 250 = FA (15x16 + 10). One mark each.
Examiner tip: Divide by 16; remainders 10 to 15 become A to F.
Our answer: 1. Hexadecimal is base 16; binary is base 2. 2. Hex uses digits 0-9 and A-F; binary uses only 0 and 1. 3. Hex is shorter and easier for people to read. (Any two.)
Our answer: 1. Both are number systems used by computers (or both can represent the same values).
Our answer: 1. Hexadecimal.
Our answer: 20 = 16 + 4, so 14. 32 = 2 x 16, so 20. 165 = 10 x 16 + 5, so A5. One mark for each.
Examiner tip: Divide by 16: the quotient is the first digit, the remainder is the second.
Our answer: C. Hexadecimal is base 16, not base 10.
Examiner tip: Base 16 has 16 symbols: 0-9 and A-F.
Our answer: 1. 9 = 9. 2. 26 = 1x16 + 10 = 1A. 3. 65 = 4x16 + 1 = 41.
Examiner tip: 10 is A.
Our answer: 1. 1110 = E. 2. 0011 = 3. Answer: E3.
Examiner tip: One mark for each digit, in the right order.
Our answer: 1. 301 = 256 + 45 = 1x256 + 2x16 + 13. 2. Hexadecimal = 12D.
Examiner tip: Show the working for the method mark.
Our answer: Split into nibbles. 1. 1001 0011 = 9 and 3, so 93 (2 marks, one per digit). 2. 0000 1101 = 0 and D, so 0D (2 marks, one per digit).
Examiner tip: Nibble = 4 bits. 13 is D.
Question papers are © Cambridge University Press & Assessment. We list where each question appeared and give our own worked answers.
Chapter 1 · Lesson 4
Use of the hexadecimal system
Lecture points
Copy these into your notebook. These are the points examiners look for.
Definitions to learn word for word
Common mistakes that lose marks
- Saying the computer stores data in hex: hex is only a shorter way for people to write binary.
- Writing an IPv6 address with dots: IPv6 uses colons.
- Mixing up the two halves of a MAC address: the first half is the manufacturer, the second the device's serial number.
Quiz · 10 questions
Pick an answer and read the explanation.
1. Why do computer scientists use hexadecimal?
2. In the MAC address 00-1C-B3-4F-25-FE, what does 00-1C-B3 identify?
3. How many bits are in an IPv6 address?
4. Which HTML colour code is pure blue?
5. What do hexadecimal error codes usually refer to?
6. Which of these is a common use of hexadecimal?
7. #FF9966 is an HTML colour code. What is the denary value of its red part?
8. A MAC address is usually written in…
9. An HTML colour code uses how many hex digits for each of red, green and blue?
10. Why is hex used for error codes?
Topic worksheet
Use of the hexadecimal system
- Answer all questions in the spaces provided.
- Show your working in calculations and give units.
- The number of marks is shown in brackets [ ].
| Section | Marks | Out of |
|---|---|---|
| A | 6 | |
| B | 8 | |
| C | 4 | |
| Total | 18 |
Why do computer scientists use hexadecimal?[1]
In the MAC address 00-1C-B3-4F-25-FE, what does 00-1C-B3 identify?[1]
How many bits are in an IPv6 address?[1]
Which HTML colour code is pure blue?[1]
What do hexadecimal error codes usually refer to?[1]
Which of these is a common use of hexadecimal?[1]
Define MAC address.[2]
Define HTML.[2]
Give two places where hexadecimal is used in computer science.[2]
Explain why programmers use hexadecimal instead of binary.[2]
A colour on a web page has the RGB denary values red 201, green 122, blue 204.
(a) Convert each value into hexadecimal.[3]
(b) Write the HTML colour code for this colour.[1]
[Total: 18]
- (a) 201 = C9
- (a) 122 = 7A
- (a) 204 = CC
- (b) #C97ACC
This topic came up in 3 of the last 7 Cambridge exams
From 2023 to 2026: 3 questions worth 5 marks.
- Get the paper from your teacher or school.
- Try the question yourself first.
- Press Show our answer to check your working.
Our answer: D is the incorrect statement: hex does not take less storage, because the computer still stores the data in binary.
Examiner tip: Hex helps people; the computer still uses binary.
Our answer: 1. Shorter, so it takes less space on the ticket. 2. Easier for people to read, remember and copy with fewer mistakes.
Examiner tip: Two marks: give two different reasons.
Our answer: Any two: 1. It is shorter, so it is quicker to write. 2. It is easier to read and remember. 3. Fewer mistakes when copying. 4. It is easier to debug.
Examiner tip: Compare with long binary strings.
Question papers are © Cambridge University Press & Assessment. We list where each question appeared and give our own worked answers.
Chapter 1 · Lesson 5
Addition of binary numbers
Lecture points
Copy these into your notebook. These are the points examiners look for.
Definitions to learn word for word
Common mistakes that lose marks
- Forgetting the carry when 1 + 1 + 1 appears.
- Writing 2 in a binary answer.
- Seeing a 9th bit but not saying 'overflow' and why.
- Saying overflow means the number is negative: it means the number is too big for the register.
Quiz · 10 questions
Pick an answer and read the explanation.
1. What is 1 + 1 in binary?
2. What is 1 + 1 + 1 in binary?
3. 00001111 + 00000001 = ?
4. An overflow error happens when…
5. Which addition causes overflow in an 8-bit register?
6. What is the largest number that can be stored in 8 bits (unsigned)?
7. 00110011 + 00001111 = ?
8. 01000000 + 01000000 = ?
9. In binary addition, 1 + 1 + 1 gives…
10. Which addition causes overflow in 8 bits?
Topic worksheet
Addition of binary numbers
- Answer all questions in the spaces provided.
- Show your working in calculations and give units.
- The number of marks is shown in brackets [ ].
| Section | Marks | Out of |
|---|---|---|
| A | 6 | |
| B | 6 | |
| C | 4 | |
| D | 5 | |
| Total | 21 |
What is 1 + 1 in binary?[1]
What is 1 + 1 + 1 in binary?[1]
00001111 + 00000001 = ?[1]
An overflow error happens when…[1]
Which addition causes overflow in an 8-bit register?[1]
What is the largest number that can be stored in 8 bits (unsigned)?[1]
Define Overflow error.[2]
Add 01100110 and 00011011. Give the answer in 8-bit binary.[2]
State what is meant by an overflow error.[2]
Add 10011001 and 01110101. Give the true total in denary and say whether it fits in 8 bits.
answer = [2]
Add 00101101 and 00110110. Give the answer in denary.
answer = [2]
A car-park counter at a shopping mall stores the number of cars in an 8-bit register. In the morning the register holds 10110100. Then 01011010 more cars arrive.
(a) Add the two binary numbers. Show your working.[2]
(b) Explain what problem happens with this addition and why.[3]
[Total: 21]
- (a) column working with carries shown
- (a) result 1 00001110 (or 9 bits shown)
- (b) overflow (error) happens
- (b) the result (180 + 90 = 270) is greater than 255
- (b) it needs 9 bits / the 9th bit cannot be stored in an 8-bit register, so the stored value is wrong
This topic came up in 7 of the last 7 Cambridge exams
From 2023 to 2026: 10 questions worth 32 marks.
- Get the paper from your teacher or school.
- Try the question yourself first.
- Press Show our answer to check your working.
Our answer: 10011101 + 11110000. 1. Right nibble: 1101 + 0000 = 1101, no carry. 2. Left nibble: 1001 + 1111 = 1 1000, so write 1000 and carry 1 out. 3. Carries shown in the correct columns. 4. Answer: 1 1000 1101 (9 bits), the extra left 1 is the overflow.
Examiner tip: Show the carries; the ninth bit is an overflow.
Our answer: 11110101 + 00111001 = 302 in denary, which needs 9 bits: 1 0010 1110. The 8-bit register keeps 00101110, and the extra carry shows an overflow error. Marks: 1. Right nibble 1110. 2. Left nibble 0010. 3. Carries shown as working. 4. Overflow stated.
Examiner tip: Show carries and say overflow happened.
Our answer: 1. The answer is bigger than 255, the largest 8-bit value. 2. It needs more than 8 bits, so the register cannot store it.
Our answer: Add from the right, carrying 1s. 01100101 + 01110000 = 11010101 (101 + 112 = 213). Marks: 1. Method shown with carries. 2. Right nibble 0101. 3. Left nibble 1101.
Examiner tip: Show carries, because working earns a mark.
Our answer: 1. 11100011 + 11001100: add each column from the right, with carries. 2. The sum needs a ninth bit: 110101111. 3. Mark the overflow, because the answer does not fit in 8 bits. Marks: correct nibbles, carries shown, overflow noted. (227 + 204 = 431.)
Examiner tip: Show carries and say overflow.
Our answer: 1. Add column by column from the right, carrying when 1+1. 2. 00110000 + 01100110 = 10010110. 3. Check: 48 + 102 = 150. Working with carries shown earns the mark.
Examiner tip: Mark the carries above the columns.
Our answer: 00110011 + 01111000: low nibble 0011+1000 = 1011, high nibble 0011+0111 = 1010. Answer 10101011 (51 + 120 = 171). 1 mark each correct nibble (2 marks) and 1 mark for correct carries.
Examiner tip: Write the carries.
Our answer: Add right to left with carries: 11100011 + 01001100. Low nibble: 0011 + 1100 = 1111. High nibble: 1110 + 0100 = 1 0010 (carry out). 1. Correct low nibble 1111. 2. Correct high nibble 0010. 3. Carries shown in the working. 4. The overflow bit is shown: 1 0010 1111 (9 bits, so 8-bit register overflows).
Examiner tip: 227 + 76 = 303 as a check. The 9th bit is the overflow.
Our answer: 1. The answer of the addition needs more than 8 bits (more than the register can hold). 2. So the extra (9th) bit is lost/cannot be stored and the stored value is wrong.
Examiner tip: Say the value is too big for the register, not just 'the number is big'.
Our answer: Add column by column from the right, carrying 1 when needed. 00110011 + 01100001 = 10010100 (51 + 97 = 148). 1 mark for correct working with carries; 1 mark for each correct half of the answer (1001 and 0100).
Examiner tip: Write the carry digits above the columns.
Question papers are © Cambridge University Press & Assessment. We list where each question appeared and give our own worked answers.
Chapter 1 · Lesson 6
Logical binary shifts
Lecture points
Copy these into your notebook. These are the points examiners look for.
Definitions to learn word for word
Common mistakes that lose marks
- Filling the empty places with 1s, or wrapping the bits that fell off round to the other end: they are lost.
- Mixing up the direction: left shift makes the number bigger (× 2 each place).
- Forgetting that bits shifted out are lost.
- Answering with 9 bits after a left shift: the register stays 8 bits.
Quiz · 10 questions
Pick an answer and read the explanation.
1. 00000101 is shifted 1 place left. The result is…
2. A logical shift of 2 places to the left…
3. 01100000 is shifted 3 places right. The result is…
4. In a logical shift, the empty places are filled with…
5. Why is 10010000 shifted 1 place left not equal to double the original?
6. 00000111 shifted 2 places left gives…
7. 11110000 shifted 4 places right gives…
8. Each logical right shift…
9. A logical shift of 3 places left multiplies a number by…
10. 00010101 shifted 1 place right gives 00001010. Why is it not exactly half of 21?
Topic worksheet
Logical binary shifts
- Answer all questions in the spaces provided.
- Show your working in calculations and give units.
- The number of marks is shown in brackets [ ].
| Section | Marks | Out of |
|---|---|---|
| A | 6 | |
| B | 5 | |
| C | 4 | |
| D | 5 | |
| Total | 20 |
00000101 is shifted 1 place left. The result is…[1]
A logical shift of 2 places to the left…[1]
01100000 is shifted 3 places right. The result is…[1]
In a logical shift, the empty places are filled with…[1]
Why is 10010000 shifted 1 place left not equal to double the original?[1]
00000111 shifted 2 places left gives…[1]
Define Logical shift.[2]
Perform a logical shift of 3 places to the right on 11001000. Give the result.[1]
Describe what happens to the bits in a logical left shift of 2 places.[2]
00011001 is shifted 2 places left. Give the new value in denary.
answer = [2]
10100000 is shifted 5 places right. Give the new value in denary.
answer = [2]
A microwave oven stores the cooking time in seconds in an 8-bit register. The register holds 00101100.
(a) Give the denary value of the register.[1]
(b) Perform a logical shift of 2 places to the left on the register. Give the new 8-bit value.[1]
(c) State the effect of this shift on the denary value.[1]
(d) The register now holds 11010000. Explain what happens if it is shifted 1 place to the left.[2]
[Total: 20]
- (a) 44
- (b) 10110000
- (c) the value is multiplied by 4 (44 → 176)
- (d) the leftmost 1 (MSB) is shifted out / lost
- (d) the result is not double the original (208 → 160): the answer is wrong because it needs more than 8 bits
This topic came up in 5 of the last 7 Cambridge exams
From 2023 to 2026: 8 questions worth 11 marks.
- Get the paper from your teacher or school.
- Try the question yourself first.
- Press Show our answer to check your working.
Our answer: 1. Move every bit 3 places right and fill with 0s on the left: 11110101 becomes 00011110. 2. Add the place values: 16 + 8 + 4 + 2. 3. Answer: 30.
Our answer: 1. The number is multiplied by 2 for each place shifted.
Our answer: 1. Every bit moves one place (or n places) to the left. 2. The bits that fall off the left are lost, and 0s fill the empty places on the right.
Our answer: D. Two shifts left multiply by 2 twice, so the value is multiplied by 4.
Our answer: Move every bit three places left, drop the three leftmost bits, add three 0s on the right: 00011000.
Our answer: Move all bits two places left, fill with zeros on the right: 10001100.
Our answer: The number is divided by 8 (each right shift divides by 2), ignoring the part after the point.
Our answer: 01111010 shifted right 3 places, zeros come in at the left: 00001111.
Question papers are © Cambridge University Press & Assessment. We list where each question appeared and give our own worked answers.
Chapter 1 · Lesson 7
Two's complement
Lecture points
Copy these into your notebook. These are the points examiners look for.
Definitions to learn word for word
Common mistakes that lose marks
- Flipping the bits but forgetting to add 1.
- Adding 1 before flipping.
- Using +128 for the MSB when converting a two's complement number.
- Flipping the bits of a positive number: positives stay as ordinary binary.
Quiz · 10 questions
Pick an answer and read the explanation.
1. In 8-bit two's complement, what is the place value of the MSB?
2. What is 11111111 in two's complement?
3. What is 10000000 in two's complement?
4. Which is −6 in 8-bit two's complement?
5. What is the range of 8-bit two's complement?
6. How do you know a two's complement number is negative?
7. What is 11110000 in two's complement?
8. What is 01111111 in two's complement?
9. Which is −1 in 8-bit two's complement?
10. Which is −100 in 8-bit two's complement?
Topic worksheet
Two's complement
- Answer all questions in the spaces provided.
- Show your working in calculations and give units.
- The number of marks is shown in brackets [ ].
| Section | Marks | Out of |
|---|---|---|
| A | 6 | |
| B | 8 | |
| C | 4 | |
| D | 5 | |
| Total | 23 |
In 8-bit two's complement, what is the place value of the MSB?[1]
What is 11111111 in two's complement?[1]
What is 10000000 in two's complement?[1]
Which is −6 in 8-bit two's complement?[1]
What is the range of 8-bit two's complement?[1]
How do you know a two's complement number is negative?[1]
Define Two's complement.[2]
Define Most significant bit (MSB).[2]
Convert −58 into 8-bit two's complement. Show your working.[3]
State how you can tell that an 8-bit two's complement number is negative.[1]
The 8-bit two's complement number 11001010: give its denary value.
answer = [2]
The 8-bit two's complement number 10101111: give its denary value.
answer = [2]
A weather station stores temperatures in 8-bit two's complement.
(a) Convert the temperature −23 into 8-bit two's complement. Show your working.[3]
(b) The station stores 11110110 for another day. Convert it into denary.[2]
[Total: 23]
- (a) +23 written as 00010111
- (a) bits flipped: 11101000
- (a) 1 added: 11101001
- (b) working: −128 + 64 + 32 + 16 + 4 + 2
- (b) −10
This topic came up in 7 of the last 7 Cambridge exams
From 2023 to 2026: 12 questions worth 20 marks.
- Get the paper from your teacher or school.
- Try the question yourself first.
- Press Show our answer to check your working.
Our answer: 14 = 00001110. Flip the bits: 11110001. Add 1: 11110010.
Examiner tip: Check: the left bit is 1 for a negative number.
Our answer: 32 = 00100000 (positive numbers look the same as normal binary, with leading 0).
Examiner tip: Keep all 8 bits.
Our answer: A: base 2. Two's complement is a way of writing numbers in binary.
Examiner tip: Binary means base 2.
Our answer: 1. 5 = 00000101. Flip: 11111010. Add 1: 11111011. 2. Answer: 11111011.
Examiner tip: Show the flip-and-add working.
Our answer: 1. 22 = 00010110. Flip the bits: 11101001. Add 1: 11101010. 2. Answer: 11101010.
Examiner tip: Check: the left bit is 1 for a negative number.
Our answer: 1. Place values: -128 + 8 + 4 + 2 (or flip and add 1 to get 114). 2. -114.
Our answer: 1. Two's complement.
Our answer: 1. +32 is 00100000. 2. Flip all bits: 11011111, add 1: 11100000. (Check: -128+64+32 = -32.)
Our answer: 1. Place values: -128 +32 +2 +1 (the 1 in the sign position counts as -128). 2. -128 + 35 = -93.
Examiner tip: Show the working; the answer alone may not get both marks.
Our answer: 1. 123 = 64+32+16+8+2+1. 2. 01111011. A positive number keeps its normal binary with a 0 in the sign bit.
Examiner tip: Do not flip bits for a positive number.
Our answer: 1. 99 = 01100011. Flip the bits: 10011100. Add 1. 2. Register: 10011101.
Examiner tip: Show the flip and add 1.
Our answer: 1. 78 = 01001110. Flip every bit: 10110001. 2. Add 1: 10110010. Register: 10110010.
Examiner tip: Show the flip and the +1 as working.
Question papers are © Cambridge University Press & Assessment. We list where each question appeared and give our own worked answers.
Chapter 1 · Lesson 8
Revision and exam technique
Lecture points
Copy these into your notebook. These are the points examiners look for.
Common mistakes that lose marks
- Fewer than 8 bits.
- Remainders read top down.
- 2C = 212.
- A 9th bit with no word 'overflow'.
- Shifted bits wrapped round.
- Flipping without adding 1.
Quiz · 10 questions
Pick an answer and read the explanation.
1. 10010110 is stored in a register. What is it in denary?
2. What is 10010110 in hexadecimal?
3. 10010110 is shifted 2 places right. The result is…
4. As an 8-bit two's complement number, 10010110 is…
5. A question says 'Explain why an overflow error occurred [2]'. The best answer is…
6. What is hex D2 in 8-bit binary?
7. What is 01100100 in hex?
8. Which result causes overflow in an 8-bit register?
9. 00001100 shifted 2 places left, read as denary, is…
10. 11011000 as 8-bit two's complement is…
Topic worksheet
Revision and exam technique
- Answer all questions in the spaces provided.
- Show your working in calculations and give units.
- The number of marks is shown in brackets [ ].
| Section | Marks | Out of |
|---|---|---|
| A | 6 | |
| B | 6 | |
| Total | 12 |
10010110 is stored in a register. What is it in denary?[1]
What is 10010110 in hexadecimal?[1]
10010110 is shifted 2 places right. The result is…[1]
As an 8-bit two's complement number, 10010110 is…[1]
A question says 'Explain why an overflow error occurred [2]'. The best answer is…[1]
What is hex D2 in 8-bit binary?[1]
A games console stores a player's score in an 8-bit register. The register holds 01110010.
(a) Convert the value into denary.[1]
(b) Convert the value into hexadecimal.[1]
(c) The player scores 10011000 more points. Add the two numbers and explain the result.[3]
(d) Shift the original value 1 place to the right. State the new value in denary.[1]
[Total: 12]
- (a) 114
- (b) 72
- (c) working: 100001010
- (c) overflow (error)
- (c) 114 + 152 = 266 > 255 / needs 9 bits
- (d) 57
🔒 Unlock this lesson
Chapter 1 is free. Subscribe to continue with every chapter of Computer Science, with quizzes, worksheets, past papers and the AI teacher.
Plans from Rs 7,500 a month. Chapter 1 stays free.
Study Computer Science with any of our plans
Computer pack
Engineering and computing
Rs 10,000 25% off
Rs 7,500/ month
- Computer Science
- Chemistry
- Physics
- Maths
All subjects
Every subject we teach, including new ones as they open
Rs 15,000 35% off
Rs 9,750/ month
Need a different mix? Build your own 4 subjects for Rs 7,500 →
Every plan includes
- Every lesson in your subjects
- Quizzes, flash cards and worksheets
- Past-paper questions by topic
- Test maker and timed mocks
- Study planner up to your exam date
- AI teacher and answer marking
- Weekly reports for parents
Pay monthly by Easypaisa, JazzCash, NayaPay or bank transfer · Less than the cost of one tuition subject
How to pay
Send the fee to one of these accounts, then sign up and enter the transaction ID. Your lessons open once we confirm the payment.
About this course
Which syllabus does the O Level Computer Science (2210) course follow?
Do you have O Level Computer Science (2210) past papers?
Are there O Level Computer Science (2210) notes?
Is any of it free?
Are past-paper questions included?
How much does it cost?
Start O Level Computer Science (2210) today
Create your account, choose your subjects and begin with the first lesson.