How many states needed for this FSM, and how do I define them?

817 Views Asked by At

I want to define states for FSM that gives an output $1$ if and only if $X$ is dividable by $5$ with a residue of 3. where $X$ is the binary number that the machine got until now (Not Including current digit), for Example: enter image description here