Cambridge O Level Computer Science · Syllabus 2210 · Data Representation
Logical Shift
What is Logical Shift?
A logical shift moves every bit in a register a stated number of places left or right; bits shifted out of the end of the register are lost and zeros are shifted in at the opposite end, multiplying or dividing a positive integer by two per place while no significant bits are lost.
This definition is part of the Data Representation chapter in Cambridge O Level Computer Science.
Logical Shift in context
A logical shift moves every bit in a register a fixed number of places left or right. Bits that are shifted off the end of the register are lost, and zeros are shifted in at the opposite end. For a positive binary integer, each place of a left shift multiplies the value by two and each place of a right shift divides it by two — but only for as long as no significant bits fall off the end. A logical shift is not a rotation: the bits that leave do not reappear on the other side.
Common mistakes with Logical Shift
- M6. "A logical shift wraps the discarded bits around." Why it fails That describes a rotation, which is a different operation. In a logical shift the bits leaving the register are lost. Correct model Bits shifted out are lost; zeros are shifted in at the opposite end. Exam-safe "Bits shifted out of the end of the register are lost and zeros are shifted in at the opposite end." Test yourselfHideQ. Shift 10000001 left one place. What is the result?A. 00000010. The leading 1 is lost, not moved to the right-hand end.

