I not able to decide how to read in a data of the following table

A B(initial values) | x = 0 | x = 1
------+--------+--------
0 0 | q=0, y=0 | q=3, y=1 note: q=0 means A and B are 0,
0 1 | q=0, y=0 | q=2, y=0 q=1 means A is 0 and B is 1 and so on,
1 0 | q=1, y=1 | q=3, y=1 x is the input in the table
1 1 | q=0, y=0 | q=2, y=0 outputs are 'new q and y
------+--------+--------
This is the truth table of a flip=flop(Could be hypothetical).
I'll need to refer to this table repetedly durin the rest of the program.for eg: the first thing I need to do is to make its 'excitation' table.


Thanks , bye

Arjun

I not able to decide how to read in a data of the following table

A B(initial values) | x = 0 | x = 1
------+--------+--------
0 0 | q=0, y=0 | q=3, y=1 note: q=0 means A and B are 0,
0 1 | q=0, y=0 | q=2, y=0 q=1 means A is 0 and B is 1 and so on,
1 0 | q=1, y=1 | q=3, y=1 x is the input in the table
1 1 | q=0, y=0 | q=2, y=0 outputs are 'new q and y
------+--------+--------
This is the truth table of a flip=flop(Could be hypothetical).
I'll need to refer to this table repetedly durin the rest of the program.for eg: the first thing I need to do is to make its 'excitation' table.


Thanks , bye

Arjun

A B | x = 0 | x = 1
- --+--------+--------
0 0 | q=0, 0 | q=3, 1
0 1 | q=0, 0 | q=2, 0
1 0 | q=1, 1 | q=3, 1
1 1 | q=0, 0 | q=2, 0
------+--------+--------

Thanks , bye

Arjun

I not able to decide how to read in a data of the following table

Are you saying that the following is in a text file?

A B(initial values) | x = 0 | x = 1 
------+--------+-------- 
0 0                    | q=0, y=0 | q=3, y=1            note: q=0 means A and B are 0,
0 1                    | q=0, y=0 | q=2, y=0                    q=1 means A is 0 and B is 1 and so on,
1 0                    | q=1, y=1 | q=3, y=1                    x is the input in the table
1 1                    | q=0, y=0 | q=2, y=0                    outputs are 'new q and y
------+--------+--------

And that you need to read this file and import this truth table information to program variables?

I'm afraid I don't understand your question.

This article has been dead for over six months. Start a new discussion instead.