what i wanted to know is if the input is say some 01110100101010 then what is the output because for divide by 5 some count the number of 1's some the no of 0's and some will output the 5th bit etc etc...
the user has said that he wants to detect 101 and 1010 so when as you said if 1111 or 11110 occurs you would find that it has gone to state S2 which considers that a 1 has occured and for the latter case to state S3 which considers an 10 to have occured so it will work fine....