Number Systems: Question 1

Syllabus 1.1

Multiple choice 1 mark

An 8-bit register in a games console currently stores the binary pattern shown below.

Register: 01011010

A logical right shift of 2 places is applied to this register. Which 8-bit binary pattern is now stored in the register?

Choose an answer to check it, then compare with the worked solution below.

Show worked solution Hide worked solution

Worked solution

Step 1: Understand what a logical right shift does

A logical right shift moves every bit in the register a fixed number of places to the right. Each bit that falls off the right-hand end is discarded, and 0s are filled in on the left-hand end so that the register stays a fixed width (8 bits here). A logical right shift by n places is the same as dividing the original value by 2^n and discarding any remainder.

Step 2: Write out the original register

Register (bit 7 down to bit 0): 0 1 0 1 1 0 1 0

Step 3: Shift every bit 2 places to the right

Drop the rightmost 2 bits (1 0), move the remaining 6 bits two places to the right, and fill the 2 new leftmost positions with 0s.

  • Remaining bits after dropping the rightmost 2: 0 1 0 1 1 0
  • Fill 2 zeros on the left: 00 + 010110 = 00010110

So after the shift, the register stores 00010110.

Step 4: Check using denary values

The original register 01011010 = 64 + 16 + 8 + 2 = 90 in denary. A logical right shift of 2 places divides by 2^2 = 4, discarding the remainder: 90 / 4 = 22 remainder 2, so the result is 22.

22 in 8-bit binary = 16 + 4 + 2 = 00010110, which matches Step 3, confirming 00010110 is correct.

Why the other options are wrong

  • B (01101000, denary 104): this is what you get from shifting left by 2 places instead (90 x 4 = 360, which is truncated to 8 bits as 360 - 256 = 104), the opposite direction to the one asked for.
  • C (10010110, denary 150): this is a rotate right by 2 places, where the 2 bits that fall off the right end (1 0) are wrapped around onto the left end instead of being discarded and replaced with 0s.
  • D (00101101, denary 45): this is a logical right shift of only 1 place (90 / 2 = 45), not the 2 places asked for in the question.

Final answer

A, the register stores 00010110 after a logical right shift of 2 places.