Open the editor

Computer science · High school

Two's Complement Slides

Free animated slides, ready to teach: 6 slides where every step appears on a click and the diagrams move. Play them right here, present them full screen, or copy them into your account to edit.

A real Tracé deck playing in your browser. No account needed.

What the lesson covers

Two's complement is how computers store negative whole numbers. Students go round a 4-bit number wheel, read an 8-bit pattern with a top bit worth −128, negate numbers by flipping bits and adding one, and subtract by adding.

The slides, one by one

1 Two's complement

Negative numbers in binary

How does a computer store −5 with only 0s and 1s?

2 The top bit counts as −128

8 bits: from −128 to 127

−128 + 64 + 32 + 16 + 8 + 2 + 1 = −5

3 To negate: flip the bits, then add one

4 bits: 0101 (5) → 1010 → 1011 (−5)

Orange half: top bit 1, negative

4 Subtracting by adding

Work out 7 − 3 in 8-bit two's complement by adding −3.

→ Make −3 by flipping and adding 1, then add and drop the carry

3 = 0000\,0011 \to 1111\,1100 \to 1111\,1101
7 = 0000\,0111
0000\,0111 + 1111\,1101 = 1\,0000\,0100
\text{Drop the carry: } 0000\,0100 = 4

7 − 3 = 4, using only addition

5 Quick check

In 8-bit two's complement, what number is 1000 0000?

  • 128
  • −0
  • −128
  • −127
Show the answer

−128

Only the top bit is set, and it is worth −128.

6 What to remember

\begin{aligned}&\textsf{Top bit worth }-2^{n-1}\textsf{ (}{-}\textsf{128 in}\\ &\textsf{8 bits)}\end{aligned}

Top bit 1 means negative

Negate: flip every bit, add 1

Subtract by adding the negative

Challenge: Why is there only one zero in two's complement?

Every slide is built click by click: text, formulas and pictures come in one step at a time, so the class follows the reasoning instead of reading ahead. Graphs with sliders can be dragged live while you present.

Make your own version with AIChange the level, the numbers or the language: type the topic and get a new deck that moves in about 30 seconds. Free, no account needed.

Questions teachers ask

How do you find the two's complement of a number?

Write the positive number in binary, flip every bit, then add 1. In 8 bits, 5 = 0000 0101 becomes 1111 1010, then 1111 1011, which is −5. The top bit counts as −128.

Are these slides really free?

Yes. Watch them on this page or present them full screen with no account. Making your own copy to edit is free too.

Can I change the slides before my lesson?

Yes. Press "Make my own copy" and the deck becomes one of your projects in the Tracé editor, where you can change the text, the numbers, the colours or the order of the clicks.

Do they work on a classroom projector or an interactive whiteboard?

Yes. They run in the browser on any laptop, so anything that shows your screen works. Press the right arrow or click to go to the next step.