170 likes | 903 Views
Mealy vs Moore. 2 examples of problems where Moore FSM has more than 1 extra state versus Mealy FSM. Problem. Σ o = {t, f} Σ I ={0, 1} Outputs t at least 2 last input digits are same. Solutions.
E N D
Mealy vs Moore 2 examples of problems where Moore FSM has more than 1 extra state versus Mealy FSM
Problem • Σo = {t, f} ΣI ={0, 1} • Outputs t at least 2 last input digits are same
Solutions One can see that Mealy implementation needs only 3 states, while Moore implementation needs 2 more almost duplicated states just in order to the output value t there (filled in green).
Mealy 0/t 0/f 1/t 0 1 S 0/f 1/f 1/f
Moore 1 11/t 0 0 1 0/f 1/f S/f 0 1 0 0 1 00/t 1
One More Problem • Σo = {t, f} ΣI ={a, b, c} • Outputs t the last 3 input symbols were either ‘abc’ or ‘cba’
Solutions One can see that Mealy implementation needs only 5 states, while Moore implementation needs 2 more almost duplicated states just in order to the output value t there (filled in green).
Mealy a/f a/f A b/f B’ b/f a/f b/f c/t a/f O a/t c/f c/f b/f C B” b/f c/f c/f
Moore a b a a A /f b B’/f A /t t b a c a b a O/f C /t t c c c a c b C/f B”/f b c c b