Chhetri AcademyGCSE & A level Paper Builder

2.1.2, 2.1.3Two's complement

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

Practise Two's complement. 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 Two's complement (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.

State the place value of the most significant bit in an 8-bit two's complement integer.
−128
A computer game stores the change in a player's score after each round as a two's complement integer. At the moment, 8 bits are used. State the most negative change in score that can be stored.
−128
State the denary value represented by 1000 0000 in 8-bit two's complement.
−128

Sample questions

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

Question 1Easy3 marks
(a) State the place value of the most significant bit in an 8-bit two's complement integer.[1]
(b) Identify the range of integers that can be represented using 8-bit two's complement.[1]
  • 0 to 255
  • −127 to +127
  • −128 to +127
  • −255 to +255
(c) State how you can tell from its binary pattern whether an 8-bit two's complement integer is negative.[1]
Show the answer and mark scheme
(a) Answer: −128
  • −128
(b) Answer: −128 to +127
(c) Answer: Its most significant (leftmost) bit is 1.
  • the most significant (leftmost) bit is 1
Question 2Medium4 marks
The controller in a freezer stores temperatures, in °C, as 8-bit two's complement integers.
(a) The temperature inside the freezer is −18 °C.
Convert −18 to 8-bit two's complement.[1]
(b) The controller stores the value 1111 0101. Convert this value to denary.[1]
(c) Explain why the controller uses two's complement rather than unsigned binary to store the temperatures.[2]
Show the answer and mark scheme
(a) Answer: 1110 1110
  • 1110 1110

Worked solution: +18 = 0001 0010; invert: 1110 1101; add 1: 1110 1110

(b) Answer: −11
  • −11

Worked solution: −128 + 64 + 32 + 16 + 4 + 1 = −11

(c) Answer: Freezer temperatures are below 0 °C. Unsigned binary cannot store negative numbers; two's complement can.
  • temperatures in a freezer can be negative / below 0 °C
  • unsigned binary can only represent zero and positive numbers, but two's complement can represent both negative and positive numbers
Question 3Hard3 marks
A student was asked to convert −70 into 8-bit two's complement. The student wrote 1100 0110.
(a) Convert the student's answer to denary to check whether it is correct.[1]
(b) Identify the mistake that the student made.[1]
(c) Give the correct 8-bit two's complement representation of −70.[1]
Show the answer and mark scheme
(a) Answer: −128 + 64 + 4 + 2 = −58, so the answer is incorrect
  • 1100 0110 = −128 + 64 + 4 + 2 = −58 (so it is not −70)
(b) Answer: The student wrote 70 as 0100 0110 and just set the sign bit to 1, instead of inverting all the bits and adding 1.
  • the student wrote +70 in binary (0100 0110) and only changed the most significant bit to 1 / did not invert the other bits and add 1
(c) Answer: 1011 1010
  • 1011 1010

Worked solution: +70 = 0100 0110; invert: 1011 1001; add 1: 1011 1010

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