Practice question · Put in order
A crossing controller has four states. After Red it goes to Red-and-amber, after Red-and-amber to Green, after Green to Amber, and after Amber back to Red. The machine is currently in Green. Order the next four states it enters.
- Red and amber together
- Red
- Amber
- Green
Hints
- Start from Green and apply the rules one at a time, writing down each state as you reach it.
- The machine returns to its starting state after a full cycle of four ticks.
Show the answer
- Amber
- Red
- Red and amber together
- Green
Why
From Green the rules give Amber, then Red, then Red-and-amber, then Green again, the cycle closes after four ticks. Reading the rules in the order they are listed rather than following them from the given starting state is the trap; an FSM's behaviour depends on where it currently is, not on how the transitions happen to be written down.
Practise Sequential Logic and State
The app has 6 more questions on this lesson, and keeps your place in the course. Computer Science I is free to start.
More questions on Sequential Logic and State
- A state machine's next-state logic is combinational and its state register is sequential. Why does that split…
- In a synchronous sequential circuit, sort each item by which part of the circuit supplies it.
- A synchronous circuit updates its state only on a clock edge, even though the combinational logic settles at…