Lesson 5 of 9

⚙ State Machines & Control Logic

🎯 Grades 9–12 ⏱ ~30 minutes 🟡 Intermediate

What You'll Learn

  • What a finite state machine (FSM) is and how to draw a state diagram
  • The difference between Mealy and Moore machines
  • How state machines model real-world control logic
Quick Check

1. In a finite state machine, a system can be in how many states at one time?

AAll states simultaneously
BExactly one state
CUp to two states
DAny number of states

2. In a Moore machine, what determines the output?

ABoth the current state and the input
BOnly the current state
COnly the input
DThe previous state

3. What does an arrow labeled "event / action" in a state diagram represent?

AA state
BA transition from one state to another
CThe initial state indicator
DA final/accepting state

4. A Mealy machine has an advantage over a Moore machine because:

AIt is always faster
BIt can represent the same behavior with fewer states
CIt never needs a reset state
DIts output never depends on input