← IGCSE Computer Science Paper 1

Multiple shifts

Shifting by n places moves every bit n positions, losing n bits at one end and adding n zeros at the other. Shift all 8 bits out and you get 00000000.

Understanding Multiple shifts in IGCSE Computer Science Paper 1

What it does: 00000101 shifted left 3 places gives 00101000: the 1s move 3 places left and three 0s fill the right-hand end. Every bit moves 8 places and is lost, so only the added zeros remain: 00000000. A logical shift does not wrap bits around. Bits that leave the register are lost and zeros fill the gaps. Right shift by 2: 11010110 becomes 00110101. The last two bits (1 and 0) fall off the right end and two 0s enter on the left. Check: dropping the first two bits leaves 110011, and adding 00 on the right gives 11001100. This answer is correct, so no fix is needed.

Common mistakes: In a left shift the bits that are lost come off the left, so the new zeros are added on the right, not the left. It should read: Add 2 zeros on right: 00110100. 00101101 is the result of shifting right by only 2 places. Shifting right by 3 moves every bit 3 places, giving 00010110.

Class: _____________________  ·  Name: _____________________  ·  Date: _________

Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.

This module's key terms are also in a printable crossword (Modules 18–27) and word search (Modules 3–27).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
Logical left shift 00001011 by 2 places. What is the result?
0010110000000010
Matches
10110011 shifted left 2 places = 11001100
↓
The two leftmost bits (10) were lost, but the 2 bits added on the right were 1s in the wrong places. Added bits must be 0s, so the answer is 11001100 only if the shift is done correctly: the correct result is 11001100, so the error is keeping the lost bits instead of dropping them.
Applying
Meanings
Term
shift n places
Meaning
Shifting by n places moves every bit n positions, losing n bits at one end and adding n zeros at the other. Shift all 8 bits out and you get 00000000.
Practice
LEFT SHIFT 2: 00110101 -> 11010100
Testing
Gaps
Left shift 2: 00000111 becomes
Check Answer
Spots
3Lose 2 leftmost bits: 00
4Add 2 zeros on left: 00110100

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Sperm Whale' badge — Deep Sea Champion, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. Logical left shift 00001011 by 2 places. What is the result?
A. 00000010
B. 00101100 ✓
Move every bit 2 places left. The two leftmost 0s are lost and 00 is added on the right. 00000010 is what a right shift by 2 gives.
2. Logical right shift 11010000 by 3 places. What is the result?
A. 00011010 ✓
B. 01101000
Move every bit 3 places right. The three rightmost bits are lost and 000 is added on the left. 01101000 is only a shift by 1 place.
3. Logical left shift 10110101 by 3 places. What is the result?
A. 10101000 ✓
B. 00010110
The three leftmost bits (101) are lost and 000 is added on the right. 00010110 is what a right shift by 3 gives.
4. A left shift by 3 places on an 8-bit value does what?
A. Loses 3 bits from the left end and adds 3 zeros on the right ✓
B. Loses 3 bits from the right end and adds 3 zeros on the left
A left shift moves bits towards the left. Bits fall off the left end and zeros fill in on the right.
5. Logical right shift 00000011 by 2 places. What is the result?
A. 00000011
B. 00000000 ✓
Both 1s are in the two rightmost positions, so they are shifted out and lost. Only zeros remain.

Match the Pairs

00001011 shifted left 3 places → 01011000: every bit moves 3 places left, the 3 leftmost 0s are lost and 3 zeros are added on the right
11010110 shifted right 2 places → 00110101: every bit moves 2 places right, the 2 rightmost bits (10) are lost and 2 zeros are added on the left
Shifting an 8-bit number left by 3 places moves each bit 3 positions and adds three 0s at the right-hand end → 00000101 -> 00101000
Shifting all 8 bits out of an 8-bit register leaves only zeros → 11111111 shifted right 8 places = 00000000
10110011 shifted left 2 places = 11001100 → The two leftmost bits (10) were lost, but the 2 bits added on the right were 1s in the wrong places. Added bits must be 0s, so the answer is 11001100 only if the shift is done correctly: the correct result is 11001100, so the error is keeping the lost bits instead of dropping them.
01101100 shifted right 3 places = 11101101 → Zeros must be added on the left, not 1s, and the 3 rightmost bits are lost. The correct result is 00001101.

Key Term

shift n places
Shifting by n places moves every bit n positions, losing n bits at one end and adding n zeros at the other. Shift all 8 bits out and you get 00000000.

Fill in the Blanks

1. Left shift 2: 00000111 becomes 00011100
Hint: Type the 8-bit result after every bit moves two places left and two zeros fill the right.
2. Left shift by 3 adds 3 zeros on the right
Hint: Type the number of zeros added, which matches the number of places shifted.
3. Right shift 2: 10110100 becomes 00101101
Hint: Type the direction of the shift. Bits move that way and zeros appear at the left.
4. Left shift 8: 10110011 becomes 00000000
Hint: Type how many places you must shift to push every bit out of an 8-bit register.
5. Right shift 3: 00011000 becomes 00000011
Hint: Type the 8-bit result after the last three bits are lost and zeros are added on the left.

Spot the Error

Question 1
A Value: 00001101
B Operation: left shift by 2
C Lose 2 leftmost bits: 00
D Add 2 zeros on left: 00110100
Line D — In a left shift the bits that are lost come off the left, so the new zeros are added on the right, not the left. It should read: Add 2 zeros on right: 00110100.
Question 2
A Start: 10110100
B Right shift 3: 00101101
C Lost 3 bits: 100 (from right)
Line B — 00101101 is the result of shifting right by only 2 places. Shifting right by 3 moves every bit 3 places, giving 00010110.
Question 3
A Right shift by 3 places
B Start: 00010111
C Lose 3 bits from the left: 000
D Result: 10111000
Line A — The working loses bits from the left and the result 10111000 is a left shift. The first line should say Left shift by 3 places.
Question 4
A Start: 01101011
B Left shift by 4 places
C All 8 bits are lost
D Result: 00000000
Line B — Only a shift of 8 places pushes all 8 bits out of an 8-bit register. A shift by 4 would leave 4 of the original bits behind. It should say Left shift by 8 places.
Question 5
A Start: 11001110
B Right shift by 2 places
C Result: 11110011
D Lost bits: 10
Line C — A logical right shift adds zeros on the left, never ones. Shifting 11001110 right by 2 gives 00110011.

Student with a class code? Join your class →