Study Guide Instructor view
Two’s Complement
Teaching notes for Lesson 1.5, with controls for presenting it.
Keep this page on your own screen. Share only the lesson window. The lesson window holds no teaching notes, so sharing it cannot show them.
Presenting
- Open the lesson in its own window and share that window, not this one.
- Use Next and Previous here, or the lesson’s own, to move through the lesson. Next reveals one thing at a time: the next idea, or the answer to the question on screen, then the next step. Previous takes the last reveal back. The line below says what is on screen and what Next will show.
- Reveal hints and answers when the class is ready, and reset a demonstration before using it again.
The controls need JavaScript and a browser that supports BroadcastChannel. Without them, open the lesson in presentation mode and use its own controls.
The two windows talk to each other only inside this browser, on this device. Nothing is sent to a server, and no account is needed. A second device (a phone or another tablet) cannot follow the lesson window yet.
Now on the lesson window
- On screen
- Next teaching point
Guidance for this point
Lesson plan
- Level
- Intermediate
- Time
- About 60 minutes; the steps below add up to 60
Learners discover two’s complement by asking what a counter shows when it rolls backwards past zero, then work out for themselves that the leftmost column must be worth −128 for 1111 1111 to be −1. They read and write 8-bit negative numbers by the column method and by invert-and-add-1, find the range −128 to 127, convert signed binary numbers, and correct the common idea that the leftmost bit is a minus sign.
Objectives
- Explain why an 8-bit number can be given a negative value by making its leftmost bit worth −128
- Convert an 8-bit two’s complement number to denary, and to binary with a sign
- Convert a positive or negative denary or binary integer to an 8-bit two’s complement number
- Give the range of 8-bit two’s complement, −128 to 127, and explain it
- Use two’s complement in a new situation, such as a temperature reading
Before the lesson
- Board space for the eight columns −128 64 32 16 8 4 2 1; keep them visible throughout.
- Mini whiteboards for converting; learners should always check by adding the columns.
- Optional: a three-wheel counter picture for the opening step.
- Recall of the overflow lesson: 255 + 1 wraps to 0 in an 8-bit register.
Steps
Introduction Opening
On the lesson window now
On screen: the lesson’s title, module and number; Next adds its objectives and key terms, as the lesson page lists them; Next again begins the first step.
Objectives on screen
- Explain why an 8-bit number can be given a negative value by making its leftmost bit worth −128
- Convert an 8-bit two’s complement number to denary, and to binary with a sign
- Convert a positive or negative denary or binary integer to an 8-bit two’s complement number
- Give the range of 8-bit two’s complement, −128 to 127, and explain it
- Use two’s complement in a new situation, such as a temperature reading
Purpose: Learners discover two’s complement by asking what a counter shows when it rolls backwards past zero, then work out for themselves that the leftmost column must be worth −128 for 1111 1111 to be −1. They read and write 8-bit negative numbers by the column method and by invert-and-add-1, find the range −128 to 127, convert signed binary numbers, and correct the common idea that the leftmost bit is a minus sign.
1. Going backwards past zero Think 6 min
On the lesson window now
Purpose: Learners use the wrap-around they met with overflow to find a pattern that behaves like −1, before any column value is changed.
Ask
- A three-wheel counter shows 000 and the car is pushed one mile backwards. What does it show, and what could 998 mean?
- In an 8-bit register, which pattern gives 0000 0000 when 1 is added?
Responses to expect
- 999, agreed to mean −1; then 998 is −2
- 1111 1111, because the carry runs through every column and is lost
Misconceptions to challenge
- A learner may believe: “The counter would show −1.” Respond: This counter has no minus sign: it can only show the digits on its wheels, so the toy company has to agree what 999 means.
- A learner may believe: “The pattern for −1 is 1000 0001 (a minus sign and then 1).” Respond: Test it by adding 1: it does not give zero. The pattern that gives zero is 1111 1111.
On the board or with the pen
- Write 1111 1111 + 0000 0001 in columns and show the carry rippling left to leave 0000 0000.
Checking understanding: Ask learners to hold up the pattern for −1 on mini whiteboards.
Depending on the answers
- If learners are not sure about 255 + 1: re-run it in columns before going on.
English as an additional language
- Check backwards and rolls back with a gesture.
Discussion pause: Thirty seconds of silent thinking before sharing the register question.
In the lesson window
- Think it through: What do the wheels show after one mile backwards? If the toy company agreed that this reading means −1, what would 998 mean?
- Think it through: In an 8-bit register, which pattern gives 0000 0000 when 0000 0001 is added to it, if the carry out of the leftmost column is lost? What number could that pattern stand for?
2. A column worth −128 Discover 10 min
On the lesson window now
Purpose: Learners work out what the leftmost column must be worth, and meet the name two’s complement, then read patterns by adding the columns.
Ask
- 64 + 32 + 16 + 8 + 4 + 2 + 1 is 127. What must the leftmost column be worth for 1111 1111 to be −1?
- What is 1000 0101 in two’s complement?
Responses to expect
- −128, because −128 + 127 = −1
- −123: −128 + 4 + 1
Misconceptions to challenge
- A learner may believe: “1000 0101 is 133 (read-1000-0101 option A).” Respond: That treats the leftmost column as +128. Ask what it is worth in two’s complement.
- A learner may believe: “The leftmost bit is a minus sign and the rest is a positive number, so 1000 0101 is −5 (option C).” Respond: Ask which column the 1 is in and what that column is worth; then add the other columns on top of it.
On the board or with the pen
- Write −128 64 32 16 8 4 2 1 across the board; put a bit under each column for 1011 0100 and add the values of the 1s.
What learners should notice
- A number starting with 0 is positive; starting with 1 it includes −128, so it is negative.
Checking understanding: The read-1000-0101 check, and the table of readings, especially 1000 0000, where only one column is on.
Depending on the answers
- If learners treat the leftmost bit as a sign: go back to 1111 1111: if the 1 is only a sign, what is the rest worth? It would be −127, not −1.
- If learners are fluent: ask how many of the eight columns must be on to give −128 exactly (only one).
Support
- Give learners the column values printed above eight empty boxes.
In the lesson window
- Think it through: The seven right-hand columns, 64 + 32 + 16 + 8 + 4 + 2 + 1, add up to 127. For 1111 1111 to be worth −1 in total, what would the leftmost column have to be worth?
- Check your understanding: What is the 8-bit two’s complement number 1000 0101 in denary?
3. Writing a negative number Predict 12 min
On the lesson window now
Purpose: Learners construct −45 from the columns themselves, then meet invert-and-add-1 as a second method that always works, with a reason why it works.
Ask
- How would you make −45 from the columns −128 to 1? Which column do you start with?
- What is −20 as an 8-bit two’s complement number?
Responses to expect
- Start with −128, then 83 is left: 64 + 16 + 2 + 1, so 1101 0011
- 1110 1100: 20 is 0001 0100, inverted 1110 1011, plus 1
Misconceptions to challenge
- A learner may believe: “−20 is 20 with the leftmost bit changed to 1 (1001 0100) (minus-twenty option A).” Respond: Read 1001 0100 back: −128 + 16 + 4 is −108. Changing one bit is not enough.
- A learner may believe: “Inverting alone gives the negative (1110 1011) (option B).” Respond: Read it back: that is −21. Ask what step comes after inverting.
- A learner may believe: “Positive numbers need inverting too.” Respond: A positive number is written in ordinary binary with a 0 at the left; 37 is 0010 0101.
On the board or with the pen
- Show −45 two ways side by side: the column method and invert-and-add-1; check that both give 1101 0011.
What learners should notice
- A number and its inverted form add up to 1111 1111, which is −1: that is why adding 1 gives the negative.
Checking understanding: The minus-twenty check and the denary-to-two’s-complement table (−12 and −100).
Depending on the answers
- If learners get inversion right but forget to add 1: ask them to read the result back by adding the columns; it will be one too low.
- If learners prefer the column method: accept it; the check is always the same, adding the columns with −128.
Support
- Provide the written steps invert, add 1, check on a card.
Stretch
- Why does inverting and adding 1 a second time take a negative number back to its positive form?
Discussion pause: Give learners time to attempt −45 by the column method before any shortcut is mentioned.
In the lesson window
- Think it through: Using the columns −128, 64, 32, 16, 8, 4, 2 and 1, each at most once, how could you make −45? Which column must you start with, and what is left to make after it?
- Check your understanding: What is −20 as an 8-bit two’s complement number?
4. How far the numbers go Explain 8 min
On the lesson window now
Purpose: Learners work out the largest and smallest numbers and the range, and see what happens just outside it.
Ask
- What are the largest and smallest numbers in 8-bit two’s complement, and which patterns are they?
- What is the range, and how many numbers is that?
Responses to expect
- 0111 1111 = 127 and 1000 0000 = −128
- −128 to 127: 256 numbers, one for each pattern
Misconceptions to challenge
- A learner may believe: “The range is −127 to 127 (symmetrical).” Respond: Check 1000 0000: only the −128 column is on. Zero uses one pattern that starts with 0, so there is one more negative number.
- A learner may believe: “The range is −256 to 255.” Respond: That needs nine bits. Ask how many patterns eight bits make.
On the board or with the pen
- Write the two end patterns, with arrows showing 127 + 1 wrapping to −128.
What learners should notice
- There is one more negative number than positive numbers.
Checking understanding: The range-of-eight-bits check, and ask what 0111 1111 + 1 gives.
Depending on the answers
- If learners say −127 to 127: ask for the pattern 1000 0000 and its value.
English as an additional language
- Check range and smallest/largest; draw a number line from −128 to 127.
In the lesson window
- Think it through: In 8-bit two’s complement, what is the largest number you can write, and the smallest (the most negative)? Which patterns are they?
- Check your understanding: What is the range of whole numbers an 8-bit two’s complement register can store?
5. Binary numbers with a sign Discover 8 min
On the lesson window now
Purpose: Learners store a signed binary number such as −1011 and read two’s complement back into signed binary form.
Ask
- How could you store −1011 (minus 11) in an 8-bit register?
- What is the denary and signed-binary form of 1110 0111?
Responses to expect
- Write 1011 as 0000 1011, invert to 1111 0100, add 1 to give 1111 0101
- −25, which is −11001
Misconceptions to challenge
- A learner may believe: “−1011 is stored as 1000 1011 (sign bit then magnitude).” Respond: Read 1000 1011 back by adding the columns: −128 + 8 + 2 + 1 is −117, not −11.
- A learner may believe: “A positive signed binary number needs inverting too.” Respond: Only negative numbers are inverted; +101101 is just 0010 1101.
On the board or with the pen
- Write each step of −1011 on the board in order with the check: −128 + 64 + 32 + 16 + 4 + 1 = −11.
Checking understanding: The two tables: they check both directions and need the leading-zeros rule.
Depending on the answers
- If learners forget to fill the number to eight bits first: ask how many bits the register holds and write the zeros in before inverting.
Support
- Give a worked row first and ask learners to explain each step aloud.
Stretch
- Convert −1 and −128 to signed binary form, and say which patterns they use.
In the lesson window
- Think it through: How could you store −1011 (minus 11) in an 8-bit register? Write down your plan for the pattern, and then try it.
6. Use it somewhere new Apply 12 min
On the lesson window now
Purpose: Apply two’s complement to a weather station, a freezer, the top of the range and a classmate’s mistaken reasoning.
Ask
- What temperature does 1110 0111 stand for?
- Which pattern stores −18?
- What does 0111 1111 hold after 1 is added?
- Aisha says 1000 0000 is minus nought. What is wrong?
Responses to expect
- −25 °C: −128 + 103
- 1110 1110: 18 is 0001 0010, inverted, plus 1
- 1000 0000, which reads as −128: the register has wrapped round
- The leftmost bit is a column worth −128, not a minus sign
Misconceptions to challenge
- A learner may believe: “The pattern is 25 °C, because the leftmost bit gives the sign and the rest is 25 (station-reading option A).” Respond: The leftmost 1 means the −128 column is on. Add −128 and the other columns.
- A learner may believe: “It is 231 °C (ordinary binary) (option B).” Respond: That reads the leftmost column as +128. Two’s complement uses −128.
- A learner may believe: “−18 is 1110 1101 (inverted only) (freezer-reading option A).” Respond: Read it back: that is −19. Ask what must be added after inverting.
- A learner may believe: “A full register resets to 0 (one-more-than-127 option B).” Respond: Work out 0111 1111 + 1 in binary, then read the result with the −128 column.
- A learner may believe: “1000 0000 is minus nought (Aisha).” Respond: Add the columns that are on: only the −128 column is on, so it is −128.
Checking understanding: Four questions that each isolate a different error: misreading the sign, forgetting to add 1, forgetting the wrap, and treating the leftmost bit as a minus sign.
Depending on the answers
- If learners get the station reading wrong: ask them to write the column values above the bits and add only the columns with a 1.
- If learners are secure: ask what temperature is stored by 1000 0000 and whether −128 °C is realistic.
Support
- Give learners the invert-and-add-1 method card.
In the lesson window
- Apply it: What temperature does 1110 0111 stand for?
- Apply it: Which pattern stores −18?
- Apply it: A register holds 0111 1111 (127), and 1 is added to it. What does it hold now, read as an 8-bit two’s complement number?
- Apply it: Aisha says: “1000 0000 is minus nought, because the leftmost bit means negative and the rest is zero.” What is wrong with her reasoning?
7. Bring it together Consolidate 4 min
On the lesson window now
Purpose: Learners explain how to find −9 and how to check it, and count the numbers an 8-bit register can store, before the summary.
Ask
- Explain how to find the 8-bit two’s complement pattern for −9, and how to check your answer.
- How many different numbers can an 8-bit register store, counting zero?
Responses to expect
- 9 is 0000 1001, invert 1111 0110, add 1 1111 0111; check by adding the columns with −128
- 256, one for each pattern: 128 negatives, zero and 127 positives
Misconceptions to challenge
- A learner may believe: “255 numbers, because the largest ordinary pattern is 255 (how-many-numbers option A).” Respond: 255 is the largest value, counting from 0; counting zero gives 256 patterns.
- A learner may believe: “128 numbers, the negative values (option B).” Respond: That counts only the negative numbers. Ask how many positive values and zeros there are.
Checking understanding: Listen for the check step in the explanation: adding the columns.
Depending on the answers
- If learners cannot check their own answers: start the next lesson by converting back from 1111 0111 to denary.
In the lesson window
- Think it through: Without looking back, explain to a friend how to find the 8-bit two’s complement pattern for −9, and how you could check your answer.
- Check your understanding: How many different whole numbers can an 8-bit two’s complement register store, counting zero?
Lesson recap Closing
On the lesson window now
On screen: the lesson’s objectives again; Next adds the closing question, which asks the class to explain each one in their own words without looking back. It says nothing about what anyone has learnt: use the answers to decide what to revisit.
Points to listen for
- Two’s complement makes the leftmost column worth −128 (in 8 bits); the other columns are 64, 32, 16, 8, 4, 2 and 1.
- A leftmost bit of 0 means positive; a leftmost bit of 1 means the −128 is included, so the number is negative.
- To write a negative number, either build it from the columns, or write the positive form, invert every bit and add 1; check by adding the columns.
- The 8-bit range is −128 to 127: 256 numbers, one for each pattern. Beyond it, the register wraps round and overflows.
- The leftmost bit is not a minus sign in front of a number: it is a column with a value of its own.
Consolidation
- Two’s complement makes the leftmost column worth −128 (in 8 bits); the other columns are 64, 32, 16, 8, 4, 2 and 1.
- A leftmost bit of 0 means positive; a leftmost bit of 1 means the −128 is included, so the number is negative.
- To write a negative number, either build it from the columns, or write the positive form, invert every bit and add 1; check by adding the columns.
- The 8-bit range is −128 to 127: 256 numbers, one for each pattern. Beyond it, the register wraps round and overflows.
- The leftmost bit is not a minus sign in front of a number: it is a column with a value of its own.