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.

​

Computer science · Binary

Same 8 bits, four ways to read them

  1. 1 Find
  2. 2 Explore
  3. 3 Translate
  4. 4 Spot the mismatch

Model. Idealised: this is a fixed 8-bit view with five hand-picked patterns, not all 256. Every pattern is read the same way in every tab.

Step 1 · Find

This is the sum for 11111011. Tap the number that comes from the leftmost bit.

=

How far can it go?

Squeeze it into 4 bits

Shrink the idea to 4 bits so the whole number line fits. The leftmost column is now worth -8 and the others keep 4, 2 and 1. Slide each pattern to the number it stands for.

Which one sounds like you?

Three ways to misread the leftmost bit

Three classmates are looking at 8-bit two's complement patterns. One of them is reading them correctly.

Which idea is closest to what you think right now?
How sure are you?

Now you build one

Turn -45 into 8 bits

Write -45 as an 8-bit two's complement number. Choose the missing steps.

  1. Ignore the minus sign for now and write 45 in binary: 32 + 8 + 4 + 1, so 101101.
  2. missing step
Which line is step 2?

Check someone else's work

The shortcut with a slip in it

A student uses the shortcut to find the negative of 00101100 (+44) in 8 bits: working from the right, copy every bit up to and including the first 1, then invert every bit to the left of it. One line goes wrong. Which?

A student's answer — which line goes wrong?

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

1The leftmost bit is a place value of its own: -128 in 8 bits, -2^(n-1) in n bits. Every other bit keeps its positive value.
2Read a pattern by adding the place values of its 1s. Make a negative number by writing the positive, inverting every bit and adding 1.
3To negate, invert and add 1, or copy up to the first 1 from the right and invert the rest. The most negative value, -128, has no positive partner in 8 bits, so it negates to itself.
4n bits hold -2^(n-1) to 2^(n-1) - 1, so 8 bits hold -128 to +127. Zero is only ever all 0s.

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?
A way of representing both positive and negative whole numbers (signed integers) in binary.
Why must you know the number of bits before reading a two's complement pattern?
The number is held in a fixed number of bits, and the pattern can only be interpreted correctly when that number is known.
What is the place value of the leftmost bit in an n-bit two's complement number?
-2^(n-1). In 8 bits that is -128.
What place values do the other bits have in an 8-bit two's complement number?
Their usual positive values: 64, 32, 16, 8, 4, 2 and 1.
What does the leftmost bit tell you about the sign?
0 means the number is zero or positive. 1 means it is negative.
How is a positive number written in two's complement?
Exactly as in ordinary binary, padded with leading zeros so the leftmost bit is 0.
How do you turn a two's complement pattern into denary?
Add the place values of every bit that is 1, using the negative place value for the leftmost bit.
How do you write a negative denary number in two's complement?
Write its positive value in binary in the fixed number of bits, invert every bit, then add 1.
What is the equivalent way to write a negative number, starting from the leftmost column?
Start at the negative place value of the leftmost bit, then switch on the positive columns that add up to the difference between your target and that negative value.
How do you find the negative of a two's complement number?
Invert every bit and add 1, discarding any carry out of the leftmost bit. Doing it twice gives back the original number.
What is the shortcut for negating a two's complement number?
Working from the right, copy every bit up to and including the first 1, then invert every bit to the left of it.
What range can n-bit two's complement hold, and what is it for 8 bits?
-2^(n-1) to 2^(n-1) - 1. For 8 bits: -128 to +127.
Which 8-bit patterns are +127, -128 and -1?
01111111 is +127, 10000000 is -128 and 11111111 is -1.
How many patterns does zero have in two's complement?
Exactly one: every bit is 0.
Which value negates to itself because it has no positive counterpart in range?
The most negative value for the bit width. In 8 bits, 10000000 (-128) gives 10000000 again. Zero also negates to zero.

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 posted

More Eduqas GCSE Computer Science topics

See the full Eduqas Computer Science curriculum →

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.