Two’s Complement Explained – Representing Negative Binary Numbers (O Level Computer Science 2210 / IGCSE 0478)
Why Do Computers Need Two’s Complement?
Computers store numbers in binary, but they also need to represent negative numbers.
Example:
−5
−10
−127
To store negative numbers, computers use a system called two’s complement.
Two’s complement allows computers to perform binary subtraction and addition efficiently.
What Is Two’s Complement?
Two’s complement is a method used to represent negative binary numbers.
It is commonly used with 8-bit numbers.
In an 8-bit system, the range of numbers is:
TypeRangePositive numbers0 to 127Negative numbers−1 to −128
The most significant bit (MSB) shows whether the number is positive or negative.
MSBMeaning0Positive1Negative
Steps to Find Two’s Complement
To convert a positive binary number into its negative form, follow these steps.
Step 1: Write the binary number (8-bit)
Example: 5
00000101Step 2: Invert all bits (find the one's complement)
11111010Step 3: Add 1
11111011So:
−5 = 11111011
Example 2
Find −12 in two’s complement.
Step 1: Convert 12 to binary
00001100Step 2: Invert the bits
11110011Step 3: Add 1
11110100Therefore:
−12 = 11110100
Converting Back to Denary
To convert a negative binary number back to denary:
1️⃣ Invert the bits
2️⃣ Add 1
3️⃣ Convert to denary
4️⃣ Add the negative sign
Example:
11111011Invert:
00000100Add 1:
00000101Result:
−5
Why Two’s Complement Is Important
Two’s complement helps computers to:
Represent negative numbers
Perform binary subtraction easily
Use the same circuits for addition and subtraction
This makes computer hardware simpler and more efficient.
Exam Tip (2210 / 0478)
Students are often asked to:
Convert positive numbers to two’s complement
Convert two’s complement numbers to denary
Identify negative binary numbers
Always remember:
Invert bits → Add 1
Practice Question
Find the two’s complement of 9.
Step 1:
00001001Step 2:
11110110Step 3:
11110111Answer:
−9 = 11110111
Learn Computer Science with IVY Online
Prepare for:
Cambridge O Level Computer Science (2210)
Cambridge IGCSE Computer Science (0478)
with IVY Online.
Our courses include:
Programming practice
Past paper solving
Exam techniques
Concept-based learning

