Theory of Computing
THE HYPERTEXTBOOK
Chapter 2. Finite State Automata, Regular Languages, Regular Expressions, and Regular Grammars
Section 2. Finite State Automata

Example

The following finite state automaton solves a problem that is a bit tricky.  Given a binary input string that stands for a binary number N, this finite state automaton will accept that binary string (N) if N mod 3 is either 0 or 1.  Take a look at it and see whether you agree.