Two's complement signed integers
Unsigned binary can only store positive numbers. Two's complement lets 8 bits store negative numbers too.
Unsigned and signed
In two's complement, the most significant (left) bit is worth -128 instead of +128.
So 8 bits store -128 to +127. If the left bit is 1, the number is negative.
| -128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
|---|---|---|---|---|---|---|---|
| 1 | 1 | 1 | 1 | 1 | 0 | 1 | 1 |
Making a negative number
1. Write +5 in binary: 00000101
2. Flip every bit: 11111010
3. Add 1: 11111011
Reading a negative number
10000001 = -128 + 1 = -127
Positive numbers look the same as unsigned: 01000001 = 65.
Convert -20 to 8-bit two's complement.
- +20 = 00010100
- Flip: 11101011
- Add 1: 11101100
Answer: 11101100
In 8-bit two's complement the left bit is worth -128, giving a range of -128 to +127. To make a negative: write the positive, flip the bits, add 1.
- Two's complement
- Signed binary where the left bit has a negative place value (-128 in 8 bits).
- Binary
- Base 2: the number system that uses only the digits 0 and 1.
- Bit
- A single binary digit, 0 or 1.
All GCSE and International GCSE Computer Science key terms and definitions โ
Try two quick questions
See if it has sunk in. Answers are marked straight away.
2 more questions
Try each one, then tap to check.
Convert -12 to 8-bit two's complement binary.
Show the answer
Answer: 11110100
+12 = 00001100. Flip every bit: 11110011. Add 1: 11110100.
What denary value is 11111110 in 8-bit two's complement?
Show the answer
Answer: -2
The leftmost bit is worth โ128. 11111110 = โ128 + 126 = -2.
Check you have got it
Answer 6 quick questions with instant marking. If you get one wrong, GCSE-ready shows you why and gives you another go. It is free, and you do not need an account.
- Pearson Edexcel GCSE Computer Science (1CP2) specification, topic 2.1.2, 2.1.3
- Pearson Edexcel International GCSE Computer Science (4CP0) specification, topic 3.1.2
- Pearson Edexcel GCSE (9-1) Computer Science (1CP2) specification
Facts checked against the sources below, 17 October 2026. Last updated 2 October 2026. Spotted a mistake? Tell us and we will fix it.
What do exam command words like explain and evaluate mean? โ