1.1 · Lesson 5 of 6
Logical binary shifts
Syllabus 1.1.5
What this lesson covers
- Perform logical left and right shifts and describe their effect
Key vocabulary
- Logical shift
- Moving every bit in a register a set number of places left or right, filling the empty places with 0s.
- Left shift
- Moves bits towards the MSB. Each place multiplies a positive number by 2.
- Right shift
- Moves bits towards the LSB. Each place divides a positive number by 2.
- Most significant bit (MSB)
- The leftmost bit, with the highest place value. It's lost first in a left shift.
- Least significant bit (LSB)
- The rightmost bit, with the lowest place value. It's lost first in a right shift.
- Register
- A small, fixed-size store in the CPU. Bits shifted past its ends are lost.
- Loss of precision
- When a 1 is shifted out of the register, so the result is no longer exactly right.
Check your learning
- Quick check: 4 questions
- Key vocabulary test: 7 terms
- Activity 1: Perform the shift · 8 questions
- Activity 2: Effect of a shift · 6 questions
- Activity 3: Shifts quiz · 8 questions