Question

Suppose we wish to measure the traffic at a point on a railroad track, counting the axle crossings in each direction. We set up a light beam just above the rails and place two photocells $A$ and $B$ some inches apart, as shown (looking from above): When the beam shines on a photocell, it produces a 0 , and when the beam is interrupted, it produces a 1. Thus, when an axle crosses straight through from left to right, we read the following signals from $A$ and $B$ : $$ 00 \rightarrow 10 \rightarrow 11 \rightarrow 01 \rightarrow 00 $$ (and the reverse for the opposite direction). Unfortunately, not all axles cross straight through, and an axle may turn back after going part way through. An axle may move back and forth within the scope of the beam. We wish to construct a synchronous finite-state machine taking its two inputs from $A$ and $B$ and producing two outputs $X$ and $Y$ such that - normally, both outputs are 0 ; - when an axle has crossed completely from left to right, $X$ becomes 1 for exactly one clock period; - when an axle has crossed completely from right to left, $Y$ becomes 1 for exactly one clock period. (The pulses generated by $X$ and $Y$ could drive two counters, for example.) Assume that the only things that interrupt the light beams are axles, and that the clock is fast enough that we do not miss any transitions. A. Draw a state-transition diagram for this FSM. Clearly label the inputs and outputs. B. Construct the state-transition table for your FSM. C. Show an implementation for this FSM using $D$ flip-flops and a ROM. D. Suppose we need to notify the maintenance department periodically about wear and tear on the track, and further that $X$ and $Y$ drive another FSM with one output that goes from 0 to 1 after every 100,000 axle crossings (total, both directions). How many states must that FSM have? How many $D$ flip-flops would be needed to implement that FSM?

   Suppose we wish to measure the traffic at a point on a railroad track, counting the axle crossings in each direction. We set up a light beam just above the rails and place two photocells $A$ and $B$ some inches apart, as shown (looking from above):

When the beam shines on a photocell, it produces a 0 , and when the beam is interrupted, it produces a 1. Thus, when an axle crosses straight through from left to right, we read the following signals from $A$ and $B$ :
$$
00 \rightarrow 10 \rightarrow 11 \rightarrow 01 \rightarrow 00
$$
(and the reverse for the opposite direction). Unfortunately, not all axles cross straight through, and an axle may turn back after going part way through. An axle may move back and forth within the scope of the beam.

We wish to construct a synchronous finite-state machine taking its two inputs from $A$ and $B$ and producing two outputs $X$ and $Y$ such that
- normally, both outputs are 0 ;
- when an axle has crossed completely from left to right, $X$ becomes 1 for exactly one clock period;
- when an axle has crossed completely from right to left, $Y$ becomes 1 for exactly one clock period.
(The pulses generated by $X$ and $Y$ could drive two counters, for example.) Assume that the only things that interrupt the light beams are axles, and that the clock is fast enough that we do not miss any transitions.
A. Draw a state-transition diagram for this FSM. Clearly label the inputs and outputs.
B. Construct the state-transition table for your FSM.
C. Show an implementation for this FSM using $D$ flip-flops and a ROM.
D. Suppose we need to notify the maintenance department periodically about wear and tear on the track, and further that $X$ and $Y$ drive another FSM with one output that goes from 0 to 1 after every 100,000 axle crossings (total, both directions). How many states must that FSM have? How many $D$ flip-flops would be needed to implement that FSM?
Show more…
Computation Structures
Computation Structures
Stephen A Ward,… 1st Edition
Chapter 6, Problem 14 ↓

Instant Answer

verified

Step 1

The inputs will be $A$ and $B$, and the outputs will be $X$ and $Y$. The states will represent the different combinations of inputs $A$ and $B$.  Show more…

Show all steps

lock
AceChat toggle button
Close icon
Ace pointing down

Please give Ace some feedback

Your feedback will help us improve your experience

Thumb up icon Thumb down icon
Thanks for your feedback!
Profile picture
Suppose we wish to measure the traffic at a point on a railroad track, counting the axle crossings in each direction. We set up a light beam just above the rails and place two photocells $A$ and $B$ some inches apart, as shown (looking from above): When the beam shines on a photocell, it produces a 0 , and when the beam is interrupted, it produces a 1. Thus, when an axle crosses straight through from left to right, we read the following signals from $A$ and $B$ : $$ 00 \rightarrow 10 \rightarrow 11 \rightarrow 01 \rightarrow 00 $$ (and the reverse for the opposite direction). Unfortunately, not all axles cross straight through, and an axle may turn back after going part way through. An axle may move back and forth within the scope of the beam. We wish to construct a synchronous finite-state machine taking its two inputs from $A$ and $B$ and producing two outputs $X$ and $Y$ such that - normally, both outputs are 0 ; - when an axle has crossed completely from left to right, $X$ becomes 1 for exactly one clock period; - when an axle has crossed completely from right to left, $Y$ becomes 1 for exactly one clock period. (The pulses generated by $X$ and $Y$ could drive two counters, for example.) Assume that the only things that interrupt the light beams are axles, and that the clock is fast enough that we do not miss any transitions. A. Draw a state-transition diagram for this FSM. Clearly label the inputs and outputs. B. Construct the state-transition table for your FSM. C. Show an implementation for this FSM using $D$ flip-flops and a ROM. D. Suppose we need to notify the maintenance department periodically about wear and tear on the track, and further that $X$ and $Y$ drive another FSM with one output that goes from 0 to 1 after every 100,000 axle crossings (total, both directions). How many states must that FSM have? How many $D$ flip-flops would be needed to implement that FSM?
Close icon
Play audio
Feedback
Powered by NumerAI
Need help? Use Ace
Ace is your personal tutor. It breaks down any question with clear steps so you can learn.
Start Using Ace
Ace is your personal tutor for learning
Step-by-step explanations
Instant summaries
Summarize YouTube videos
Understand textbook images or PDFs
Study tools like quizzes and flashcards
Listen to your notes as a podcast
Continue solving this problem
Create a free account to:
  • View full step-by-step solution
  • Ask follow-up questions with Ace AI
  • Save progress and study later
Continue Free
Join the community

18,000,000+

Students on Numerade


Trusted by students at 8,000+ universities

Numerade

Get step-by-step video solution
from top educators

Continue with Clever
or



By creating an account, you agree to the Terms of Service and Privacy Policy
Already have an account? Log In

A free answer
just for you

Watch the video solution with this free unlock.

Numerade

Log in to watch this video
...and 100,000,000 more!


EMAIL

PASSWORD

OR
Continue with Clever