GCSE · Computer Science · OCR · Spec J277
Binary shifts
Add a 0 to a denary number and it becomes ten times bigger. Binary has the same trick, for 2.
Computer Science · Binary shifts
Shift the bits, watch the value
The grid starts as 7 (00000111). Shift it three places left by toggling the bits so the 1s sit three columns further left and 0s fill the gaps: 00111000. Read the new value. Then try 8 (00001000) and shift it two places right: 00000010.
Predict, then check
Right shifts divide. But what happens when the division does not come out exactly?
101 is 5 in decimal. It is shifted two places to the right. What do you think the answer is?
WHAT YOU'VE LEARNED
A quick recap of today's lesson.
Slide the bits along and the value doubles or halves.
What you need to know
- A binary shift moves every bit left or right by a set number of places.
- The gaps left behind are filled with 0s.
- Each place left doubles the value. Each place right halves it.
Have a goSam says 11 shifted one place left gives 4, 'because you've just added a place'. Is Sam right? What do you get?
No. 11 (3) becomes 110, which is 6.
One place left doubles the value (3 × 2 = 6). It does not add 1.
- So n places is a factor of 2 to the power n: two places is ×4 or ÷4, three is ×8 or ÷8, four is ×16 or ÷16.
Have a goWrite 10 (2 in decimal) shifted two places left, then say its decimal value.
1000, which is 8.
Two places left means ×4, and 2 × 4 = 8. The 0s fill the gaps on the right.
- To check a shift, convert the bits before and after to decimal and compare.
- With whole numbers, a right shift truncates: bits that fall off the end are lost, so 101 shifted right twice gives 1.
Have a goShift 11 (3 in decimal) one place to the right. Will the answer be 1.5?
No: it is 1.
One place right is ÷2, but with whole numbers the remainder falls off the end and is truncated, so 1.5 becomes 1.
- Overflow is when a result is too large to be represented in the bits available.
- Fewer bits save storage space but risk overflow. More bits avoid overflow but need more storage.
The big picture
Shifting a binary number left or right moves every bit along. Each place left doubles the value and each place right halves it, so n places is a factor of 2 to the power n. With whole numbers a right shift truncates the remainder, and a left shift can overflow the bits you have.
Key points
Worked example
Problem
Shift 00010110 three places to the left. Show the new binary pattern, then check it in decimal.
⚠ Watch out
Thinking a shift of n places multiplies or divides by n. Each place is a factor of 2, so three places is ×8 or ÷8, not ×3 or ÷3.
Memory hook
Left = bigger, right = smaller, and each place is a double or a halve. The shift count is how many times, never the number you multiply by.
Check yourself
Shift 00000101 three places to the left. What binary pattern do you get, and what decimal value is it?
Flashcards
(12)In your own words, what does a binary shift do?
What fills the gaps left by a shift?
What does a left shift of one place do to the value?
What does a right shift of one place do to the value?
Two places left or right: what is the factor?
Three places left or right: what is the factor?
Does a shift of n places multiply by n?
How do you check a binary shift?
Why does a right shift on whole numbers lose information?
What is overflow?
Why might you choose fewer bits to store numbers?
Why might you choose more bits to store numbers?
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 OCR GCSE Computer Science topics
- ASCII
- Binary representation of characters
- Binary to hexadecimal conversion
- Bitmap images: pixels and binary
- Cache (primary storage context)
- Character set
- Colour depth and resolution
- Data capacity calculations
- Denary to binary conversion (8-bit)
- Denary to hexadecimal conversion
- Image metadata
- Larger units: KB, MB, GB, TB, PB
How this lesson was checked. This OCR GCSE Computer Science (specification J277)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 7 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.