For both versions, the “nowhere” state, A, is when we are looking for the first 1 input. The first 1 gets us to B, and the second, to C. State D is reached when we have had exactly one or two 1’s (from B or C). In the Mealy version (on the left), the output is 1 when the system is in state D and the input is 1 or is 0 followed by a 1. That 1 is treated as the first 1 of a new input sequence. The Moore version gets to state F after the same sequence, where the output is 1. After too many 0’s (from state C), they go to F (Mealy) or G (Moore); after more than two 0’s in a row, the systems return to state A.