The shape of the lesson
By the end of the lesson, learners can
- Shifting left: In the lab, choose a number and press the left shift button.
- Shifting right: Now press the right shift button.
- When shifts go wrong: Shifting only multiplies or divides correctly while no 1s fall off the end.
- Move: shift every bit the given number of places.
- Lose: bits pushed past the end of the register are lost.
- Fill: 0s enter at the opposite end; keep exactly 8 bits.
- Effect: left n places × 2n, right n places ÷ 2n, correct only if no 1s are lost.
One picture every idea returns to
A logical shift moves every bit in a register left or right by a number of places. Bits shifted off the end of the register are lost and zeros are shifted in at the opposite end. A left shift of n places multiplies a positive integer by 2n; a right shift of n places divides it by 2n. If a 1 is lost, the answer is no longer correct: the most significant bits are lost in a left shift, the least significant bits in a right shift.
Forty-five minutes, phase by phase
| Time | Phase | What happens in the room | Grouping |
|---|---|---|---|
| 0 to 5 min | Hook: predict | Open with the question in the title, Slide the bits.. Moving every bit one place to the left doubles a binary number; moving it one place to the right halves it. Put the figure on the board: it is the one picture every idea in the lesson returns to. | Whole class, then pairs |
| 5 to 13 min | Teach and check: Shifting left | In the lab, choose a number and press the left shift button. Project tab 4 of the lab (Logical shifts in an 8-bit register) and let a student drive it while the class predicts. Model the worked example Left shift 3 places on the board, one line at a time. | Whole class, then pairs |
| 13 to 21 min | Teach and check: Shifting right | Now press the right shift button. Project tab 4 of the lab (Right shifts and lost bits) and let a student drive it while the class predicts. Model the worked example Right shift 3 places on the board, one line at a time. Your turn: Perform a logical right shift of 2 places on 01100100. Give the result in binary and denary. | Pairs |
| 21 to 30 min | Teach and check: When shifts go wrong | Shifting only multiplies or divides correctly while no 1s fall off the end. | Think-Pair-Share |
| 30 to 36 min | Check | The four Stage 1 questions from the student lesson, answered on mini whiteboards or by show of fingers. Re-teach the one most get wrong. | Individual, then whole class |
| 36 to 43 min | Plenary | The exam-style questions from Stage 2, one at a time: thirty seconds alone, then a random call. The feedback lines in the key give the examiner's wording. | Individual, random call |
| 43 to 45 min | Exit and homework | Set the worksheet below (6 questions, 14 marks). Learners self-assess against the objectives before they leave. | Individual |
Protect the parts that carry the learning
The sequence carries about fifty minutes of material, so the lab is driven by one student while the class predicts rather than explored freely. Times are a guide.
Protected: the check at 30 minutes. It is the only individual read on whether the key idea landed, and it is not cut.
Cut first if the build overruns: the last check in When shifts go wrong, never the check or the plenary.
In a 60 minute block: run worksheet questions 1 to 3 in class as a Rally Coach set and model both the hardest worked example and its check live.
Think-Pair-Share
Pose the question, give thirty seconds of silent thinking, then a minute to compare with a partner before a few pairs share with the class. The silent minute is the part that cannot be cut.
The full structure, with its variations and the other twelve, is on the cooperative-learning page.
What to head off, and how
| Trap learners fall into | Teaching move that pre-empts it |
|---|---|
| Always give 8 bits after a shift. | Writing 1101000 instead of 01101000 shows you have not kept the register size. |
| "Shift left 2" means multiply by 4, not by 2. | The factor is 2 to the power of the number of places. |
Logical binary shifts: worksheet
6 questions, 14 marks. Written in the style of the papers; no past paper question is reproduced.
Perform a logical left shift of 2 places on 00101011. State the effect on the denary value.
Perform a logical right shift of 3 places on 11001000. State the effect on the denary value.
Describe what happens to the bits in a register during a logical left shift of one place.
01011010 is shifted right 2 places. (a) Give the result in binary and denary. (b) Explain why the answer is not exactly 90 ÷ 4.
The value 10010110 is shifted left 1 place to multiply it by 2. Give the result and explain why it is not correct.
State the shift needed to change 00001100 into 00110000 and the effect on the number.
Answer key and marking notes
- Result 10101100.
- The value is multiplied by 4 (43 becomes 172).
- Result 00011001.
- The value is divided by 8 (200 becomes 25).
- Every bit moves one place to the left and the most significant bit is lost.
- A 0 is shifted in at the right-hand (least significant) end.
- (a) 00010110 = 22.
- (b) 90 ÷ 4 = 22.5.
- A 1 (the bit with place value 2) was shifted out and lost, so the remainder is lost.
- Result 00101100 (44).
- 150 × 2 = 300, which is too big for 8 bits.
- The most significant bit, a 1 worth 128, was shifted out and lost.
- A logical left shift of 2 places.
- The number is multiplied by 4 (12 becomes 48).
6 multiple-choice questions on this lesson
From the topic question bank. Assign them in the app for a marked score in your gradebook, or run the topic as a class game.
During a logical shift, what happens to the bits that move off the end of the register, and what fills the empty places?
- AThey are lost, and the empty places are filled with 0s
- BThey wrap round to the other end, so nothing is lost
- CThey are lost, and the empty places are filled with 1s
- DThey move into the next register, and the empty places are filled with 0s
What is 00010011 after a logical left shift of 2 places?
- A
01001100 - B
00000100 - C
00100110 - D
01001111
What is 11010100 after a logical right shift of 2 places?
- A
00110101 - B
01010000 - C
11110101 - D
01101010
A positive integer is stored in an 8-bit register. What is the effect of a logical right shift of 3 places, if no 1s are lost?
- AThe number is divided by 8
- BThe number is divided by 3
- CThe number is multiplied by 8
- DThe number is reduced by 3
10011001 (153) is given a logical right shift of 1 place. What is the denary value of the result?
- A76
- B76.5
- C77
- D306
01011000 (88) is given a logical left shift of 2 places in an 8-bit register. What is the result?
- A
01100000, which is 96 - B
101100000, which is 352 - C
00010110, which is 22 - D
01100001, which is 97
Quiz key
In a logical shift the bits that move out of the register are lost and zeros are shifted in at the other end. Wrapping round is a rotation, not a logical shift. Filling with 1s would change the value incorrectly. The bits are not saved in another register.
Shifting 00010011 left 2 places gives 01001100: 19 × 4 = 76. 00000100 shifts the wrong way (right 2). 00100110 shifts only 1 place (38). 01001111 fills the gaps with 1s instead of 0s.
Moving every bit 2 places right and filling with 0s gives 00110101: 212 ÷ 4 = 53. The two lost bits were 0s, so the division is exact. 01010000 is a left shift. 11110101 fills the left with 1s. 01101010 is a shift of only 1 place.
Each place right divides by 2, so 3 places divide by 2 × 2 × 2 = 8. Dividing by 3 confuses the number of places with the factor. A left shift multiplies, not a right shift. A shift scales the number; it does not subtract from it.
The result is 01001100 = 76. The rightmost 1 is lost, so the answer is 153 ÷ 2 rounded down, not exactly 76.5; an integer register cannot store 0.5. 77 would need rounding up, which a shift does not do. 306 is the effect of a left shift.
The bits move 2 places left; the leading 0 and a 1 fall off and two 0s enter on the right, giving 01100000 = 96. Because a 1 was lost, the result is not 88 × 4 = 352, which would need 9 bits. 00010110 is a right shift (22). 01100001 brings a 1 in on the right, which a logical shift never does.
What to project
The student lesson embeds these tabs. Open them full screen on the projector; every slider has a drag handle on the stage.
Slides for this lesson
A projectable deck for every pack is on the way. Until then, present the student lesson full screen: its sections, figure and lab tabs follow the same order as the plan above.