Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Traffic Lights as State Machines: The next few problems involve the design of an intelligent traffic controller. The light should switch between states based on

Traffic Lights as State Machines: The next few problems involve the design of an intelligent traffic controller. The light should switch between states based on a timer, but only if there is a vehicle waiting at the red light. Yu will be designing the light that is regulating North/South (N/S) traffic, at an intersection with a street on which traffic is traveling East/West.

When the light regulating North/South (N/S) traffic turns green it will stay green for a minimum of 20 seconds before switching to the yellow state. However, if there is no car waiting to go East-West (E/W) after 20 seconds the light will stay green and check again every five seconds for a waiting car. Once a waiting car is sensed the light turns yellow. It stays yellow for 3 seconds before turning red. The E/W light then enters a green state and the cycle continues. We also need a way for pedestrians to cross, so also check to see if a pedestrian pressed the cross button while you're checking for cars. The light should change if either a car or pedestrian is waiting.

5) State Machine - Make a state machine diagram for the controller. Start with the N/S light. Fill in each circle with the appropriate state (color), and write the condition for state change next to each arrow.

image text in transcribed

6) Logic Statements - Write a logic statement for the process of checking whether to go from green to yellow. Define a letter for each condition for the state change. A or B is represented by A+B. A and B is represented by A*B. Use ( ) to group operations when needed.

7) Truth Tables - Write a truth table for this logic statement. You will need a row for the result of each condition check.

8) Logic Circuits - Draw a Logic Circuit that would implement this truth table using And gates, Or gates or inverters.

N/S

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases On The Web Designing And Programming For Network Access

Authors: Patricia Ju

1st Edition

1558515100, 978-1558515109

More Books

Students also viewed these Databases questions

Question

Comment on the wisdom of Warby Parkers growth strategy.

Answered: 1 week ago

Question

LO12.5 Discuss the economic effects of monopoly.

Answered: 1 week ago

Question

LO12.1 List the characteristics of pure monopoly.

Answered: 1 week ago