Community resourceWorksheet

1CP2-P-2.2 Logical binary shifts

Part 2 of 7 · 1CP2-P-2 · Signed data and encoding

The logical shift worksheet, moving bits first and interpreting the stored value second.

Students will:

  • apply a logical shift left or right by a given number of places
  • say what fills the vacated positions
  • explain why a right shift can lose precision
  • explain when the multiply-by-two shortcut is reliable
  • choose a shift that meets a stated requirement

Inside: 6 explanation cells, 2 multiple-choice questions, 3 number cells, 1 fill-in-the-blanks cell and 2 written answers. 20 marks, about 45 minutes.

Series: 1CP2-P-2 · Signed data and encoding, part 2 of 7.

Shared by Coding PathwayVerified teacher

  • 14 cells
  • About 45 minutes
  • CC BY-SA 4.0
  • Shared 17 Aug 2026

Preview

The whole resource, exactly as a class sees it. Answers and marking are held back.

Logical binary shifts

A logical shift moves every bit left or right by a stated number of places. Vacated positions are filled with zero; bits pushed beyond the fixed width are discarded.

1. Move bits, then interpret

Logical right shift by twobeforeafter1011011000101101discarded10110110 → 00101101; unsigned 182 becomes 45 because division discards the remainder.

For an unsigned value, a left shift by n places multiplies by 2^n if no significant bit is lost. A right shift by n divides by 2^n, discarding any fractional remainder because the pattern stores an integer.

Fill in the blanks3 marks
A logical left shift by 3 normally multiplies an unsigned integer by gap 1. A logical right shift by 2 performs integer division by gap 2. Vacated positions receive gap 3.
  • 0
  • 2
  • 4
  • 8
Number systems2 marks

Apply a logical left shift by one place to each 8-bit pattern.

Move every bit left, discard anything beyond the width and insert zero at the right.

a)Apply a logical shift left of 1 place to 00101101.

Before
00101101
After

b)Apply a logical shift left of 1 place to 01010011.

Before
01010011
After
Number systems2 marks

Apply a logical right shift by two places to each 8-bit pattern.

Move every bit right and insert two zeroes at the left.

a)Apply a logical shift right of 2 places to 10110110.

Before
10110110
After

b)Apply a logical shift right of 2 places to 01101100.

Before
01101100
After

2. Right shifts can lose precision

Unsigned 45 is 00101101. A right shift by two gives 00001011, which is 11. Exact division gives 11.25, but the binary integer cannot store the fractional part. The discarded rightmost bits contained that lost information.

Written answer3 marks

Explain why logically shifting unsigned 00101101 right by two does not produce an exact representation of 45 ÷ 4.

Refer to discarded bits and the integer result.

Students type their answer here.

3. Left shifts can lose high-order bits

In eight bits, 11000001 shifted left becomes 10000010: the leftmost 1 is discarded. The stored result is not 193 × 2 because 386 needs more than eight bits. State the fixed width whenever explaining this effect.

Multiple choice1 mark

When is 'left shift by one multiplies by two' reliable for an unsigned fixed-width pattern?

  • AAlways, regardless of discarded bits
  • BOnly when no significant bit is discarded
  • COnly when the pattern begins with 1
  • DOnly when shifting right first
Number systems4 marks

Identify the direction and number of places for each logical shift.

Compare bit positions and account for the inserted zeroes.

a)00110110 became 11011000. Which shift was applied, and by how many places?

Before
00110110
After
11011000
DirectionNot answered
PlacesNot answered

b)11100000 became 00011100. Which shift was applied, and by how many places?

Before
11100000
After
00011100
DirectionNot answered
PlacesNot answered

4. Choose a shift from a requirement

First identify the intended operation, then convert the power of two into shift places: ×8 means left 3; integer ÷4 means right 2. Finally check whether lost bits make the result inexact.

Written answer4 marks

An unsigned counter contains 00010110. State the logical shift that efficiently multiplies it by 4, give the resulting pattern and denary value, and explain why the result is exact.

Four is 2 squared; check the bits leaving the left edge.

Students type their answer here.

Multiple choice1 mark

What always fills a vacated position in a logical shift?

  • AA copy of the sign bit
  • BThe discarded bit
  • CA zero
  • DA one

Route forward

You can now apply, identify and explain logical shifts, including information loss. Next, arithmetic shifts operate on two's-complement signed values.