Design a counter with an external control, x, to count thesequence of multiples of 3 (i.e., 0-3-6 and repeat) when thecontrol is 0, and non-multiples of 3 (i.e., 1-2-4-5-7 and repeat)when the control is 1. These values will be displayed on aseven-segment display. When the control value changes, the firstclock should drive the output to the first value in the appropriatecount- e.g., if the circuit has been counting non multiples and thecontrol switches to 0, the first clock should drive the output to 0(or if you have been counting multiples and the control switches to1, the first clock pulse should make the output 1).