# What does this circuit actually do?

#### ElijahSykes

Joined Sep 20, 2006
6
Hey, just wondering if anyone has advice on how to determine what a device actually DOES by looking at its state transition table/ state diagram?

I reckon its probably pretty intuitive to anyone whos been around electronics for long enough but I guess I don't know what to look for when looking at a state diagram and trying to work out if its a kind of "counter", or "shift register" etc.. any ideas?

Thanks,

Nick

#### mozikluv

Joined Jan 22, 2004
1,437
hi,

if you don't have any background on the electronic functions of logic devices, then by looking at those aforementioned tables will only add confusion rather than give you a definite understanding of its function.

since you did not mention hows your background in electronics, my assumption is that you don't understand any of those devices. (no offense meant). i suggest you study first the basic functions of a NOT, OR, AND, NAND because they are the foundation of those devices you mentioned.

moz

#### beenthere

Joined Apr 20, 2004
15,819
Hi,

I usually determine what a device does by selecting it according to its listed function in the logic manual. After I have selected for function, then it is time to determine how to put it into the desried state at the desired time.

#### ElijahSykes

Joined Sep 20, 2006
6
Hey,

Thanks for having a look at this, I'm just getting to grips with digital electronics for my college course and am still a little rusty on some of the concepts..

Heres an example from another posting of the sort of question I've been finding difficulty with:

Given the state transition table... Q1. Explain using words what the circuit described above does.

Any ideas?

Thanks,
Nick

#### Dave

Joined Nov 17, 2003
6,970
I'll move this to the General Electronics Chat Forum where it is better suited.

Thanks.

Dave

#### oldbird

Joined Sep 24, 2006
3
I think it is a state machine. the curent ( new) state is descided by the input (aby) and previous ( old ) state. for example:

if the input is 010 and the previous state is S1, then the current state should be S3.

"/" means what? maybe impossible occur.

#### n9352527

Joined Oct 14, 2005
1,198

#### n9352527

Joined Oct 14, 2005
1,198
This is what I usually do to figure out what a circuit does from the state table or the state diagram. It might not be the easiest or the right way, but just something that I've found work for me.

I prefer a state diagram instead of state table because I think it is more intuitive, so I always do the diagram from the table if it wasn't provided.

Have a look at the outputs, are they different from the state codings? If so, then write the outputs and the state codings clearly.

Look at the diagram, and see if there is any obvious/recognisable transition pattern. For example, a counter will have incremental transitions, probably up and down transitions, no state codings/outputs skipping and the state codings/outputs are obviously incremental as well.

Lastly, try to figure out what the outputs do in relation to the inputs. This is not so easy to do, probably will need quite a degree of familiarity with digital circuits.

Looking at your state table above, we can observe that the transitions are incremental/decremental only.

Y has no relevance to the analysis since it is an internal fedback state. You can omit Y from the table or the diagram to give more clarity.

You actually need to mention the state codings, and hence the outputs, to make sense of this diagram. From your other post, the codings are:

-----XY
S1 = 00
S2 = 01
S3 = 11
S4 = 10

The transitions and the outputs are then:

S1/00 -> S3/11 -> S4/10 -> S2/01 -> S1/00 when input AB = 01.
S1/00 -> S2/01 -> S4/10 -> S3/11 -> S1/00 when input AB = 10.

Looking at the outputs on the above transitions, and ignoring the state numbering schemes, we can observe that when the inputs are AB = 10 the outputs increase by one for each transition (00 -> 01 -> 10 -> 11 -> 00). When the inputs are AB = 01, the outputs decrease by one for each transition (00 -> 11 -> 10 -> 01 -> 00).

So what we have here is an up/down ring counter, controlled by A and B. When A is 1 and B is 0 the counter increases by one and when A is 0 and B is 1 the counter decreases by one. If A and B are both 0 or 1 then the counter stays as it is.

If you actually code the states according to the signals, it'd be more obvious and easier to figure out what the circuit does.

-----XY
S1 = 00
S2 = 01
S3 = 10
S4 = 11

New transitions:

S1 -> S4 -> S3 -> S2 -> S1 when AB = 01
S1 -> S2 -> S3 -> S4 -> S1 when AB = 10

Notice that now the state numbers accordingly increases/decreases by one for each transition.