Interactive-Book
Interactive-Book copied to clipboard
Flip flop State Table gives wrong results
The flip flop State Generator Table gives undefined on all sets of outputs. This should be taken care of and corrected. Steps to reproduce:
- Go to the interactive book page and click Flip Flop interaction.
- Click on the type of flip flop and enter the inputs and outputs you desire.
- Once you confirm for he state table, the state table shown below will appear. The output result should however be different.
This task is for GCI
Hi, for this issue can I just add a more informative instruction on user input rather than fixing the code itself(fixing the html). It seems that the problem with undefined results is due to invalid userinput on flip flop input and output function. If there is something better than I can do, please tell me.
Yes @ericsheng495, I'll explain everything to you in a minute
So see T flip flop is basically a JK flip flop where both the inputs are the same. That is why in the above picture we only have TA because both the inputs are same. So when the input is 0 your next state is your present state and when it is 1 your next state is the negation of the present state. So in case of A and y when both the inputs are different i.e 0 and 1 or vice versa, it should be undefined because that is not possible. But in case of 0 and 0 and 1 and 1 it should be as said above. I know this is a little tough. If you don't get it, I'll explain again feel free to ask that. @ericsheng495
Heyyy I found something that can help you. Look at this picture
Just in the last row it should be negated present state and first row should be present state



If I use the pictured inputs, I don't see undefined values. I thinks the error actually occurs with how the user inputs.
Firstly, is this what you got in your development environment? Because when I am actually accessing the original website link the following comes.
Secondly, your step 2 doesn't really make sense A+y?? Why did you use the addition/OR operator here?
Thirdly, you look at the truth table you just sent, the output is 0 and 1 when the input is 1. How is that correct? Like look at the truth table I sent when Ta gets 1 as an input it should give the negation of previous state, but in second row the previous output was 0 so it should be 1 in second row.