AMD Interview Question

Design a 2-bit Gray Code counter. Explain the logic behind the transition from one state to the next and implement it using Verilog