Study Guide Instructor view
Logical Binary Shifts
Teaching notes for Lesson 1.4, 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 predict what happens to a number when its digits slide along a column, first in denary and then in binary, and test the prediction on an 8-bit register. They discover that a left shift doubles and a right shift halves, and that bits pushed off either end are lost, which makes the result inexact. The apply questions test whether they can tell when doubling fails and why halving an odd number drops the half.
Objectives
- Perform a logical left shift and a logical right shift on a positive 8-bit binary integer, including multiple shifts
- Explain what happens to the bits that are shifted off the end of the register and what is shifted in
- Explain that each shift left multiplies by 2 and each shift right divides by 2, and give the effect of a shift by several places
- Recognise when losing bits makes the result of a shift inexact
- Use a shift to multiply or divide by a power of two in a new situation
Before the lesson
- Eight squares drawn on the board, or eight cups in a row, to act as an 8-bit register with a bit in each.
- Mini whiteboards or paper for shifting one place at a time; learners should write every intermediate pattern.
- The column values 128 to 1 shown above the register.
- Be ready to link back to overflow in the previous lesson: a left shift can lose a bit for the same reason an addition can.
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
- Perform a logical left shift and a logical right shift on a positive 8-bit binary integer, including multiple shifts
- Explain what happens to the bits that are shifted off the end of the register and what is shifted in
- Explain that each shift left multiplies by 2 and each shift right divides by 2, and give the effect of a shift by several places
- Recognise when losing bits makes the result of a shift inexact
- Use a shift to multiply or divide by a power of two in a new situation
Purpose: Learners predict what happens to a number when its digits slide along a column, first in denary and then in binary, and test the prediction on an 8-bit register. They discover that a left shift doubles and a right shift halves, and that bits pushed off either end are lost, which makes the result inexact. The apply questions test whether they can tell when doubling fails and why halving an odd number drops the half.
1. Sliding digits along Think 7 min
On the lesson window now
Purpose: Start from place value in denary, then let learners predict the binary effect before any rule is given.
Ask
- Dev slides 35 one column left and writes 0 in the ones column. What does the grid show?
- In binary every column is worth twice the one on its right. What happens if every bit slides one place left? One place right?
Responses to expect
- 350, ten times as large
- Left doubles the number; right halves it
Misconceptions to challenge
- A learner may believe: “Sliding left just adds a 0 and the value does not change.” Respond: Ask which column the 3 is in now. Every digit is worth ten times as much, so the whole number is ten times as large.
On the board or with the pen
- Draw the tens and ones grid for 35 and for 350 with arrows showing each digit moving left.
Checking understanding: Check the predictions before the investigation: how many learners predict doubling and halving?
Depending on the answers
- If most predict doubling and halving: keep the prediction visible and test it on 0000 0101.
- If several predict ‘ten times’: ask what each column of a binary number is worth compared with its neighbour.
English as an additional language
- Check column, slide and gap; demonstrate sliding with counters on a table.
Discussion pause: Silent thirty seconds for the binary prediction; ask for the prediction on mini whiteboards.
In the lesson window
- Think it through: Dev slides both digits one column to the left and writes a 0 in the empty ones column. What number does the grid show now, and how does it compare with 35?
- Think it through: In binary every column is worth twice the one on its right. Predict: what happens to the value of a binary number if every bit slides one column to the left, with a 0 filling the gap? What would happen if every bit slid one column to the right instead?
2. Shifting left Discover 7 min
On the lesson window now
Purpose: Test the doubling prediction on an 8-bit register, then name the logical left shift and multiple shift.
Ask
- 0000 0101 is shifted two places left with 0s coming in on the right. What pattern is in the register, and what is its value?
- What does each slide do to the value?
Responses to expect
- 0001 0100, which is 20
- Each slide doubled the value: 5 × 4
Misconceptions to challenge
- A learner may believe: “A shift by two places can be done in one jump, so the patterns in between do not matter.” Respond: Do it one slide at a time: 0000 0101, then 0000 1010, then 0001 0100.
- A learner may believe: “Shifting by 2 multiplies by 2.” Respond: Each place doubles, so two places are 2 × 2 = 4.
On the board or with the pen
- Draw eight boxes with 0000 0101 and move the bits with arrows, then write each intermediate pattern below.
What learners should notice
- A 0 is shifted in at the right-hand end every time.
Checking understanding: Show the step-through with 0000 1100 and ask for each value before it is revealed.
Depending on the answers
- If learners do the shift in one go and get the pattern wrong: insist on writing the pattern after every single place.
Support
- Give learners squared paper with eight boxes so that the bits can be cut out and slid.
In the lesson window
- Think it through: A register holds 0000 0101 (5 in denary). Slide every bit two places to the left, putting 0 into each gap on the right. What pattern does the register hold, and what is its value in denary?
3. Shifting right Predict 7 min
On the lesson window now
Purpose: Predict, then confirm, the right shift, and keep track of the bits that fall off the right-hand end.
Ask
- 0010 1000 is 40. Predict the pattern and value after one shift right, and after six shifts.
- A register holds 0000 1000 and is shifted right by 2 places. What does it hold?
Responses to expect
- 0001 0100, which is 20; after six shifts the register is all zeros
- 0000 0010, because the 1 moves from the 8s column to the 2s column
Misconceptions to challenge
- A learner may believe: “A right shift multiplies by 4 (0010 0000, shift-right-by-two option B).” Respond: That moves the 1 the other way. Ask whether a right shift makes the value larger or smaller.
- A learner may believe: “A shift by two places is one shift (0000 0100, option C).” Respond: Two places is two single shifts: where is the 1 after the second one?
On the board or with the pen
- Copy the first three rows of the right-shift table and leave the rest for learners to fill in as they predict.
What learners should notice
- The bits that fall off the right in the table are 0, 0, 0, 1, 0, 1: the 1s are lost.
Checking understanding: The shift-right-by-two check: option B diagnoses direction; option C diagnoses the number of places.
Depending on the answers
- If learners reverse the direction: ask which column the 1 is in before and after, and what each column is worth.
English as an additional language
- Teach left and right with a gesture; use ‘fall off’ for bits that leave the register.
In the lesson window
- Think it through: A register holds 0010 1000 (40 in denary). Predict the pattern and the value after one logical shift to the right, with a 0 shifted in at the left. Then predict what happens after six shifts.
- Check your understanding: A register holds 0000 1000 (8). It is shifted right by 2 places. What does it hold now?
4. The bits that fall off the end Explain 9 min
On the lesson window now
Purpose: Learners confront the limit of the register: bits shifted out are lost, so the result may not be a clean doubling or halving.
Ask
- 1100 0000 is 192 and is shifted left one place. What happens to the leftmost 1, and does the register hold 192 × 2?
- 0110 0001 (97) is shifted left by 2 places. What does the register hold?
Responses to expect
- The 1 is lost and the register holds 1000 0000 (128); 384 cannot be stored
- 1000 0100, which is 132: 4 × 97 = 388 and 388 − 256 = 132
Misconceptions to challenge
- A learner may believe: “The register holds 388 (lose-a-one-left option A).” Respond: 388 is greater than 255. Ask what happens to a bit shifted past the leftmost place.
- A learner may believe: “The bits that leave the left end come back in at the right (option C).” Respond: That is a different kind of shift. In a logical shift, what is shifted in at the right-hand end?
- A learner may believe: “A shift always multiplies or divides exactly.” Respond: The result is exact only if the bits shifted out are all 0.
On the board or with the pen
- Mark MSB and LSB on the register and draw an arrow out of each end where a bit can fall off.
What learners should notice
- The lost bit’s value (256) is the same lost carry as in overflow.
Checking understanding: The lose-a-one-left check, with the explanation in terms of 388 − 256.
Depending on the answers
- If learners can do the shift but not explain the value: ask them to compute 97 × 4 and then to find which part is too large for eight bits.
- If learners are secure: ask for a starting value that would keep the doubling exact (leftmost bit 0).
Stretch
- Which 8-bit numbers can be shifted left by 3 places without losing a 1?
Discussion pause: Ask learners to predict the register for 1100 0000 shifted left before showing it.
In the lesson window
- Think it through: A register holds 1100 0000 (192). It is shifted left by one place. What happens to the leftmost 1, and does the register now hold 192 × 2?
- Check your understanding: A register holds 0110 0001 (97). It is shifted left by 2 places. Which statement is correct?
5. Shifting on your own Experiment 9 min
On the lesson window now
Purpose: Learners practise shifts by hand with a worked example that gives the reason for each step and then decide which results were exact.
Ask
- Shift 1010 1000 right by 3 places. What will be lost, and is the division exact?
- Which of the five shifts in the table gave an exact result?
Responses to expect
- 0001 0101, which is 21; the three bits lost are all 0
- Rows 1 to 3; row 4 lost two 1s and row 5 lost the leftmost 1
Misconceptions to challenge
- A learner may believe: “Right shifts always divide exactly (which-row-exact option A).” Respond: Check the 0000 1111 row: 15 shifted right by 2 gives 3, not 3.75. Ask which bits fell off and whether they were all 0.
- A learner may believe: “All five shifts gave exact results (option C).” Respond: Compare 197 × 2 with 138: which bit was lost?
On the board or with the pen
- Write each stage of 1010 1000 → 0101 0100 → 0010 1010 → 0001 0101 down the board, with the denary check 168 ÷ 8 = 21.
Checking understanding: Which-row-exact: ask learners to point to the row where a 1 was lost at each end.
Depending on the answers
- If learners mix up which end loses what: restate: left shift loses from the most significant end, right shift loses from the least significant end.
Support
- Give learners the table with the first two rows complete.
English as an additional language
- Teach exact with the example ‘exactly 21, not nearly 21’.
In the lesson window
- Check your understanding: In the table, which shifts gave a result that was exactly the start value multiplied or divided, with no bits lost that were 1?
6. Use it somewhere new Apply 14 min
On the lesson window now
Purpose: Apply shifts to a game, a sensor, an odd number and two conflicting claims, so that learners decide when a shift is a valid way to double or halve.
Ask
- What is the character’s speed after two left shifts of 0001 0110?
- For which starting reading does a single left shift not give double?
- Why is 73 shifted right 36 and not 36.5?
- Tom says three places multiplies by 3; Sara says by 8. Who is right?
Responses to expect
- 88: 22 × 4 with no 1 lost
- 1000 0001: the leftmost 1 is lost (258 does not fit)
- The 1 shifted out stood for the half, which cannot be stored
- Sara: each place doubles, 2 × 2 × 2 = 8
Misconceptions to challenge
- A learner may believe: “The shift divides, so the speed is 5 (game-speed option A).” Respond: That is a right shift. Which way do the bits move in a left shift?
- A learner may believe: “Doubling fails for the number with the most 1s (0111 1111) (which-doubling-fails option B).” Respond: It is the position of the leftmost 1 that matters, not the number of 1s.
- A learner may believe: “The register rounded the answer (halving-seventy-three option A).” Respond: Rounding would give 37. Ask which bit was shifted out and what it was worth.
- A learner may believe: “There is a hidden bit that stores the half (option C).” Respond: The register has exactly eight columns, all shown in the pattern; there is nowhere to keep it.
- A learner may believe: “n places multiply by n (Tom).” Respond: Test 0000 0001 shifted left three times: it becomes 0000 1000, which is 8, not 3.
Checking understanding: Four questions, each isolating a different mistake: direction, which values fail, what happens to the half, and the effect of several places.
Depending on the answers
- If learners cannot find the failing reading: ask them to double each of the four readings and say whether the answer is over 255.
- If learners say Tom is right: ask them to shift 0000 0001 three places one at a time and read the value after each.
Support
- Allow learners to check each answer in denary after they shift.
Stretch
- Describe in one sentence how to multiply a number by 10 using shifts and addition (shift by 3 plus shift by 1).
In the lesson window
- Apply it: What is the character’s speed after the power-up?
- Apply it: For which starting reading does the single left shift not give double the value?
- Apply it: A register holds 0100 1001 (73). After one logical shift right it holds 0010 0100 (36). Why is it not 36.5?
- Apply it: Tom says that shifting left by 3 places multiplies a number by 3. Sara says it multiplies it by 8. Which of them is right, and why?
7. Bring it together Consolidate 7 min
On the lesson window now
Purpose: Learners explain a left shift by 2 in their own words and then check a right shift that loses 1s before the summary.
Ask
- Explain what a logical shift left by 2 does to an 8-bit number, what is shifted in, and when the result is not 4 times the original.
- 0001 0110 (22) is shifted right by 2. Which statement is correct?
Responses to expect
- Bits move two places left, two 0s come in at the right, the value is multiplied by 4 unless a 1 is shifted out at the left
- 0000 0101: the lost bits were 1 and 0, so 5 is not exactly 22 ÷ 4 = 5.5
Misconceptions to challenge
- A learner may believe: “The 0s shifted in at the left are lost (shift-twenty-two-right option A).” Respond: The zeros are part of the new pattern; the bits that leave are at the right-hand end.
- A learner may believe: “The register holds 0101 1000 (88).” Respond: That is a left shift. Ask which way a right shift moves the bits.
Checking understanding: Listen for the three things in the explanation: direction, what comes in, and the exception when a 1 is lost.
Depending on the answers
- If learners cannot state when the result is inexact: restart the next lesson with 0000 1111 shifted right by 2 and ask which bits fell off.
In the lesson window
- Think it through: Without looking back, explain to a friend what a logical shift left by 2 places does to an 8-bit number, what is shifted in, and when the result is no longer 4 times the original.
- Check your understanding: A register holds 0001 0110 (22) and is shifted right by 2 places. Which statement is correct?
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
- A logical shift moves every bit a set number of places left or right. Bits shifted off the end are lost, and 0s are shifted in at the other end.
- A left shift by n places multiplies by 2^n; a right shift by n places divides by 2^n and drops the remainder. The result is exact only if the bits shifted out are all 0.
- A left shift can lose the most significant bits; a right shift can lose the least significant bits.
- A logical shift does not wrap the lost bits round to the other end.
Consolidation
- A logical shift moves every bit a set number of places left or right. Bits shifted off the end are lost, and 0s are shifted in at the other end.
- A left shift by n places multiplies by 2^n; a right shift by n places divides by 2^n and drops the remainder. The result is exact only if the bits shifted out are all 0.
- A left shift can lose the most significant bits; a right shift can lose the least significant bits.
- A logical shift does not wrap the lost bits round to the other end.