I am somewhat stuck and desperately need help. I am faced with the Traffic Light Problem, and I completely understand the actual logic of it. However, I am having great difficulty turning this into digital logic. I have thought through the state diagram. My biggest problem that I can't wrap my head around is that the State is represented by a two-bit binary number. So when building my circuit, how do I "create" this two-bit number using gates and what not?

This is my simplified truth table for the problem. 4 states: new red light(00), existing red light(01), new green light(10), and existing green light(11) [the yellow light is being ignored in my version of the problem].

Reduced Truth Table
State Input  new State
  00    00     10    
  00    *1     10
  00    10     01

  01    00     10
  01    *1     10
  01    10     01

  10    **     11

  11    0*     11
  11    1*     00

Now, I get how to brute-force design the output of each state+input to get each newState. I just am having a very difficult time bringing it all together. I have my State Diagram all drawn out and I get when the transition needs to happen, its the digital logic that I'm having trouble with

I still have much trouble with Multiplexers, although I know they would be usable in this schematic I have drawn below (because I have created a brute-force design from the State rather than the inputs)


simulate this circuit – Schematic created using CircuitLab

I have another much more complicated schematic that includes both the State and the Inputs, but I'm not sure if it is right or how to use it further (i.e. connect to flip flop and create an output of the traffic light color) [NOTE: THE OUTPUT IS WRONG, the output of the first OR gate should be S0 and the output of the second OR gate should be S1] [enter image description here]1


1 Answer 1


I entered your truth table into Logisim's combinational analysis window and got this. Is that what you're looking for? Circuit

As far as having two bits of state, it doesn't really matter so long as the outcome is the same. I just used S0 and S1 for the old state and BCar and CCar for the Input. New0 and New1 are the new output state.

Truth Table

  • \$\begingroup\$ You got most of the output results correct but there are some that are wrong. State 6 should be 01 not 00, and state 11 should be 11 not 10. \$\endgroup\$
    – Guill
    Commented Oct 16, 2015 at 7:00
  • \$\begingroup\$ @Guill You are correct. I've fixed it. It's a shame it doesn't fit nicely into 3 TTL chips like the other one. \$\endgroup\$ Commented Oct 16, 2015 at 7:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.