# Drawing Moore Finite State Machine Diagram

In an upcoming of an exam of 'Digital Techniques', we have to be able to design sequential circuits, and in particular we have to draw Moore FSM's when the equations for the output and next states are given. One of the exercises we could use to practice our skills is:

"A sequential circuits with two flip-flops A and B, one input X and one output Z is specified by the following equations:

A(t + 1) = X'(t) A(t) + X(t) B(t)
B(t + 1) = X'(t) A'(t)
Z(t)     = X(t) A(t)  + X'(t) B'(t)


Transform and implement the circuit described above as a Moore Finite State Machine (FSM) using only NAND gates and SR flip-flops. Give the state table, state diagram and logic diagram."

I am confused: Moore FSM's have outputs that only depend on the current state, not on the input. The next state, Z(t+1), can depend on the input, since Z(t+1) may depend on A(t+1) and B(t+1), which in turn may depend on the input.

My question is: how can we transform this into a Moore FSM? I have already derived the state table:

X(t) | A(t) | B(t) || A(t + 1) | B(t + 1) | Z(t)
0      0      0         0          1        1
0      0      1         0          1        0
0      1      0         1          0        1
0      1      1         1          0        1
1      0      0         0          1        0
1      0      1         1          1        0
1      1      0         0          0        1
1      1      1         1          0        1


I can not create a function mimicking Z(t) that only depends on A(t) and B(t). As we can see in the state table, A(t) = B(t) = 0 implies Z(t) = X'(t), something that seems to be unresolvable.

(Note: I am a first year student, so I don't know too much about FSM's and sequential circuits, but I'm not an idiot either.)

• Your textbook/class notes/Google search should provide examples. If you use LaTeX, TikZ provides a quite capable automata package for drawing them. – vonbrand Jan 9 '16 at 16:01
• I share your confusion ("Moore FSM's have outputs that only depend on the current state, not on the input."). I don't know very much about circuits, but it seems surprising to me that a circuit's output at time $t$ can depend on the input at time $t$; I would have expected there to be some delay. – D.W. Jan 9 '16 at 20:50
• It is possible: Mealy FSM's have output that depend on both the input and the current state (output is independent of the clock) whereas the next state depends on the same but is dependent of the clock. – limitIntegral314 Jan 10 '16 at 1:38
• What really confuses me is that the definition of Moore FSM is "a sequential circuit where the output depends only on the current state", yet Z(t) depends on X(t). – limitIntegral314 Jan 10 '16 at 1:39