🔢 Paper 1 · Topic 2: Data Representation
2.1c Two's Complement
Edexcel 1CP2 · GCSE Computer Science · ~13 min read · 🔒 Pro
Notes
──
Video
──
Slides
──
Worksheet
──
Quiz

Why Two's Complement?

Computers need to represent both positive and negative numbers. Two's complement is the standard method used by computers to store signed (positive and negative) integers in binary. It allows subtraction to be performed using the same addition circuits, making hardware design simpler.

Representing Negative Numbers in 8-bit Two's Complement

In 8-bit two's complement:

  • The most significant bit (MSB) — the leftmost bit — is the sign bit
  • If the sign bit is 0, the number is positive
  • If the sign bit is 1, the number is negative
  • Range: −128 to +127
Sign bit6432168421Value
01111111+127
10000000−128
11111111−1

Converting a Positive Number to Its Negative (Two's Complement Method)

To find the two's complement (negate a number):

  1. Write the positive number in binary
  2. Invert all bits (flip 0s and 1s) — this is called "one's complement"
  3. Add 1 to the result

Example: Represent −19 in 8-bit two's complement

  1. +19 = 00010011
  2. Invert bits: 11101100
  3. Add 1: 11101100 + 00000001 = 11101101

So −19 = 11101101 in 8-bit two's complement

Verify: −128 + 64 + 32 + 8 + 4 + 1 = −128 + 109 = −19 ✓

Reading a Negative Two's Complement Number

To find the denary value of a negative binary number:

  • If the MSB is 1, the number is negative
  • The sign bit has value −128 (for 8-bit)
  • Add the values of all remaining 1-bits to −128

Example: What is 11110001 in denary?

MSB=1 (negative). Values: −128 + 64 + 32 + 16 + 1 = −128 + 113 = −15

Exam tip: For Edexcel 1CP2, the two main skills are: (1) converting a positive number to its negative using invert+add 1, and (2) reading a two's complement negative number (MSB = −128, add remaining 1-bits). Always check your answer by verifying the MSB is 1 for negative numbers.
⚠️ Common Mistakes
  • Forgetting to add 1 after inverting — one's complement alone is not two's complement
  • Using −128 incorrectly: only the MSB = −128; other bits are their normal positive values (64, 32, 16...)
  • Confusing the range: 8-bit two's complement is −128 to +127 (not −127 to +127)
  • Not checking the sign bit first — always check MSB to determine if the number is positive or negative
Video coming soon
Click slide or press arrow keys to navigate
✍️

Worksheet — 2.1c Two's Complement

8 Edexcel-style questions · AI-marked

Q1State the purpose of two's complement in computing.[2]
✅ Mark scheme
Two's complement is used to represent negative (signed) integers in binary [1]; it allows subtraction to use the same hardware as addition [1].
Q2Describe the two steps used to convert a positive binary number to its two's complement negative.[2]
✅ Mark scheme
Invert all bits (flip 0s to 1s and 1s to 0s) [1]; then add 1 to the result [1].
Q3Convert −25 to 8-bit two's complement. Show your working.[4]
✅ Mark scheme
+25 = 00011001 [1] / Invert: 11100110 [1] / Add 1: 11100111 [1] / Final: 11100111 [1]
Q4What is the denary value of the 8-bit two's complement number 11110000? Show your working.[3]
✅ Mark scheme
MSB=1 so negative [1] / −128+64+32+16=−128+112=−16 [1] / Answer: −16 [1]
Q5State the range of values that can be represented by 8-bit two's complement.[2]
✅ Mark scheme
−128 to +127 [2]
Q6How do you know from looking at an 8-bit two's complement number that it is negative?[1]
✅ Mark scheme
The most significant bit (MSB / leftmost bit) is 1 [1].
Q7What is the 8-bit two's complement representation of −1?[2]
✅ Mark scheme
+1=00000001 → invert=11111110 → add 1=11111111 [1] / 11111111 [1]
Q8Explain why two's complement is more useful than simply using the MSB as a sign bit (sign-and-magnitude).[2]
✅ Mark scheme
Two's complement allows subtraction using addition circuits, simplifying hardware design [1]; sign-and-magnitude requires separate circuits for addition and subtraction, and has two representations of zero [1].
Topic Quiz
Q 1 of 15
You scored
out of 15
⚡ XP
Click to reveal definition
🎉
Session complete!
TermDefinition
🎯

Mini Test — Two's Complement

Timed exam-style test.

← 2.1b HexadecimalTopic 2Next: 2.1d Binary Arithmetic →
🔒

Unlock Pro

Subscribe to access all 59 Edexcel 1CP2 lessons.

£7.99/month
or £59/year
Subscribe →