# Digital counter sequence

Thread Starter

#### Sgt.Incontro

Joined Dec 5, 2012
50
Hi all,

Attached is a question, which I cannot figure out.

Any idea on what the counting sequence is for this? Thanks in advance.

(P.S - I am studying for finals, and my lecturer is not very helpful. This is NOT a homework question.)

#### WBahn

Joined Mar 31, 2012
24,849
But the expectations still apply. You need to show your best attempt to work the problem. This is even more important if you are coming up to finals, because that is what will help you learn the most. So draw a timing diagram for all of the signals and walk them through. You will have to make an assumption about the starting state for your diagram, but you can just pick a state at random.

Another way to approach it is to develop a state diagram (which is probably the better way to do it). You have sixteen possible states, so just figure out the values of the signals for each state and which state the machine goes to next.

Thread Starter

#### Sgt.Incontro

Joined Dec 5, 2012
50
But the expectations still apply. You need to show your best attempt to work the problem. This is even more important if you are coming up to finals, because that is what will help you learn the most. So draw a timing diagram for all of the signals and walk them through. You will have to make an assumption about the starting state for your diagram, but you can just pick a state at random.

Another way to approach it is to develop a state diagram (which is probably the better way to do it). You have sixteen possible states, so just figure out the values of the signals for each state and which state the machine goes to next.
Thanks for your reply.

This is actually one question that appears in a booklet of practice questions - this is the only question that I have been unable to solve so far.

After attempting to trace it on paper with a caffeinated brain, I got the following sequence:

7,6,5,4,3,2,1,0,7,6,5,4...

Do you think that this is correct?

====================================================================
EDIT: A bit more of a detailed explanation:

It seems to me that the circuit is counting down (assuming a positive starting value).

Once it reaches '0000', and decrements to '1111', RCO (carry out) goes high, and thus LD goes high, and the value on ABCD is loaded in, which is '0111' (as the outputs are directly fed back into the input, with the exception of D = not QD). Then it continues counting down from 7 and repeats.

Last edited:
Thread Starter

#### Sgt.Incontro

Joined Dec 5, 2012
50
For anyone who reads this thread in the future - ignore my previous post.

I was able to work out that the correct sequence is : 0,8,9,10...15,7,6,5,4...0,8...