A sequential circuit has one flip-flop, two inputs X and Y, and one output S. The circuit consists of a D flip-flop with S as its output and the logic implementing the function
X xor Y xor S
as the input to the flip-flop. Derive the state table and state diagram of the sequential circuit.