Using three D flip-flops,a multiplexer,decoders and gates, construct a 3-bit Gray code counter that has two inputs: reset, which sets the counter to 000, and inc, which makes the counter go to the next value in the sequence. Note that the code is cyclic,
so that the value after 100 in the sequence is 000.