How do you find Q1+ and Q0+ values from a truth table?

2 replies · 2K views · last reply
Jon Rigby
Messages
1
Reaction score
0
I cannot figure out where the values from Q1+ and Q0+ are coming from. What truth table are these coming from?? I would greatly appreciate any help. Thank you.
 
Attachments
  • State diagram with four states A, B, C and D, transitions labelled with input/output pairs such as 0/0, 1/0, 0/1 and 1/1, beside a state-name table with columns Q1 and Q0 and a truth table with columns Q1 Q0 X, Q1+ Q0+ Z.
    20160504_092327.jpg
    25.7 KB · Views: 649
With reference to the truth table you posted...

The left hand side of the truth table lists the "current state" and any inputs (eg X).
The right hand side of the truth table lists the "next state" and any outputs (eg Z).

The "+" sign basically means "after the next clock". So the column headed Q1+ is telling you what Q1 will become after the next clock.

So for example if we look at the second line of the truth table it is telling us that..

If the current state is Q1=0, Q0=0 and X=1 then the next state after the clock will be Q1=0, Q0=1 and Z=0

Truth table with columns Q1, Q0, X, Q1+, Q0+ and Z, eight rows of binary values; the row where Q1=0, Q0=0, X=1 is circled in red.
 
PS Here is one way to build the state machine in your problem..
Block diagram of a state machine: a ROM with address inputs A0 (X), A1 (Q0) and A2 (Q1) and data outputs D0 (Q0+), D1 (Q1+) and D2 (Z), feeding two D flip-flops clocked by Clock whose outputs are Q0, Q1.


Two D-Type latches are used to hold the state bits. A very small Read Only Memory (ROM) is used to implement the truth table. Q0, Q1 and X are used as address bits to the ROM. The ROM data outputs D0, D1, D2 are used to generate the "next state" Q0+ and Q1+ and the output Z.

Truth table titled ROM Contents with inputs Q1, Q0, X and outputs Q1+, Q0+, Z, with columns labelled A2, A1, A0 and D1, D0, D3 above the data.


You don't have to use a ROM to implement this. You could work out how to generate (for example) Q0+ from Q1,Q0 an X using logic gates instead.

One thing missing from my circuit is a reset pin. Typically this would reset both latches to 00 (or some other known state) when power is first applied.