GCSE · Computer Science · AQA · Spec 8525

Binary shifts

Slide every bit one place left and the number doubles. One place right and it halves. Easy — right up until a 1 falls off the end.

Computer Science · Binary shifts

Shift it yourself

8 + 4 + 1 = 13

8-bit binary 00001101 = 13 in denary

Denary13
Tap a bit to switch it between 0 and 1, and watch the denary value

This byte holds 00001101 — that's 13. Shift it LEFT one place by setting the bits to 00011010: every bit moves one column left and a 0 fills the gap on the right. Read the value: 26, double. Now set it back to 00001101 and shift RIGHT one place: 00000110. You get 6, not 6.5 — the 1 on the right-hand end had nowhere to go. Last one: set 10010000 (144) and shift left: 00100000 is only 32, because the top 1 fell off the left-hand end.

Exam line: Shift left one place and the value doubles; shift right one place and it halves, keeping only the whole-number part. If a 1 falls off either end, it's gone.
Watch out: Every gap gets a 0 — never a 1, and never the bit that fell off the other end.

Why shifting doubles

?

Reason it through

Why does moving every bit one place left double the number?

Link 1 of 4

First link · your turn

Read the column values in a byte from right to left: 1, 2, 4, 8, 16 … What's the pattern?

2
Locked — reveal the link above first
3
Locked — reveal the link above first
4
Locked — reveal the link above first

What gets lost

Where does the odd bit go?

An 8-bit register holds 00010111, which is 23. It is shifted right by 1 place.

Which is closest to what you think the register holds now?
How sure are you?

Where shifts can be used

Can one shift do this calculation?

Which single shift, if any, does each calculation?

Still to sort

A left shift can do this (0)

Multiplying by a power of 2.

Where the line is: Multiplying by 2ⁿ is a left shift of n places; multiplying by anything else isn't one shift at all.

A right shift can do this (0)

Dividing by a power of 2 (keeping the whole-number part).

Where the line is: Dividing by 2ⁿ is a right shift of n places; dividing by a number that isn't a power of 2 isn't one shift.

No single shift can do this (0)

The number isn't a power of 2.

Where the line is: Every shift multiplies or divides by 2 for each place, so it can only ever reach 2, 4, 8, 16 …

7 of 7 still to sort.

Sort each calculation. If one shift can do it, say which way and how many places.

Watch out: A left shift only gives the right answer if no 1 falls off the left-hand end of the 8 bits.

The written method

Fill in the missing steps

Apply a right shift of 2 places to the 8-bit number 01110110 and state the effect on its value.

  1. Write the 8-bit pattern: 01110110 = 64 + 32 + 16 + 4 + 2 = 118.
  2. missing step
Which line is step 2?

Exam line: Write the pattern, move every bit, fill the gaps with 0s, drop what falls off, convert, then say what happened to the value.

WHAT YOU'VE LEARNED

A quick recap of today's lesson.

Move every bit left or right: the number doubles or halves — until a bit falls off the edge

What you need to know

  • A binary shift moves every bit in a binary number the same number of places, either left or right.
  • You work with at most 8 bits here — one byte, which holds the whole numbers 0 to 255.
  • Shift left one place and the value doubles; shift left n places and it's multiplied by 2ⁿ.
  • Have a go00000011 is 3. Shift it left 2 places. What's the new value?

    12 (00001100)

    Two places left is ×2² = ×4, not ×2 — each extra place doubles it again.

  • That only holds while no 1 falls off the left-hand end — lose a 1 and the answer is wrong.
  • Going the other way, one place right halves the value, and n places right divides it by 2ⁿ.
  • Bits pushed off the right-hand end are lost, so the remainder goes and only the whole-number part is kept.
  • Have a goSam insists 00001001 (9) shifted right one place is 4.5, "because halving is halving". What does the register actually hold?

    4 (00000100)

    The 1 in the units column drops off the end and is lost, so the register keeps only the whole-number part — there's no column for a half.

  • Every gap a shift leaves is filled with a 0, in both directions — that's what makes it a logical shift.
  • Nothing wraps round: a bit pushed past either end of the register is gone for good.
  • So one shift can only multiply or divide by a power of 2: 2, 4, 8, 16, 32 and so on.
  • Have a goWhich of these can ONE shift do: ×32, ×12 or ÷10?

    ×32 — a left shift of 5 places.

    32 is 2⁵. 12 and 10 aren't powers of 2, so no single shift lands on them, however many places you try.

  • That makes a shift a quick way for a computer to multiply or divide by a power of 2.

The big picture

A binary shift moves every bit in a binary number the same number of places left or right, and fills the gaps it leaves with 0s. Shifting left n places multiplies the value by 2ⁿ, as long as no 1 is pushed off the left-hand end. Shifting right n places divides it by 2ⁿ, and any bits pushed off the right-hand end are lost, so only the whole-number part is kept. In an 8-bit register nothing wraps round: a bit pushed past either end is gone for good.

Key points

1Left shift by n places = × 2ⁿ, provided no 1 is pushed off the left-hand end.
2Right shift by n places = ÷ 2ⁿ, keeping only the whole-number part — the remainder is lost, not rounded.
3The empty places are always filled with 0s, whichever way you shift.
4Bits pushed past either end of the 8-bit register are discarded and can't be recovered: a left shift loses the leftmost (most significant) bits, a right shift the rightmost (least significant). Nothing wraps round.
5A single shift can only multiply or divide by a power of 2, which is why computers use it as a quick shortcut for exactly those calculations.

Worked example

Problem

The 8-bit binary value 00001100 (12) is shifted left by 2 places. What is the result in binary and in denary?

⚠ Watch out

Thinking a right shift rounds to the nearest whole number. It doesn't round at all — the bit that drops off is simply lost. So 00000101 (5) shifted right by 1 gives 00000010 (2), not 3.

🧠

Memory hook

Think of the byte as a conveyor belt of 8 slots: slide it left and the number doubles, slide it right and it halves — but anything that falls off the belt is gone forever, and empty slots only ever get a 0.

✓

Check yourself

Without looking: shift 00000111 (7) left by 3 places in an 8-bit register. What's the new value, and did any 1s fall off the end?

Flashcards

(12)
What is a binary shift?
Moving every bit in a binary number the same number of places to the left or to the right.
A left shift by n places does what to the value?
Multiplies it by 2ⁿ — as long as no 1 is pushed off the left-hand end.
A right shift by n places does what to the value?
Divides it by 2ⁿ, keeping only the whole-number part. Any remainder is lost.
What fills the empty places after a logical shift?
0s — on the right after a left shift, on the left after a right shift.
What happens to a bit pushed past the end of an 8-bit register?
It's discarded and can't be recovered. It doesn't wrap round to the other end.
Which shift divides a number by 4?
A right shift by 2 places (4 = 2²).
How many places left do you shift to multiply by 16?
4 places (16 = 2⁴).
Why can't a single shift multiply a number by 6?
6 isn't a power of 2. One shift only ever multiplies or divides by 2, 4, 8, 16 …
10000000 (128) is shifted left 1 place in an 8-bit register. Result?
00000000 = 0. The only 1 falls off the left-hand end. The true answer, 256, won't fit in 8 bits.
Shift right n places, then left n places. Do you always get the start number back?
Only if every bit shifted out was a 0. 00000101 (5) → right 1 → 00000010 → left 1 → 00000100 (4), not 5.
00001111 (15) is shifted right 2 places. Result?
00000011 = 3. 15 ÷ 4 is 3 remainder 3, and the remainder is lost with the two bits that dropped off.
Where can a computer use a binary shift instead of doing the arithmetic?
Whenever it needs to multiply or divide by a power of 2 — a shift is a quick way to do it.

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