GCSE · Computer Science · Eduqas · Spec C500QS
Two's complement representation
11111111 looks like the biggest 8-bit number you can write. In two's complement it is -1. Change one column heading and the whole thing makes sense.
Predict, then check
Take 10000000, which is -128, and negate it the usual way.
In 8 bits, invert every bit of 10000000 and add 1. What pattern comes out?
WHAT YOU'VE LEARNED
A quick recap of today's lesson.
How to write negative whole numbers in binary by changing one column heading.
What you need to know
- Two's complement is a way to write positive and negative whole numbers (signed integers) in binary.
- It uses a fixed number of bits, and a pattern only means something once you know how many.
- The leftmost bit is worth -128 in 8 bits (-2^(n-1) in n bits). Every other bit keeps its usual positive value.
Have a goPriya says 10000110 is 134, "because the leftmost 1 is worth 128 like normal". Who is right? Work out its value in 8-bit two's complement.
-122
Priya used +128, but the leftmost column is -128: -128 + 4 + 2 = -122.
- The leftmost bit shows the sign: 0 is zero or positive, 1 is negative. Positives are plain binary with leading zeros.
- To read a pattern, add the place values of every bit that is 1, using the negative one for the leftmost bit.
- To write a negative number: its positive value in the fixed number of bits, invert every bit, then add 1.
Have a goTry it on a small one: write +3 in 8 bits, invert every bit, then add 1. What pattern do you get for -3?
11111101
00000011 inverts to 11111100, and adding 1 gives 11111101. Stopping at 11111100 skips the add-1 step and would read as -4.
- To negate any pattern, invert every bit, add 1 and drop any carry. The catch: -128 has no positive partner in 8 bits.
- Shortcut for negating: from the right, copy bits up to and including the first 1, then invert everything left of it.
- n bits hold -2^(n-1) up to 2^(n-1) - 1. With 8 bits, that is -128 to +127.
Have a goA 5-bit two's complement number can go from the most negative value to the biggest positive. What are those two numbers?
-16 up to +15
With n = 5 the range is -2^4 to 2^4 - 1. The top is 15, not 16, because the top is one less than 2^(n-1).
- In 8 bits, 01111111 is +127, 10000000 is -128 and 11111111 is -1. Zero has just one pattern: every bit 0.
The big picture
Two's complement writes positive and negative whole numbers in a fixed number of bits. The leftmost bit is a place value of its own, worth -128 in 8 bits, and every other bit keeps its usual positive value. To read a pattern you add the place values of its 1s. To make a negative number, write the positive value, invert every bit and add 1. With 8 bits the range is -128 to +127.
Key points
Worked example
Problem
Convert 10110100, an 8-bit two's complement number, to denary.
⚠ Watch out
Reading a leading 1 as "just a minus sign" and taking the other bits as the size, so that 10000001 comes out as -1. The leftmost bit is a column worth -128, and 10000001 is -128 + 1 = -127.
Memory hook
Change the heading, not the digits: the leftmost column is -128, everything else is ordinary binary. So 11111111 is -128 + 127 = -1.
Check yourself
Without looking back: what is the value of 11000001 in 8-bit two's complement, and how do you know the answer is negative before you do any adding?
Flashcards
(15)What is two's complement?
Why must you know the number of bits before reading a two's complement pattern?
What is the place value of the leftmost bit in an n-bit two's complement number?
What place values do the other bits have in an 8-bit two's complement number?
What does the leftmost bit tell you about the sign?
How is a positive number written in two's complement?
How do you turn a two's complement pattern into denary?
How do you write a negative denary number in two's complement?
What is the equivalent way to write a negative number, starting from the leftmost column?
How do you find the negative of a two's complement number?
What is the shortcut for negating a two's complement number?
What range can n-bit two's complement hold, and what is it for 8 bits?
Which 8-bit patterns are +127, -128 and -1?
How many patterns does zero have in two's complement?
Which value negates to itself because it has no positive counterpart in range?
Tap any card to flip it, or use Study as deck to go through them one at a time. In the full lesson these run as a spaced-repetition deck — you rate each card Hard, Good or Easy and the tricky ones keep coming back until they stick.
Learning with Lightbulb is opening soon
You can use this lesson now. Join the waitlist and we'll let you know when the full Lightbulb experience is ready.
Keep me postedMore Eduqas GCSE Computer Science topics
How this lesson was checked. This Eduqas GCSE Computer Science (specification C500QS)lesson was published through Lightbulb Learning's human-designed editorial process — the educational standards, accuracy rules and publication checks it must pass were authored and approved by Philip Halpin. It passed subject-specific assessment, automated educational checks and technical publication verification before going live (publication checks completed 16 November 2026). Published pages are monitored, human spot-checking is ongoing across the lesson library, and anything found wrong is corrected or withdrawn. How our lessons are made and checked. Spotted a mistake? Email hello@lightbulblearning.co and we'll review it.