GCSE · Computer Science · Eduqas · Spec C500QS

Arithmetic shift functions

Slide a binary number two places left and it quadruples, though nothing was multiplied. So what goes wrong when a 1 falls off the end?

Computer Science · Arithmetic shifts

Slide the bits, watch the number

16 + 4 + 2 = 22

8-bit binary 00010110 = 22 in denary

Unsigned value22
Click a bit to flip it between 0 and 1.

The row starts as 00010110, which reads as 22. Shift it left 2 places in your head: every bit moves two columns left and two 0s fill the gap on the right. Now click the bits into your answer and read the new value. Then try 1 place and 3 places.

Exam line: Shifting an unsigned number left n places multiplies it by 2ⁿ, provided no 1 bit is shifted out of the left-hand end.
Watch out: Now set 01100000 (96) and shift it left 2 places. Your row can only hold 8 bits, so a 1 falls off the end and the readout is not 96 × 4.

Computer Science · Left shifts, two readings

One shift, two tests

Each row is an 8-bit pattern shifted left. Tick every statement that is true, then check. Read each pattern two ways: as unsigned, and as two's complement.

00010110 left 2
01100000 left 2
11110000 left 2
01000000 left 1

Computer Science · Right arithmetic shift

Shift 10010000 right 2 places

Shift the 8-bit pattern 10010000 right 2 places with an arithmetic shift. Two steps are missing: choose each one.

  1. Start with 10010000. Its leftmost bit, the sign bit, is 1.
  2. missing step
Which line is step 2?

Predict, then check

Right shifts halve each bit's place value. Decide before you look.

00010111 is 23. Shift it right 1 place. What number do the 8 bits show?

Computer Science · Apply it

Shift, read, explain

The 8-bit unsigned number 01110000 (112 in denary) is shifted left 2 places. (a) Write the result as an 8-bit binary number. [1] (b) Give the result in denary. [1] (c) State the number by which a left shift of 2 places normally multiplies a value. [1] (d) Explain why the result is not what (c) predicts for this number. [2] [5 marks]

0 words · your answer stays on this page and is not sent anywhere.

WHAT YOU'VE LEARNED

A quick recap of today's lesson.

Slide every bit sideways and the number doubles or halves, until the 8 boxes run out.

What you need to know

  • An arithmetic shift slides every bit left or right by a stated number of places, inside a fixed number of bits.
  • In a left shift, bits move towards the most significant end and the gaps at the right-hand end fill with 0s.
  • Have a goSam says shifting 00000110 left 2 places gives 00000001. Sam has slid the bits the wrong way. What is the real answer?

    00011000

    Left means towards the most significant end, with 0s filling the gaps on the right. Sam's answer has the bits moving the opposite way.

  • Bits pushed beyond the most significant end of the fixed number of bits are shifted out and lost.
  • Shifting left doubles each bit's place value, so n places left multiplies an unsigned number by 2ⁿ, provided no 1 is shifted out.
  • The places shifted set the power of two: 1 place gives 2, 2 gives 4, 3 gives 8, and n gives 2ⁿ.
  • Have a go00000011 (3) is shifted left and becomes 00110000 with no 1 lost. How many places was it shifted, and what is the new value?

    4 places, so × 16: 3 becomes 48

    Count how far the 1s moved: 4 places. n places multiplies by 2ⁿ, which is 2⁴ = 16, not by 4, and 3 × 16 = 48.

  • Push a 1 out of an unsigned number and the true answer no longer fits, so ×2ⁿ breaks.
  • Have a goPoor little 1 in 01000000 (64, unsigned) gets shoved 2 places left in an 8-box row. Where does it end up, and what do the boxes read?

    Off the end: 00000000, which reads 0

    Both places push the 1 past the most significant end, where it is shifted out and lost. ×4 would need 256, which does not fit in 8 bits.

  • For two's complement, a left shift is ×2ⁿ only when every shifted-out bit and the new sign bit match the original sign bit.
  • A right shift moves bits towards the least significant end, and bits pushed past the right-hand end are shifted out and lost.
  • On a right arithmetic shift, the sign bit is copied into every vacated place at the left, so the sign is preserved.
  • Right n places divides a positive number by 2ⁿ, exactly only when 0s alone are shifted out; a lost 1 loses the remainder.

The big picture

An arithmetic shift slides every bit of a fixed-width binary number left or right by a stated number of places. A left shift fills the right-hand gaps with 0s and loses any bits pushed past the left-hand end; it multiplies an unsigned number by 2ⁿ as long as no 1 is lost, and a two's complement number only when the shifted-out bits and new sign bit match the original sign bit. A right shift loses bits at the right-hand end and copies the sign bit into the gaps at the left; it divides a positive number by 2ⁿ exactly only when 0s alone are shifted out.

Key points

1Left shift: 0s fill the right; unsigned ×2ⁿ, provided no 1 is shifted out of the left-hand end.
2Right arithmetic shift: the sign bit is copied into the gaps at the left; bits shifted out at the right are lost.
3Places shifted set the power of two: 1 place is 2, 2 places 4, 3 places 8.
4Right shift of a positive number is exactly ÷2ⁿ only when 0s alone are shifted out; a lost 1 loses the remainder.
5After any shift, ask two things: which bits fell off, and did the sign bit change?

Worked example

Problem

Shift the 8-bit unsigned number 00001101 left 3 places. Give the result in binary and in denary, and say what the shift did to the value.

⚠ Watch out

Thinking every shift is exact. A left shift multiplies by 2ⁿ only while no 1 is lost (unsigned), or while every shifted-out bit and the new sign bit match the original sign bit (two's complement). A right shift copies the sign bit, and loses the remainder if a 1 goes.

🧠

Memory hook

Left: 0s in, times 2ⁿ. Right: the sign copied in, divide by 2ⁿ. Then always ask what fell off the end.

✓

Check yourself

Without looking back: shift 11001000 right 3 places with an arithmetic shift. Write the result, say what was copied into the gaps and why, and say whether any 1 bits were shifted out.

Flashcards

(11)
What is an arithmetic shift?
Moving every bit of a binary number a stated number of places left or right, within a fixed number of bits.
In a left arithmetic shift, what fills the vacated places?
0s, at the least significant (right-hand) end.
In a left shift, what happens to bits that move beyond the most significant end?
They are shifted out and lost.
Why does a left shift multiply an unsigned number by 2ⁿ?
Each place moved left doubles every bit's place value, so n places doubles it n times.
What does the number of places shifted set?
The power of two: 1 place is 2, 2 places 4, 3 places 8, n places 2ⁿ.
An unsigned left shift pushes a 1 out of the 8 bits. What goes wrong?
The result is no longer the original × 2ⁿ, because the true answer does not fit in the fixed number of bits.
Two's complement left shift: when is it ×2ⁿ, and when does it overflow?
×2ⁿ only when every bit shifted out and the new sign bit equal the original sign bit. If any differs, the result is wrong (overflow).
In a right arithmetic shift, which way do the bits move and what is lost?
Towards the least significant end; bits moved beyond the right-hand end are shifted out and lost.
In a right arithmetic shift, what fills the vacated places at the left?
Copies of the sign bit (the most significant bit), so the sign is preserved.
Why does a right shift halve a positive number's place values?
Each place moved right halves every bit's place value, so n places divides by 2ⁿ when only 0s are shifted out.
A right shift of a positive number shifts out a 1. What is the result?
Not the exact quotient: the remainder is lost and you get the whole-number part of the number ÷ 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 Eduqas GCSE Computer Science topics

See the full Eduqas Computer Science curriculum →

How this lesson was checked. This Eduqas GCSE Computer Science (specification C500QS)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 16 November 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.