Logical binary shifts Cambridge IGCSE Computer Science (9–1) revision
Not started
Learn it
In plain words
A logical shift slides every bit in a register a number of places to the left or to the right. Bits that fall off the end are lost, and zeros are fed in at the other end.
Because each place in binary is worth double the one to its right, shifting is a fast way to multiply or divide by 2.
5 things to know
- A shift left by one place multiplies the number by 2. Two places multiply it by 4, three places by 8.
- A shift right by one place divides the number by 2. Two places divide it by 4, three places by 8.
- Bits shifted out of the register are lost. Zeros fill the empty places at the opposite end.
- If a 1 is shifted out at the left (the most significant bit), the result is no longer the correct multiple.
- If a 1 is shifted out at the right (the least significant bit), the result is rounded down: the remainder is lost.
Worked example
Perform a logical left shift of two places on 00010110, and state the effect.
- Move every bit two places to the left. The two leftmost bits (both 0) drop off.
- Fill the two empty places on the right with zeros: 01011000.
- The value has been multiplied by 4: 22 has become 88.
Worked example
The number 00000111 is shifted one place to the right. Why is the result not exactly half?
- The result is 00000011, which is 3.
- Half of 7 is 3.5. The 1 that was shifted out was the bit worth 1, and it has been lost.
- So the answer is rounded down to 3.
Tips and tricks
- State the effect as a number: "multiplied by 8", not just "it gets bigger".
- Always count the bits in your answer. A shift never changes the length of the register.
It lands in your notebook with its questions as flashcards.
Logical binary shifts: 5 questions and answers
These are the quiz’s questions. Do the quiz first, then come back here for the ones that got you.
What is 00001100 after a logical shift of two places to the left?
Each bit moves two places left, and two zeros come in on the right. 12 becomes 48.
A logical shift of three places to the left multiplies a number by:
2 × 2 × 2 = 8.
What is 01100000 after a logical shift of four places to the right?
96 ÷ 16 = 6.
What happens to bits that are shifted out of the end of a register?
They are lost, and zeros are shifted in at the opposite end.
The 8-bit number 10100000 is shifted one place to the left. What is the result, and what has gone wrong?Stretch
The leading 1 falls off the end. 160 doubled is 320, which cannot fit in 8 bits.
Quiz
5 questions
Tap an answer and you’ll see straight away whether it’s right, and why.
Worksheet
3 questions, 6 marks. Write your answers on paper, then check them.
Logical binary shifts
Cambridge IGCSE Computer Science (9–1) 0984 · 6 marks · papermunch.org
Name ______________________________ Date ______________
Perform a logical right shift of two places on 01011100, and state the effect on its value.[2]
Show answerHide answer
00010111. The value is divided by 4 (92 becomes 23).
The number 00010011 is shifted three places to the left. Give the result in binary and in denary.[2]
Show answerHide answer
10011000, which is 152. (19 × 8.)
The number 11000001 is shifted one place to the left. Explain why the result is not double the original value.[2]
Show answerHide answer
The leftmost 1 is shifted out of the register and lost. Double the value (386) is too large to store in 8 bits.
Answers: Logical binary shifts
- 1. 00010111. The value is divided by 4 (92 becomes 23).
- 2. 10011000, which is 152. (19 × 8.)
- 3. The leftmost 1 is shifted out of the register and lost. Double the value (386) is too large to store in 8 bits.



