8-Bit Binary Shifts Calculator
Toggle 8-bit binary numbers to visualize logical shifts in real time. See exactly how shifting left multiplies by powers of two (2, 4, 8), how shifting right divides, and why bits falling off the register cause overflow or loss of precision.
Bits pushed past bit 7 (weight 128) fall off the left end and are permanently lost.
Empty slots on the right-hand side are always replaced with 0s.
No active 1s fell off either end. The logical left shift of 2 places exactly equals 6 × 4 = 24.
How Binary Shifts Work in GCSE Computer Science
A binary shift moves every digit in an 8-bit register one or more positions to the left or right. The GCSE specification tests logical shifts on unsigned 8-bit whole numbers (0 to 255).
Logical Left Shift (← Multiply)
Moving all bits to the left multiplies the number by 2ⁿ, where n is the number of places shifted:
- • 1 place left: Multiplies by 2¹ = 2 (doubles the value)
- • 2 places left: Multiplies by 2² = 4 (quadruples the value)
- • 3 places left: Multiplies by 2³ = 8
Empty spaces created on the right are filled with 0s.
Logical Right Shift (→ Divide)
Moving all bits to the right divides the number by 2ⁿ, where n is the number of places shifted:
- • 1 place right: Divides by 2¹ = 2 (halves the value)
- • 2 places right: Divides by 2² = 4 (quarters the value)
- • 3 places right: Divides by 2³ = 8
Empty spaces created on the left are filled with 0s.
Why Do Processors Use Shifts Instead of Normal Multiplication?
In CPU hardware, arithmetic multiplication and division are complex operations that require multiple clock cycles and specialized logic circuits.
A binary shift, by contrast, physically shifts the electrons across parallel wires or register flip-flops in a single clock cycle. When a compiler notices code multiplying or dividing by powers of two (such as x * 4 or y // 8), it automatically optimizes the machine code instruction to a fast logical shift.
The Two Mistakes That Cost Marks on GCSE Exams
Mistake 1: Forgetting Left-Shift Overflow
A left shift doubles the number only while no 1s fall off the Most Significant Bit (MSB, bit 7). For example:
Original: 1100 0000 = 192 (denary)
Left shift 1 place: 1000 0000 = 128 (denary)
Students often write 192 × 2 = 384. But an 8-bit register cannot store 384! The leftmost 1 fell off into oblivion. In an exam, state the actual stored 8-bit pattern (10000000 / 128) and identify that an overflow error occurred.
Mistake 2: Assuming Lost Bits "Wrap Around" (Rotate)
When bits fall off either end during a logical shift, they are permanently destroyed. They do not wrap around to fill the empty slots at the other end. That is a circular rotate operation, which is explicitly out of scope for GCSE. The vacant positions are always filled with zeros.
Prepare for Every Specification Point
Track your understanding across every topic in the 8525 specification with our printable checklist, or practice past exam questions in our free interactive assessments.
