# how many j k flipflop needed to count the series 0..1..0..2..0..3...0..1..0..2..0..3.. and so on

#### Debasmita Bhoumik

Joined Feb 14, 2016
2
i think it will be 2. cz
q1 q0
0 0
0 1
0 0
1 0
0 0
1 1
0 0

#### R!f@@

Joined Apr 2, 2009
9,916
Welcome to AAC
2 outputs, I say 2 FF

#### RBR1317

Joined Nov 13, 2010
712
Consider how many unique states of '00' there are, i.e., when the next state after '00' produces a different result. How will the logic know which '00' state in the sequence it is at if there are only 2 FF?

#### MrChips

Joined Oct 2, 2009
30,507
RBR is correct.

You are trying to design a state machine. Ask yourself how many unique states there are.

0 1 0 2 0 3 ...

There are six unique states. How many flip-flops will you require for six states?

#### Wendy

Joined Mar 24, 2008
23,396
A simple AND gates with a ripple counter would do it. The clock has to be a square wave.

2 flip flops, 2 AND gates, and the clock.

Need a schematic?

#### Debasmita Bhoumik

Joined Feb 14, 2016
2
wendy, can u plz explain a little more?

#### RBR1317

Joined Nov 13, 2010
712
2 flip flops, 2 AND gates, and the clock.
A signal chopper on the Q outputs will certainly display the correct series of numbers, but it will not 'count' the series.

Last edited:

#### Wendy

Joined Mar 24, 2008
23,396
True enough, so you add a flip flop and do it. I'll try to draw something up.

#### Wendy

Joined Mar 24, 2008
23,396
OK this is not complete, but it should give you the idea. I suspect this is homework, so it would not hurt for you to complete it.

#### RBR1317

Joined Nov 13, 2010
712
True enough, so you add a flip flop and do it.
The problem of designing ripple counters, with gated outputs no less, is that it is a hit or miss operation. However, there are established design procedures for creating a fully synchronous sequential state machine using JK flip-flops. I tried to get a LibreOffice spreadsheet to implement the transition mapping procedure, starting with the sequential state table to automatically produce the sequential transition table, the index transition table, and from that to automatically draw the Karnaugh transition maps. However, it is still a manual process to go from the sequential table to the index table. Also, the spreadsheet has problems with persistent formatting of Boolean results to display as simple numbers (TRUE, FALSE vs 0,1). Nevertheless, here is the result of one possible design of a state machine to count 0,1,0,2,0,3,0,1... using 4 JK FF.