Design a Mealy sequential machine with two inputs A and B, and one output Z.
Output Z generates 1 if: (a) A had the same value at each of the two previous clock ticks, or (b) B has been 1 since the last time that the first condition was true. The following shows an example I/O relationship:
A = 0 0 1 1 0 0 1 0 1 1 0
B = 0 0 0 0 0 0 1 1 0 1 0
Z = 0 1 0 1 0 1 1 1 0 1 0
You have to use JK flip-flop to implement this machine.