Solve the following problem:
Draw the state diagram and the state transition table for a two-bit counter with two control inputs k1, k2 defined as follows
If k1k2 = 00, stop counting,
If k1k2 = 01, count up by 1,
If k1k2 = 10, count down by 1,
If k1k2 = 11, count by two.
Implement the counter by T, D, and JK-flip-lops and compare the complexities of realizations in the number of circuits count. Available are two-input circuits.