Electronic – How many flip flops are required to build a digital circuit

circuit-designdigital-logicflipflop

Here is an example: enter image description hereenter image description here

The periode of the this circuit is 9, and i want to build a digital circuit with only J-K flip flops.

Here is my argument, I can tell there is nine different states that leads to four possible combinations, for instance 0 results in 00 … . In order to describe these nine states we need at least four bits, so we need four J-K flip flops to fully design the digital circuit.

There is also another argument, says, count the number of maximum occurrence, this would be the minimum number of logical ports that require to build the circuit. To clarify myself, here the 11 state comes four times and the rest each one or three times.

Are these two arguments equivalent? I had a very brief course on digital circuit at college, so i appreciate any reference to a reliable source if my question too general to be answered here.

Best Answer

You do need four flip-flops to build the machine, but not simply because there are nine states. If you make a table that shows Q1 and Q2, then add as many bits as are necessary to give each state a unique representation, the result will be four total bits.

However, without some kind of reset input the machine could wake up in one of the seven (\$2^4\$ possible states minus the 9 that are defined) unused states. Your problem definition doesn't suggest how we should deal with that possibility.

I don't understand your "another argument". I don't know what you mean by "ports".