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.

a) 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.

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

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

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

Seven Databases In Seven Weeks A Guide To Modern Databases And The NoSQL Movement

Authors: Luc Perkins, Eric Redmond, Jim Wilson

2nd Edition

1680502530, 978-1680502534

More Books

Students also viewed these Databases questions

Question

Are the rules readily available?

Answered: 1 week ago

Question

Explain the function and purpose of the Job Level Table.

Answered: 1 week ago