Moore and Mealy Machine

Binary Substring Detector Simulator

A dynamic automata simulator that detects the first occurrence of 101 or 110, displays the state transitions, and shows the final output required by the activity.

101 = Output A 110 = Output B No Match = Output C
Input
0 and 1
Patterns
101 / 110
Machines
2 Types
Output
A / B / C

Enter Binary Sequence

Type any sequence composed only of 0 and 1.

Final Output
C
Substring Detected
None
Waiting for simulation...

State Progress Visualizer

The highlighted state shows where the machine ended.

Current: S0
S0
Start / no match
S1
Saw 1
S10
Saw 10
S11
Saw 11
A
Detected 101
B
Detected 110
Run the simulation to show the transition path.

Moore Machine

Output is based on the current state.

Step Input Previous Next Output Remark
Generated Output Sequence

Mealy Machine

Output is based on the state and the current input.

Step Input Current Next Output Remark
Generated Output Sequence

Transition Rules

These rules allow the simulator to remember partial matches.

State Meaning
S0 = no useful pattern yet
S1 = last symbol is 1
S10 = possible 101
S11 = possible 110
A = 101 found
B = 110 found
Important Detection
S10 + 1 → A S11 + 0 → B

Step-by-Step Execution

Complete sequence of state transitions during execution.

0 steps