DFA · Regular
Binary divisibility by 5
Reads a binary number one bit at a time and accepts exactly the multiples of 5. Each state remembers the remainder so far — five states doing long division.
The author’s examples, run
101 → accept1010 → accept1100100 → accept111 → reject10011 → reject