Hi,
I have an assignment which entails coding a sequential state machine form arbitrary charecteristic table of a flip-flop and the state specifications given.
.For example, if the user wants one input x and one output y, and the following excitatoin table for the state machine:
| x = 0 | x = 1
------+--------+--------
q_0 | q_0, 0 | q_3, 1
q_1 | q_0, 0 | q_2, 0
q_2 | q_1, 1 | q_3, 1
q_3 | q_0, 0 | q_2, 0
------+--------+--------
(Here, q_0 corresponds to A = 0 and B = 0, etc - assume that the Q outputs of the two flip flops required are called A and B, respectively)
(The second and third column in the table are in the form (next state, output). Suppose the user chooses to input a characteristic table, which is the characteristic table of a JK'-Flip Flop.
The program should have the following answer as output:
J_A = x
K_A' = x
J_B = x + A
K_B' = 0
y = xB' + AB'
Iam not able to decide what data structures to use to manupulate data.
Plz suggest which data stucures suit the problem the best so that I can start of coding ASAP.
Thanks in advance :-)