Level:
Correct: 0
Incorrect: 0
Marks: 0/0
Exam Practice
Subject:
Topics:
Cambridge IGCSE Computer Science (Paper 1) Smart practice A mixed round aimed at your weak spots
Unit 1
Data representation
Unit 2
Data transmission
Unit 3
Hardware
Unit 4
Software
Unit 5
The internet and its uses
Unit 6
Automated and emerging technologies
Automated systems
Automated systems
0%
Artificial intelligence
Artificial intelligence
0%
Avg
score:
–
Topics
done:
0/39

Two's complement

Practise 26 exam-style questions on Two's complement for Cambridge IGCSE Computer Science (Paper 1). Write your answer as you would in the exam and get it marked in seconds against the mark scheme, point by point, with an AI tutor on hand if you get stuck.

  • 26 questions
  • 1–6 marks each
  • Instant marking
  • No sign-up needed
20 questions, marked as you go

Sample questions with model answers

Here are 4 of the questions in this topic, each with a model answer, an explanation of why it earns the marks and the mark scheme an examiner would use.

Question 1

1 mark

The diagram shows an 8-bit register with two's complement place values.

Give the 8-bit two's complement integer that represents denary −100.

An 8-bit register drawn as a row of 8 boxes, with the two's complement place values −128, 64, 32, 16, 8, 4, 2, 1 above the columns. Row 1 (labelled "Denary −100"): all 8 boxes blank.

Model answer

−100 = −128 + 16 + 8 + 4
= 10011100

Explanation

Start with −128 (a 1 in the left-most box) and then add positive place values to get back up to −100: you need +28, which is 16 + 8 + 4. The other method is +100 = 01100100, invert to 10011011 and add 1.

Mark scheme
  1. 1 mark

    10011100

    accept with or without spaces

Question 2

2 marks

A student wants to store the denary number +200 as an 8-bit two's complement integer.

Explain why this is not possible.

Model answer

The largest positive number that 8-bit two's complement can hold is 01111111 = +127. 200 is larger than this: its binary pattern 11001000 has a 1 in the most significant bit, so in two's complement it would mean −128 + 72 = −56 instead of +200.

Explanation

In two's complement the left-most bit is used for the −128 place value, so only 7 bits are left for positive values (0 to 127). Ordinary 8-bit binary reaches 255, but two's complement swaps the top half of that range for negative numbers.

Mark scheme
  1. 1 mark

    The largest positive value in 8-bit two's complement is +127

    max 2

  2. 1 mark

    200 would need a 1 in the most significant bit, which would make the number negative / it would be read as −56

  3. 1 mark

    More bits would be needed (e.g. 16-bit two's complement)

Question 3

3 marks

A register shows its contents in hexadecimal as E4. The contents are an 8-bit two's complement integer.

Convert E4 into binary, and then into denary. Show your working.

Model answer

E = 1110 and 4 = 0100, so E4 = 11100100
The left-most bit is 1, so the number is negative.
−128 + 64 + 32 + 4 = −128 + 100 = −28

Explanation

Hexadecimal converts to binary nibble by nibble. Then treat the bits as two's complement: the left-most bit is −128. Giving 228 means the bits were read as an ordinary unsigned number.

Mark scheme
  1. 1 mark

    Binary: 11100100

    accept with or without spaces

  2. 1 mark

    −128 + 64 + 32 + 4

    accept invert and add 1: 00011100 = 28

  3. 1 mark

    −28

    do not accept 228; allow follow-through from an incorrect binary value

Question 4

4 marks

State whether each statement about 8-bit two's complement is true or false.

Statement 1: The most significant bit has a place value of −128.
Statement 2: The largest positive value that can be represented is 255.
Statement 3: Every negative number has 1 as its most significant bit.
Statement 4: 11111111 represents −127.

Model answer

Statement 1: true
Statement 2: false (the largest is +127)
Statement 3: true
Statement 4: false (11111111 is −1)

Explanation

With the left-most bit worth −128, positive numbers only use the other seven bits, so they stop at 127. 11111111 is −128 + 127 = −1; the pattern for −127 is 10000001.

Mark scheme
  1. 1 mark

    Statement 1: true

  2. 1 mark

    Statement 2: false

    it is 127

  3. 1 mark

    Statement 3: true

  4. 1 mark

    Statement 4: false

    it represents −1

Ready to try the rest? Every answer you write is marked against the mark scheme, so you can see exactly where the marks are.

AI Tutor Hints first, answers after you try

Hi! Stuck? Ask me for a hint and I’ll help you work it out. Once you’ve checked your answer I can explain exactly where the marks are.