GCSE · Computer Science · AQA · Spec 8525
Uses of binary shifts
A computer can multiply a number by 8 without doing a single sum. It just slides the bits along. Here's how that works, and when it doesn't.
Computer Science · Binary shifts
Slide the bits and watch the number
This byte holds 00001100, which is 12. Move every bit one place to the LEFT so the pattern becomes 00011000: tap the two 1s off, then tap on the two bits just to their left. Watch the denary number. Then build 00001100 again and move every bit one place to the RIGHT instead, to get 00000110.
Computer Science · Binary shifts
One number, six shifts
Each row shifts the SAME starting number, 00010100 (20), by a different amount. Step through and hunt for the pattern.
Before you step on: if one place left doubles 20, what will three places left do?
| Shift | 8-bit pattern | Denary | Effect on 20 |
|---|---|---|---|
| start | 00010100 | 20 | - |
Output
Step 1: Our starting number: 16 + 4 = 20.
Step through with Next. Say the denary value out loud before each row appears.
Where shifts are useful
Can a shift do this job?
Put each calculation where it belongs. If it's a shift, work out how many places.
Still to sort
Left shift (0)
Multiplying by a power of 2.
Where the line is: Multiplying by 2, 4, 8, 16… is a left shift. Multiplying by anything else isn't a single shift at all.
Right shift (0)
Dividing by a power of 2.
Where the line is: Dividing by 2, 4, 8, 16… is a right shift. It's the direction that tells multiply from divide.
Not a single shift (0)
The number isn't a power of 2.
Where the line is: Each place is exactly × 2 or ÷ 2, so the only jumps a shift can make are 2, 4, 8, 16… Anything in between can't be reached.
A shift can only multiply or divide by 2, 4, 8, 16 and so on: the powers of 2. Your call on each one.
WHAT YOU'VE LEARNED
A quick recap of today's lesson.
Slide every bit one place and the number doubles or halves. No sums needed.
What you need to know
- A binary shift slides every bit the same number of places, either left or right.
- Each binary place is worth twice the place to its right: 1, 2, 4, 8, 16 and so on.
- So one place left doubles the number, and one place right halves it.
Have a goYour mate shifts 00000111 (that's 7) one place left, gets 00001110 and announces, "Easy. It's 70 now." What is it really?
14. It doubled.
One place left multiplies by 2 in binary. Your mate used the denary 'stick a 0 on the end' habit, which only gives × 10 when places go up in tens.
- Shifting left multiplies by a power of 2: 1 place is × 2, 2 places is × 4, 3 places is × 8.
- Shifting right divides by a power of 2 in the same pattern: ÷ 2, then ÷ 4, then ÷ 8.
Have a goYou want to multiply a number by 64 with one shift. Which way do you shift, and how many places?
Left, 6 places.
64 = 2 × 2 × 2 × 2 × 2 × 2, which is 2 to the power 6. Shifting 64 places would mix up the multiplier with the number of places.
- In a logical shift, the empty places are always filled with 0s.
- Any bit pushed past the end of the 8 bits is lost. It never wraps round to the other end.
Have a goShift 10000001 one place right. Which bit is lost, and what is the new 8-bit pattern?
The 1 on the far right is lost: 01000000.
A 0 fills the gap on the left and the right-hand 1 falls off the end. It doesn't wrap round, so the pattern isn't 11000000.
- The result is still exactly 8 bits long. Nothing gets tacked on the end.
- That's the use of a shift: quick multiplication and division by powers of 2, with no sums.
- Only powers of 2, mind. × 10, × 3 or ÷ 6 can't be done with one shift.
The big picture
A binary shift moves every bit the same number of places left or right. In a logical shift, 0s fill the empty places and any bit pushed past the end of the 8 bits is lost. Each binary place is worth twice the one to its right, so one place left multiplies by 2 and one place right divides by 2; n places multiplies or divides by 2 to the power n. So shifts are used for quick multiplication and division by powers of 2, and only powers of 2: × 10 or × 3 can't be done with one shift.
Key points
Worked example
Problem
Apply a logical right shift of 3 places to 01101000. What calculation has the shift done?
⚠ Watch out
Writing the answer with the wrong number of bits. A shift doesn't add a 0 on the end the way denary × 10 does: the pattern stays 8 bits long, with 0s filling the gap at one end and bits dropping off the other.
Memory hook
Left Lifts, Right Reduces: every place you slide is one more × 2 or ÷ 2.
Check yourself
Cover the page. Why does one place left double a number? Which way, and how far, would you shift to divide by 16? Why can't one shift multiply by 5?
Flashcards
(9)What is a binary shift?
What does a left shift of 1 place do to a number?
What does a right shift of 1 place do to a number?
What does shifting n places do to a number?
Why does one place left double a binary number?
In a logical shift, what fills the empty places?
What happens to a bit pushed past the end of the 8 bits?
Which calculations can a single binary shift do?
Why isn't a binary left shift × 10, like adding a 0 in denary?
Tap any card to flip it, or use Study as deck to go through them one at a time. In the full lesson these run as a spaced-repetition deck — you rate each card Hard, Good or Easy and the tricky ones keep coming back until they stick.
Learning with Lightbulb is opening soon
You can use this lesson now. Join the waitlist and we'll let you know when the full Lightbulb experience is ready.
Keep me postedMore AQA GCSE Computer Science topics
How this lesson was checked. This AQA GCSE Computer Science (specification 8525)lesson was published through Lightbulb Learning's human-designed editorial process — the educational standards, accuracy rules and publication checks it must pass were authored and approved by Philip Halpin. It passed subject-specific assessment, automated educational checks and technical publication verification before going live (publication checks completed 28 October 2026). Published pages are monitored, human spot-checking is ongoing across the lesson library, and anything found wrong is corrected or withdrawn. How our lessons are made and checked. Spotted a mistake? Email hello@lightbulblearning.co and we'll review it.