I have to prepare a subtractor FSM for my laboratories (using Mealy graph, and build it with JK flip-flops). I'm in the point where I can do it using D flip-flops. So here's how it looks:
b - inputs
Now, using Karnaugh minimalization, I would get
$$S=a \oplus b \oplus Q1$$
Q1 is the output from first D flip-flop.
So I would plug
Y to the first D flip-flop, and
S to the second D flip-flop, and
Q0 would be the output from the second flip-flop, and I would plug it to the bulb. And it works. Now my question is, how to convert it to JK flip-flops?