I am currently in a Computer Organization course and we have been discussing flip-flops for the past week. However, I still don't understand them. I'm not sure how to follow the flow of logic or how to use them to implement a sequential counter. More specifically, a Gray Counter using Digital Works. I am trying to create a JK flip-flop to sequentially change the bit sequence like this: 000 - 001 - 011 - 010 - 110 - 111 - 101 - 100. It is clocked, and uses only one other input. The input (0 or 1) determines whether the counter counts up (in the order I typed the bit sequence) or down (reverse).

It doesn't

*have*to be a JK FF, it can be a T or D FF as well. Anyway, if anyone can help me out with understanding flip-flops and how to create a sequential logic circuit I will greatly appreciate it.

Thanks,

Shoto