← IGCSE Computer Science Paper 1

Range of 8-bit two's complement

The range of an 8-bit two's complement integer: 10000000 is -128, 11111111 is -1 and 01111111 is 127. Unsigned 8-bit binary gives 0 to 255 instead.

Understanding Range of 8-bit two's complement in IGCSE Computer Science Paper 1

What it does: One bit is used as the sign bit worth -128, leaving 7 bits for 0 to 127, which gives the range -128 to 127. With no negative numbers every bit adds a positive value, so 11111111 is 255. Two's complement gives -128 to 127 instead. The sign bit is worth -128, so the smallest value is -128. The largest is 127 because 128 would need an extra bit. The sign bit must be 0 for a positive number. 01111111 is 64+32+16+8+4+2+1 = 127. Only the sign bit is set, so the value is -128 and nothing is added to it. 11111111 is -1.

Common mistakes: The smallest 8-bit two's complement value is -128 (10000000), not -127. The line should be min ← -128. 01111111 is the largest positive value, which is 127. 128 cannot be stored as a positive 8-bit two's complement number. It should be 01111111 = 127.

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 range of an 8-bit two's complement integer?
-128 to 127-127 to 128
Matches
Range of 8-bit two's complement: -127 to 128
↓
The ends are the wrong way round. The range is -128 to 127, because the sign bit is worth -128 and the largest positive is 01111111 = 127.
Applying
Meanings
Term
-128 to 127
Meaning
The range of an 8-bit two's complement integer: 10000000 is -128, 11111111 is -1 and 01111111 is 127. Unsigned 8-bit binary gives 0 to 255 instead.
Practice
10000000 = -128 (smallest)
Testing
Gaps
01111111 in two's complement =
Check Answer
Spots
1bits ← 8
2min ← -127

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

The 'Elephant' badge — OOP Heavyweight, 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 range of an 8-bit two's complement integer?
A. -127 to 128
B. -128 to 127 ✓
The sign bit is worth -128, so the smallest value is -128. The largest is 127 because 128 would need an extra bit.
2. Which 8-bit pattern is the largest positive two's complement number?
A. 01111111 = 127 ✓
B. 11111111 = 127
The sign bit must be 0 for a positive number. 01111111 is 64+32+16+8+4+2+1 = 127.
3. Which 8-bit pattern is the smallest two's complement number?
A. 10000000 = -128 ✓
B. 11111111 = -128
Only the sign bit is set, so the value is -128 and nothing is added to it. 11111111 is -1.
4. What does 11111111 represent in 8-bit two's complement?
A. -1 ✓
B. -127
-128 + 127 = -1. All eight bits set gives -1, the negative number closest to zero.
5. What range does unsigned 8-bit binary give, compared with two's complement?
A. -128 to 127
B. 0 to 255 ✓
Unsigned 8-bit binary has no negatives, so the same 256 patterns cover 0 to 255. Two's complement uses them for -128 to 127.

Match the Pairs

01111111 → The largest positive 8-bit two's complement number, which is 127
10000000 → The smallest 8-bit two's complement number, which is -128
An 8-bit two's complement integer can store every whole number from -128 up to 127 → -128 to 127
Unsigned 8-bit binary, with no sign bit, stores a different range from two's complement → 0 to 255
Range of 8-bit two's complement: -127 to 128 → The ends are the wrong way round. The range is -128 to 127, because the sign bit is worth -128 and the largest positive is 01111111 = 127.
11111111 = 255 in 8-bit two's complement → 255 is the unsigned value. In two's complement the sign bit is worth -128, so 11111111 = -128 + 127 = -1.

Key Term

-128 to 127
The range of an 8-bit two's complement integer: 10000000 is -128, 11111111 is -1 and 01111111 is 127. Unsigned 8-bit binary gives 0 to 255 instead.

Fill in the Blanks

1. 01111111 in two's complement = 127
Hint: Type the denary value of the largest positive 8-bit two's complement number.
2. 10000000 in two's complement = -128
Hint: Type the denary value of the smallest number. Only the sign bit is set.
3. 11111111 in two's complement = -1
Hint: Type the denary value when all 8 bits are 1 in two's complement.
4. Unsigned 8-bit range: 0 to 255
Hint: Type the largest denary value when there is no sign bit.
5. Largest positive: 01111111 = 127
Hint: Type the 8-bit binary pattern with a 0 sign bit followed by seven 1s.

Spot the Error

Question 1
A bits ← 8
B min ← -127
C max ← 127
D OUTPUT min, max
Line B — The smallest 8-bit two's complement value is -128 (10000000), not -127. The line should be min ← -128.
Question 2
A // 8-bit two's complement
B 01111111 = 128
C 10000000 = -128
D 11111111 = -1
Line B — 01111111 is the largest positive value, which is 127. 128 cannot be stored as a positive 8-bit two's complement number. It should be 01111111 = 127.
Question 3
A // 8-bit two's complement
B 01111111 = 127
C 11111111 = -1
D 10000000 = 128
Line D — The sign bit is worth -128, so 10000000 is -128, not +128. It should be 10000000 = -128.
Question 4
A unsigned ← 0 TO 255
B signed ← -128 TO 127
C values ← 2 ^ 7
D OUTPUT values
Line C — 8 bits give 2 ^ 8 = 256 different patterns, for both unsigned and two's complement. 2 ^ 7 is only 128. It should be values ← 2 ^ 8.
Question 5
A bits ← 8
B count ← 2 * bits
C low ← -(count DIV 2)
D high ← count DIV 2 - 1
Line B — The number of patterns is 2 to the power of bits, not 2 multiplied by bits. 2 * 8 is only 16. It should be count ← 2 ^ bits, which gives 256.

Student with a class code? Join your class →