A binary counter has one input X and counts as follows. If X =0, it counts 2, 3, 1 and repeats; if X = 1, it counts 1, 0, 3 andrepeats. You can assume that the following cases do not occur:counter value is 0 with X = 0, and counter value is 2 with X =1.
(a) Draw the state diagram of the binary counter above. Use thebinary counting values as the state names. You do not need torepresent the state transitions for the cases that do notoccur.
(b) Use two D-type flip-flops and logic gates to design thebinary counter. In your answers, include the state table, theflip-flop input equations and the final logic circuit diagram.