A finite state machine has one input and one output. The output becomes 1 and remains 1 thereafter when at least two 0's and two 1's have occurred as inputs, regardless of the order of appearance.
Added by Jason T.
Close
Step 1
We need to track the number of 0s and 1s seen so far. Let's use a state representation like (number of 0s, number of 1s). The output will be 1 if the condition (at least two 0s and at least two 1s) is met, otherwise 0. Show more…
Show all steps
Your feedback will help us improve your experience
Chris Trentman and 91 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
Construct a finite-state machine that determines whether the input string read so far ends in at least five consecutive 1s.
Modeling Computation
Finite-State Machines with Output
Akash M.
Design a finite state machine that has an input (w) and an output (z). The machine is a sequence detector that produces (z = 1) when the previous two values of (w) were (00 or 11); otherwise (z = 0). Assume the initial state is unknown, starting with (z = 0).
Supreeta N.
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Transcript
18,000,000+
Students on Numerade
Trusted by students at 8,000+ universities
Watch the video solution with this free unlock.
EMAIL
PASSWORD