Q4. Finite State Machines - Serial adder (20 points)
The state diagram given below represents a serial-adder implemented as a Mealy State Machine, with two serial inputs $a$ and $b$ and one output $s$ representing the sum. Answer the following:
Reset
$(ab/s)$
$11/0$
$00/0$
$01/1$
$10/1$
G
$00/1$
G: carry-in = 0
H: carry-in = 1
$01/0$
H
$10/0$
$11/1$
a) Is this a Moore or Mealy FSM?
b) How many flip-flops are needed?
c) Implement the FSM using D-FFs: Show the state table then write the input and output equations for the D-FFs, and show the full circuit diagram.
d) Repeat part C using JK-FFs
Reset
$(ab/s)$
$11/0$
$00/0$
$01/1$
G
$10/1$
$00/1$
G: carry-in = 0
H: carry-in = 1
$01/0$
H
$10/0$
$11/1$