# Synchronous 2bit counter using DFF

Discussion in 'Homework Help' started by baaf, Apr 6, 2009.

1. ### baaf Thread Starter New Member

Apr 6, 2009
1
0
one of the assignments in the HW is to build a Synchronous 2bit counter using DFF...

i've been trying to do it for the past 6 hours and the best i came up with was a counter that counts from 00 to 10 then it gets stuck between 01 and 10.

if u can give me a scheme of the counter it would be perfect, but if not then just directing me towards the answer would be appreciated.

oh and i tried to use a FS machine and build a state diagram etc' but i coldnt really do well with it. if this can be solved by using a mealy or moore machine then i would like to know how!

***edit***

THANK GOD I SOLVED IT !!!!

but i would like to know if there is a quick solution that i could use instead of my 7 hours of labor

Last edited: Apr 6, 2009
2. ### Papabravo Expert

Feb 24, 2006
10,340
1,850
Certainly, there is a quick solution. You have to correct the right truth table. Call the DFF outputs Q1 and Q2 and construct the following table where outputs Q1' and Q2' are the desired next states.
Code ( (Unknown Language)):
1.
2.  Q1  Q2   | Q1' Q2'
3.  0    0   | 0    1
4.  0    1   | 1    0
5.  1    0   | 1    1
6.  1    1   | 0    0
7.
Now let D1, the input to DFF.Q1, be eqaul to Q1'
And, let D2, the input to DFF.Q2, be equal to Q2'
Code ( (Unknown Language)):
1.
2. D1 = Q1*Q2 + Q1Q2* = Q1 ^ Q2 ;
3. D2 = Q2* ;
4.
That is how I'd do it -- 7 minutes