← IGCSE Computer Science Paper 1

Converting a negative denary number to two's complement

Write the positive value in 8-bit binary, flip every bit, then add 1. Example: 5 is 00000101, flip to 11111010, add 1 to get 11111011 (-5).

Understanding Converting a negative denary number to two's complement in IGCSE Computer Science Paper 1

What it does: 11111011 has 1s in the 128, 64, 32, 16, 8, 2 and 1 places. The 128 place counts as -128, so the total is -5. Flipping 00001010 gives 11110101. Adding 1 gives 11110110, which is -10 in 8-bit two's complement. Always start with the positive number in 8-bit binary. There is no minus sign in binary, so the flip and add 1 steps create the negative. Flip first (0 becomes 1, 1 becomes 0), then add 1. Adding 1 first gives the wrong order and the wrong answer. 3 is 00000011. Flip to get 11111100, then add 1 to get 11111101. 11111100 is the inverted value only, which is -4.

Common mistakes: Flipping 00000101 changes every bit (0 to 1, 1 to 0), giving 11111010. The broken line left the second-to-last bit as 1 when it should have flipped to 0, so only some bits were flipped. The first step is to write the positive value in 8-bit binary. 3 is 00000011 (2 + 1). 00000110 is 6, so every step after it would be wrong.

Class: _____________________  ·  Name: _____________________  ·  Date: _________

Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.

This module's key terms are also in a printable crossword (Modules 28–41) and word search (Modules 28–58).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
What is the FIRST step to write -6 in 8-bit two's complement?
Write 6 in binary and put a minus sign in front of itWrite the positive value 6 in 8-bit binary: 00000110
Matches
-3: 00000011 flipped = 11111100, so -3 = 11111100
↓
The student flipped the bits but forgot to add 1. The correct answer is 11111100 + 1 = 11111101.
Applying
Meanings
Term
flip the bits then add 1
Meaning
Write the positive value in 8-bit binary, flip every bit, then add 1. Example: 5 is 00000101, flip to 11111010, add 1 to get 11111011 (-5).
Practice
5 = 00000101
Testing
Gaps
Step 1: 5 in 8 bits is
Check Answer
Spots
2Positive 5 = 00000101
3Flip bits: 11111110

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Gila Monster' badge — Patient Coder, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. What is the FIRST step to write -6 in 8-bit two's complement?
A. Write the positive value 6 in 8-bit binary: 00000110 ✓
B. Write 6 in binary and put a minus sign in front of it
Always start with the positive number in 8-bit binary. There is no minus sign in binary, so the flip and add 1 steps create the negative.
2. You have written 5 as 00000101. What do you do next to make -5?
A. Add 1 to get 00000110
B. Flip every bit to get 11111010 ✓
Flip first (0 becomes 1, 1 becomes 0), then add 1. Adding 1 first gives the wrong order and the wrong answer.
3. Which is -5 in 8-bit two's complement?
A. 11111011 ✓
B. 11111010
5 is 00000101. Flipping gives 11111010, and adding 1 gives 11111011. 11111010 is what you get if you forget to add 1.
4. What is the last step when converting a negative number to two's complement?
A. Add 1 to the flipped bits ✓
B. Subtract 1 from the flipped bits
The method is: write the positive number, flip all bits, then add 1.
5. Which is -3 in 8-bit two's complement?
A. 11111100
B. 11111101 ✓
3 is 00000011. Flip to get 11111100, then add 1 to get 11111101. 11111100 is the inverted value only, which is -4.

Match the Pairs

00000101 -> 11111010 → Flip every bit of 5 in 8-bit binary (0 becomes 1, 1 becomes 0)
11111010 + 1 = 11111011 → Add 1 to the flipped bits to finish the two's complement of -5
Check a two's complement answer by starting with -128 and adding the place values of the 1 bits → -128 + 64 + 32 + 16 + 8 + 2 + 1 = -5
To write -10: 10 is 00001010, flip to 11110101, then add 1 → 11110110
-3: 00000011 flipped = 11111100, so -3 = 11111100 → The student flipped the bits but forgot to add 1. The correct answer is 11111100 + 1 = 11111101.
-5 = 10000101 (set the left bit to 1) → Only the sign bit was changed. The correct method is to flip every bit of 00000101 to get 11111010, then add 1 to get 11111011.

Key Term

flip the bits then add 1
Write the positive value in 8-bit binary, flip every bit, then add 1. Example: 5 is 00000101, flip to 11111010, add 1 to get 11111011 (-5).

Fill in the Blanks

1. Step 1: 5 in 8 bits is 00000101
Hint: Type the positive number 5 written as 8-bit binary
2. Step 2: flip 00000101 to get 11111010
Hint: Type the 8-bit result after inverting every bit (0 to 1, 1 to 0)
3. Step 3: 11111010 + 1 = 11111011
Hint: Type the number you add after flipping the bits
4. 3 = 00000011, flip: 11111100 add 1: 11111100 + 1 = 11111101
Hint: Type the 8-bit two's complement of -3 after adding 1 to the flipped bits
5. 11111011 = -128 + 64 + 32 + 16 + 8 + 2 + 1
Hint: Type the negative place value of the leftmost sign bit

Spot the Error

Question 1
A Number: -5
B Positive 5 = 00000101
C Flip bits: 11111110
D Add 1: 11111011
Line C — Flipping 00000101 changes every bit (0 to 1, 1 to 0), giving 11111010. The broken line left the second-to-last bit as 1 when it should have flipped to 0, so only some bits were flipped.
Question 2
A Convert -3
B 3 in binary: 00000110
C Flip: 11111100
D Add 1: 11111101
Line B — The first step is to write the positive value in 8-bit binary. 3 is 00000011 (2 + 1). 00000110 is 6, so every step after it would be wrong.
Question 3
A Step 1: write -6 as 10000110
B Step 2: flip to 11111001
C Step 3: add 1 = 11111010
Line A — Step 1 is to write the positive value, 6, in ordinary 8-bit binary: 00000110. Putting a sign bit on the front (10000110) is not how two's complement works.
Question 4
A Convert -4
B Flip 00000100 -> 11111010
C Add 1: 11111100
Line B — Flipping 00000100 gives 11111011. The broken line flipped the last bit incorrectly, leaving it as 0 instead of changing it from 0 to 1.
Question 5
A Rule: add 1, then flip bits
B -7: 7 is 00000111
C Flip: 11111000
D Add 1: 11111001
Line A — The order matters. The rule is to flip every bit first and then add 1. Adding 1 first and then flipping gives a different, wrong answer.

Student with a class code? Join your class →