Registration Number: 042
Q5. There are four states (S0, S1, S2, S3) in a state machine corresponding to numbers x2, y1, z0, and 43 respectively. Here x, y, and z are digits of your registration number. For example, if the registration number is 785, then x=7, y=8, z=5, and the numbers are 72, 81, 50, and 43. If the machine is at a state which represents the highest number, then if the input is 0, the machine transitions to the state representing the second smallest number. If the input is 1, it remains in the same state. Likewise, if the machine is at a state which represents the smallest number, then if the input is 1, the machine transitions to the state representing the second highest number. If the input is 0, it remains in the same state. At any other state, if the input is 0, the state transitions to a state that represents the next lower number, and if the input is 1, the state transitions to a state that represents the next higher number. You are provided with TFFs and external gates.
a) Draw the state diagram.
b) Tabulate the state table.
c) Derive the state equations.
d) Synthesize using JK FFs.
e) Draw the logic diagram of the circuit.