Follow a finite automaton
This machine checks whether a sequence of 0s and 1s contains an even number of 1s. It reads symbols; it does not calculate a binary number.
E means even, O means odd. Reading 0 keeps the state; reading 1 switches it. ε means an empty sequence, not the letter E.
Loaded sequence: 101
Reading is not finished. The current state describes the prefix read so far; the whole sequence is accepted only if reading ends in E.
Current state: E · 0/3
Consumed prefix: ε ▏ Unread suffix: 101
Double circle: accepting state. Outer dashed ring: current state. Heavy arrow: last consumed transition.
Input remains. The current state alone does not decide this word yet.
Machine definition
δ(E,0)=E; δ(E,1)=O; δ(O,0)=O; δ(O,1)=E.
E: Even number of 1s read
O: Odd number of 1s read