(a) Design a 4-bit ring counter. Use an external asynchronousINIT input to initialize the flip-flops to a valid initial state.Also remember to hook up the CLOCK to all flip-flops.
(b) Design a 4-bit Johnson counter. Use an external asynchronousINIT input to initialize the flip-flops to a valid initial state.Also remember to hook up the CLOCK to all flip-flops.
(c) How many states does the ring counter in part (a) have? Howmany states does the Johnson counter in part (b) have?
(d) Starting at the initial state, show the repeating countingsequence for both the ring counter in part (a) and the Johnsoncounter in part (b). (That is, show the state of each counter on acycle-by-cycle basis until it repeats.)