6. Debug the Mealy Output

Loading simulator…

The faulty circuit decodes the destination state:

Y_faulty = Q2·Q1'·Q0'

This is a Moore output because it depends only on the present state. It stays HIGH for as long as the FSM remains in DONE.

The required output must decode both the source-state bits and the transition input:

Y = Q2'·Q1·Q0·X

The corrected output is Mealy because it depends on the present state and X. It becomes HIGH only when X = 1 while the present state is CHECK.