Home › Practice › RTL Design › 4-bit Gray-code counter

4-bit Gray-code counter

MediumRTLcountersencoding

Count in 4-bit reflected Gray code: 0000, 0001, 0011, 0010, 0110, … , 1000, then back to 0000. Exactly one bit of g changes per step, which is why Gray counters are used for FIFO pointers across clock domains.

Solve in your browser →

No install and no sign-up needed. You write your answer in the editor and Nishkam checks it.

More in this track

← Sequence detector: 1011 (overlapping)4-way round-robin arbiter →