You are to design two CONCEPUTALLY different synchronous statemachines (Mealy and Moore) that perform the task described below.You are allowed to use any type of flip-flop. However, I recommendthat you use either JK or D flip-flops. There is a game calledscrewball. Every time a ball is put into play either player 1 (P1)scores a point or player 2 (P2) scores a point. A winner isdeclared when one player is ahead by 2 points. Starting with ascore of 0:0 for P1 vs. P2, a game might progress as follows: 0:11:1 2:1 3:1 (P1 Wins!) Design a finite state machine that usesinformation about which player scores a point at each stage of agame to determine when a player wins and which player wins. Yourdesign should include one reset input to initialize your winannouncer (this may be a synchronous or an asynchronous input, asyou desire). The outputs from your designs should indicate BOTHwhen a win has occurred and which player is the winner. Hint: Youdesign should have one input (Ball) and two outputs (Player 1 (P1)and Player 2 (P2))
Please Use Mealy State. Thank You!