GCSE · Computer Science · AQA · Spec 8525

Uses of binary shifts

A computer can multiply a number by 8 without doing any multiplying at all. It just slides the bits along. Here's how, and when it works.

Computer Science · Binary shifts

Slide the bits and watch the number

8 + 4 = 12

8-bit binary 00001100 = 12 in denary

Denary12
predict first: what will 12 become?

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.

Watch out: When the bits move, the gap they leave behind gets a 0. You still have exactly 8 bits: nothing is added on the end.

Why it works

What did the shift actually do?

00000101 is 5. Move every bit one place to the left and you get 00001010. It looks as if a 0 has been stuck on the end.

Which is closest to what you think the shift has done to the number?
How sure are you?

Computer Science · Binary shifts

One number, six shifts

Each row shifts the SAME starting number, 00010100 (20), by a different amount. Step through and look for the pattern.

Before you step on: if one place left doubles 20, what will three places left do?

Shift8-bit patternDenaryEffect on 20
start0001010020-

Output

 

Step 1: Our starting number: 16 + 4 = 20.

1 / 7

Step through with Next. Say the denary value out loud before each row appears.

Step 1 of 7: Our starting number: 16 + 4 = 20..

Watch out: The last row loses a 1 off the right-hand end. A shift only divides exactly when every bit that falls off is a 0.

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.

7 of 7 still to sort.

A shift can only multiply or divide by 2, 4, 8, 16 and so on: the powers of 2. Decide for each calculation.

Your turn

Apply a shift yourself

Apply a logical left shift of 2 places to the 8-bit number 00110101. Give the answer in binary, then check it in denary.

  1. Left 2 places means every bit moves 2 places towards the left-hand end.
  2. missing step
Which line is step 2?

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 moves every bit in a binary number the same number of places, either left or right.
  • In a logical shift, the empty places are filled with 0s, and any bit pushed past the end of the 8 bits is lost.
  • 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: 1 place is ÷ 2, 2 places is ÷ 4, 3 places is ÷ 8.
  • Binary shifts can be used to do simple multiplication and division by powers of 2.

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

1Each binary column is worth twice the column to its right, which is why one place left doubles a number and one place right halves it.
2n places multiplies or divides by 2 to the power n.
3A single shift can only multiply or divide by 2, 4, 8, 16 and so on. It can't do × 10 or × 3.
4The answer still has 8 bits: 0s fill the gap at one end and bits drop off the other.
5A shift only multiplies or divides exactly while every bit that falls off the end is a 0.

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?
Moving every bit in a binary number the same number of places to the left or to the right.
What does a left shift of 1 place do to a number?
Multiplies it by 2.
What does a right shift of 1 place do to a number?
Divides it by 2.
What does shifting n places do to a number?
Left: multiplies it by 2 to the power n. Right: divides it by 2 to the power n. (3 places is × 8 or ÷ 8.)
Why does one place left double a binary number?
Each binary column is worth twice the column to its right, so every bit ends up worth twice as much.
In a logical shift, what fills the empty places?
0s.
What happens to a bit pushed past the end of the 8 bits?
It is lost.
Which calculations can a single binary shift do?
Multiplying or dividing by a power of 2 (2, 4, 8, 16…). Not × 10, × 3 or × 6.
Why isn't a binary left shift × 10, like adding a 0 in denary?
Denary columns go up in tens; binary columns only go up in twos. So one place left is × 2.

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 posted

More AQA GCSE Computer Science topics

See the full AQA Computer Science curriculum →

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 29 September 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.