Assignment two questions and answers

Here are some notes about assignment two (some in Q&A format, but I didn't comply with that format when it would have been silly). Suggestions for additions to this list are welcome (via e-mail).


For question 1a, you have to put down four answers: one for a=b=0, one for a=0 and b=1, one for a=1 and b=0, one for a=b=1.
(An "answer" may be one stable state, or more; or it may be the statement that there are no stable states for that a,b pair.)

I've written some notes about the stability of sequential circuit states in http://www.dgp.toronto.edu/~ajr/258/notes/stable.html.


For the purposes of assignment question two, you do not have to worry about what happens upon power on.

Most of all, you should not let the issue of the state upon power-on influence your circuit design unduly. Your main question should be "what happens next? [from a given state]" rather than "what happens first?".

In "real life", we could first complete the above design phase and next check whether our general formulas are good enough for dealing with all possible power-on states or if some further tweaking is needed. Often we'd be lucky and they'd be good enough. But you don't have to do this real-life part for the assignment.


Q: What do you mean by "four flip-flops" in question 2? Are there four latches or eight latches?

A: Four flip-flops is eight latches. Each master-slave flip-flop is composed of two clocked latches (and a NOT gate).

Here's the terminology I've been using:

Other people don't use the terminology this carefully. Most of all, the term "flip-flop" is sometimes used to mean a simple latch. But we don't usually have a lot of use for a simple latch, except to make a master-slave flip-flop...

That is to say, the right level to look at, for the purposes of the assignment, is the master-slave flip-flop level. Don't worry about the latches inside. Also, feel free not to draw the clock, and simply to state in prose at the bottom, "the clock is connected to the clock input of all flip-flops", if this is what you want.


Q: For question 2, how would we know if we should use D flip-flops or JK flip-flops?

A: If you use JK flip-flops (with J and K connected together in the way we've been using it), you want a formula for whether or not the value flips. If you use D flip-flops, you want a formula for what the value is (in the next cycle).

You should use whatever's easiest. If you have no idea which is going to be easiest, then a good starting point is to use D flip-flops. But if it looks like the easiest way to describe the pattern is to say when the digit flips, then you'll want to use JK flip-flops, probably. All problems can be solved either way; it's a question of what's easiest (and what produces the smaller circuit).

You can mix them if you like -- i.e. have some digits represented by a D flip-flop and some by a JK flip-flop.

It's also possible to use JK flip-flops in more complicated ways in which the two inputs are not tied.


[main course page]