# Number of logic gates for counter with each type of flip flop

I am designing two synchronous counters one mod 21 and the other one mod 30. Is there a way to know which kind of flip flop (D, SR, JK, T) will use the smallest number of logic gates? I know we can build all of them and then check for the answer but that will be a lot of work. I am just wondering if there is a simple way to know that before design.

• Thinnk that the nr of extern logic gates depends on the truth table of counter states, state(n) vs state(n+1), if there is a binary pattern then you will require minimal gates. Jan 17 '16 at 23:38
• I assume you are asking about logic gates outside the flops, because flops themselves are made up of logic gates? Jan 19 '16 at 1:55

There are really only two types of counters you can build; a ripple counter, which divides by 2$^N$ using N flip-flops, and a ring counter, which divides by N using N flip-flops. The ripple counter's output can be short-circuited to divided by a number less than 2$^N$, for example a decade counter using four flip-flops. So we just need ripple counters, the ring counter will always use more flip-flops and can be discarded.