AQA GCSE · Question 02.2 · Fundamentals of data representation
Apply a binary shift three places to the right on the bit pattern 10101000. Give the result using 8 bits.
How to approach this question
1. Start with the original 8-bit pattern: 10101000.
2. A right shift of three places means each bit moves three positions to the right.
3. The three rightmost bits (000) will be shifted out and discarded.
4. The remaining bits (10101) will move to the right.
5. Three new bits (0s) will be added to the leftmost positions to maintain the 8-bit length.
6. Original: 10101000
Shifted: ___10101
Padded: 00010101
Full Answer
00010101
A binary shift to the right moves all bits in a pattern a specified number of places to the right.
- The original number is `10101000`.
- We need to shift it right by 3 places.
- The 3 rightmost bits (`000`) are shifted out and discarded.
- The remaining 5 bits (`10101`) move 3 places to the right.
- The 3 empty spaces created on the left are filled with zeros. This is called padding.
- The result is `00010101`.
The arithmetic effect of a right binary shift by 'n' places is equivalent to integer division by 2^n.
Common mistakes
✗ Shifting to the left instead of the right.
✗ Shifting by the wrong number of places.
✗ Forgetting to pad the left side with zeros.
✗ Incorrectly padding with ones.