Traffic Light Circuit+Truth Table? FIRST ASSIGNMENT! HELP!

Thread Starter


Joined Apr 16, 2009
Can anyone help me with this? This is our first circuit assignment and I'm lost.

Exercise 1: Design the circuit that controls the traffic light at the intersection of Main St. and Minor Rd.
The intersection is controlled by a “smart light” – one that can detect when cars are approaching the intersection. As you design the traffic-light controller, be aware that Main St. carries substantially more traffic than Minor Rd, so the traffic light should be programmed to allow traffic to flow on Main St. as much as possible. However, the light must eventually allow traffic on Minor Rd. to pass.

The “smart light” has four sensors:
S1: the current state of the traffic light
0 = the light is green on Minor Rd. (and therefore red on Main St.)
1 = the light is green on Main St. (and therefore red on Minor St.)

S2: sensor on Main St.
0= no car detected on Main St.
1 = car detected on Main St.

S3: sensor on Minor Rd.
0 = no car detected on Minor Rd.
1 = car detected on Minor Rd.

S4: timer
0 = less than 30 seconds have passed since the light was last toggled
1 = at least 30 seconds have passed since the light was last toggled

The traffic-light controller can perform only a single action: toggle the traffic light from green to red on one street, and simultaneously from red to green on the other street.

Build a truth table that specifies whether the action should be performed for each possible set of sensor inputs. Your circuit should output 1 if the traffic light should be toggled, and it should output 0 otherwise. For this exercise, you do not need to convert your truth table to Boolean logic and implement it with gates. However, for every row of your truth table, briefly justify your decision of the circuit’s output. You will find that your decision might be controversial – at least for some rows – and that’s why an explanation is important.


Joined Apr 20, 2004
It would be most useful if you made some efforts on this assignment. Start with an initial condition, where one signal is red and the other green. Think of the purpose of the timer and the sensors, and what effect they might have on changing the state of the lights.


Joined Apr 16, 2009
im thinking you must be in my class, because ive been assigned that same question, but i have no clue how to do this.
if someone could redirect me to a tutorial on circuits and truth tables or explain to me how they work that would be great.


Joined Aug 24, 2008
Start by making the table:

S1 S2 S3 S4 Toggle?
0 0 0 0 ?
0 0 0 1 ?
0 0 1 0 ?
0 0 1 1 ?
0 1 0 0 ?
1 1 1 1 ?

Now read it one row at a time, and from those conditions write a 1 or a 0 for each question mark.


Joined Aug 24, 2008
Your reasoning should be common sense answers to the conditions posed by each row. Take the first row, 0 0 0 0 . According to the rules you gave this would mean the light is green on Minor Rd. Ok, great, is this sufficient reason to toggle? No.

Also, the second 0 tells us there is no car on Main St. So why toggle?

Next 0 says there's no car on Minor Rd. So what? This is a smart light. There's no reason to toggle.

The last 0 says the less than 30 seconds have passed since the light last toggled. Is this a good reason to toggle? Nope. So put a 0 under toggle for that first row of conditions.

I think you can take it from here.