Asked again GATE 1994, Q2.1 (different numbers)
Flip-flops for modulus258
Counters & Timing

Answer & solution
Official answer: A
k flip-flops provide at most 2k states. Since28=256<258≤512=29, at least 9 are needed; a 9-bit counter with suitable reset logic suffices. Hence A.
A modulo-m counter needs m distinct states before repeating. Each flip-flop stores one binary bit, so k of them encode at most 2k different combinations. Taking a ceiling gives k=ceil(log2 258)=9. The 9-bit device has extra possible combinations, but logic can reset or redirect the sequence after 258 states. Options 258 and 512 confuse the number of states with the number of storage bits.
