Back to Blogs
created 23 days ago

Binary Shifts Explained – Logical Left Shift & Right Shift (O Level Computer Science 2210 / IGCSE 0478)

What Is a Binary Shift?

A binary shift is the process of moving all bits in a binary number to the left or right.

Binary shifts are used by computers to multiply or divide binary numbers quickly.

There are two main types:

  • Logical Left Shift

  • Logical Right Shift

During a shift operation:

  • Bits that move out of the register are lost

  • Empty positions are filled with 0


Logical Left Shift

A logical left shift moves every bit one position to the left.

A 0 is added to the right side.

This operation multiplies the number by 2.

Example

Original 8-bit number:

00101101

After a left shift:

01011010

The number has been multiplied by 2.


Multiple Left Shifts

Each additional left shift doubles the value again.

Example:

00000101 (5)

Left shift once:

00001010 (10)

Left shift twice:

00010100 (20)

Each shift multiplies the number by 2.


Logical Right Shift

A logical right shift moves every bit one position to the right.

A 0 is added to the left side.

This operation divides the number by 2.

Example

Original number:

00101100

After right shift:

00010110

The number has been divided by 2.


What Happens to Lost Bits?

When bits move outside the register:

  • They disappear

  • They cannot be recovered

Example:

10011001

Left shift:

00110010

The leftmost bit (1) is lost.


Why Binary Shifts Are Important

Binary shifts allow computers to:

  • Perform fast multiplication and division

  • Process numbers efficiently

  • Perform operations inside the CPU

Binary shifts are commonly used in low-level programming and hardware operations.


Exam Tip (2210 / 0478)

Students are often asked to:

  • Perform logical left shifts

  • Perform logical right shifts

  • Explain the effect on the number

Remember:

  • Left shift = multiply by 2

  • Right shift = divide by 2


Practice Question

Perform a logical left shift on:

00110101

Answer

01101010

Learn Computer Science with IVY Online

Prepare for:

  • Cambridge O Level Computer Science (2210)

  • Cambridge IGCSE Computer Science (0478)

with IVY Online.

Our courses include:

  • Programming practice

  • Past paper solving

  • Exam strategies

  • Concept-based learning