State Diagram
FSM Type: Mealy Machine
In a Mealy machine, the output depends on both the current state
AND the input. Notice the transition labels show input/output.
The output is 1 only on
the S3→S1 transition (when we see "1011" complete).
💡 Overlapping Detection
This FSM detects overlapping patterns! For example, in "101011",
after detecting "1011", we go to S1 (not S0) because the final "1" could start a new "1011".
Try input:
1011011 — it detects twice!
Input Stream
Bit Stream
_
Waiting for pattern "1011"...
0
Detections
0
Bits Input
Current State
S0 — No partial match. Looking for '1' to start.
Transition Table
| State | Match | In=0 | In=1 |
|---|---|---|---|
| S0 | "" | S0/0 | S1/0 |
| S1 | "1" | S2/0 | S1/0 |
| S2 | "10" | S0/0 | S3/0 |
| S3 | "101" | S2/0 | S1/1 |