State diagram to state table (easy)

Thread Starter


Joined Sep 1, 2015

I have just started an Electronic Engineering course and it's taking me a bit of time to pick up all the concepts as it has been a long time since I have studied (I have a Fine Art degree - so very different).

I am working on a traffic light controller and I don't feel extremely confident. Would someone be able to look at my state diagram to state table and see if it is correct. I know if I get this bit wrong then everything else will be too.

Huge thank yous!

Picture attached (ignore text written above diagram).
U: Unused state
TA: Traffic Active
TW: Traffic Wait
TS: Traffic Stop



Joined Mar 31, 2012
Your diagram isn't even close to your table. You diagram gives no indication of what causes any of the transitions (except for the TA to TW transition). Your diagram has a single arrow going leaving each state. This means that the machine MUST go from the state at the tail of the arrow to the state at the tip of the arrow on the next clock. For the TA to TW state, the behavior when switch = 0 is undefined. Is this supposed to be a Mealy or a Moore machine? Your table says that you want the output to be 1 whenever the switch is 1 or if the machine is in the Unused state -- is that the behavior you want?


Joined Mar 31, 2012
Much better.

Your work looks correct, but not optimal. If you aren't concerned about consensus terms, you can implement D0 using just three two-input terms.

A few observations.

1) It was very difficult to read the variable labels on your K-maps. Your Q1 looked a lot like Q0 and your Q0 was written too poorly to tell what it was. That may be an artifact of the picture.
2) Your 1 also looks a lot like a 2 (but I was thinking it was a 0 since there was no Q2). Make the effort to be very neat in your work -- if for no other reason than to make the grader happy.
3) You don't write your 1 consistently. You write it differently for the subscripts than for everywhere else. Consistency allows people to compare your symbols in different places to help decide what you've written in places where it isn't clear.
4) Most people would have written the K-maps with the top labels being Q1 Q0 and with I being the label on the left side.