Number Systems: Question 6
Syllabus 1.1
A digital audio mixer stores a channel's gain setting as an 8-bit register.
Register: 11010010
A logical left shift of 2 places is applied to this register. Which 8-bit binary pattern is now stored in the register?
Show worked solution Hide worked solution
Worked solution
Step 1: Understand what a logical left shift does
A logical left shift moves every bit in the register a fixed number of places to the left. Each bit that falls off the left-hand end is discarded, and 0s are filled in on the right-hand end so that the register stays a fixed width (8 bits here). A logical left shift by n places is the same as multiplying the original value by 2^n, keeping only the lowest 8 bits of the result (any overflow beyond 8 bits is lost).
Step 2: Write out the original register
Register (bit 7 down to bit 0): 1 1 0 1 0 0 1 0
Step 3: Shift every bit 2 places to the left
Drop the leftmost 2 bits (1 1), move the remaining 6 bits two places to the left, and fill the 2 new rightmost positions with 0s.
- Remaining bits after dropping the leftmost 2:
0 1 0 0 1 0 - Fill 2 zeros on the right:
010010+00=01001000
So after the shift, the register stores 01001000.
Step 4: Check using denary values
The original register 11010010 = 128 + 64 + 16 + 2 = 210 in denary. A logical left shift of 2 places multiplies by 2^2 = 4: 210 x 4 = 840. Since the register only holds 8 bits (maximum 255), only the lowest 8 bits of 840 are kept: 840 - 768 (3 x 256) = 72.
72 in 8-bit binary = 64 + 8 = 01001000, which matches Step 3, confirming 01001000 is correct.
Why the other options are wrong
- B (
01001011, denary 75): this is a rotate left by 2 places, where the 2 bits that fall off the left end (1 1) are wrapped around onto the right end instead of being discarded and replaced with 0s. - C (
00110100, denary 52): this is what you get from shifting right by 2 places instead (210 DIV 4 = 52), the opposite direction to the one asked for. - D (
10100100, denary 164): this is a logical left shift of only 1 place (210 x 2 = 420, truncated to 8 bits as 420 - 256 = 164), not the 2 places asked for in the question.
Final answer
A, the register stores 01001000 after a logical left shift of 2 places.