Determine the state diagram for the quaternary counter which counts as 0, 1, 2, 3, 0, 1, 2, 3, ··· and 0, 1, 3, 2, 0, 1, 3, 2, 0,···for the control input x = 1 and x = 0, respectively. Realize this sequential machine by different flip-flops and compare the complexities of the realizations in the number of required circuits.