GATE Computer ScienceHardGATE CS (PYQ pattern)
For how many 8-bit patterns x does there exist some rotation distance k with 1 ≤ k ≤ 7 such that rotating x left circularly by k bits gives x back?
- A. 2
- B. 8
- C. 16
- D. 30
Correct answer: C. 16
A pattern has a non-trivial rotational symmetry iff it is built from a repeating block of length 1, 2 or 4. Of 256 patterns, 240 are aperiodic (necklace theory: period exactly 8), leaving 16 (2 with period 1, 2 with period 2, 12 with period 4).
More Digital Logic questions
- Let g(x) = x XOR (x >> 1) be the 8-bit binary-reflected Gray encoding. What is the smallest k ≥ 1 such that applying g k times returns…
- A bit string is a palindrome if it reads the same forwards and backwards. How many 8-bit palindromes and how many 9-bit palindromes…
- Let g(x) = x XOR (x >> 1) be the 8-bit Gray code of x. For how many x in 0..254 is g(x) equal to x + 1?
- For how many of the 256 ordered pairs of 4-bit two's complement numbers (a, b) does the exact product a·b fit in a 4-bit two's complement…
- 0.1 stored in IEEE 754 single precision (round to nearest) has the bit pattern 0x3DCCCCCD. Relative to the exact value 0.1, the stored…
- What is the IEEE 754 single-precision bit pattern of the value nearest to −1/3 (round to nearest)?