A cyclic right shift of one place
The 8-bit binary value 00110101 has a cyclic right shift of 1 place applied.
Which of the following is the result?
A 00011010
B 01101010
C 10011010
D 00110100
[1]
- 1
Apply the shift. Every bit moves one place to the right. In a cyclic shift nothing is lost: the bit that falls off the right-hand end (a 1) re-enters at the left-hand end.
00110101→1+0011010=10011010. Answer C (1). - 2
A is a logical right shift (a 0 is fed in and the 1 is lost). B is a cyclic left shift. D only clears the last bit.
Answer
C (10011010)
Examiner tip
Examiner tip: a quick check for any cyclic shift: the number of 1s never changes. 00110101 has four 1s, and so does 10011010.
Common mistake: choosing A. That is the logical shift, which feeds in a 0 and loses the bit that falls off the end.