LarmadVara
LarmadVara

Reputation: 47

Boolean expression from a State machine diagram

I'm having trouble to determine the boolean equation for Q1 and Q2. What I did was to input the values into a karnaugh-map. But since the state Diagram only consists of 3 states (00, 01 and 11), I'm a bit unsure of how to setup the Karnaugh. I know what it would have looked like if it had four states like (00, 01, 11 and 10).

State Diagram

This is what my karnaugh looks like, it's probably wrong though

This is what my karnaugh looks like, it's probably wrong though

Edit: Should I add the last row (10) in my Karnaugh and just input don't care?

Upvotes: 0

Views: 3230

Answers (1)

Kit Ostrihon
Kit Ostrihon

Reputation: 834

I would say, that the K-map is ok as a draft, but I would suggest making each of the output variables (the "new" Q_1 and Q_0 in the next step of the state diagram) their own K-map.

That way you can minimize the function separately for each of them.

I have filled the truth table this way:

+-----------------++-----------+
  input variables || next state
+-----+-----+-----++-----+-----+
| Q_1 | Q_0 |  x  || Y_1 | Y_0 |
+-----+-----+-----++-----+-----+
|  0  |  0  |  0  ||  0  |  1  |
|  0  |  0  |  1  ||  0  |  0  |
|  0  |  1  |  0  ||  0  |  0  |
|  0  |  1  |  1  ||  1  |  1  |
+-----+-----+-----++-----+-----+
|  1  |  0  |  0  ||  X  |  X  |
|  1  |  0  |  1  ||  X  |  X  |
|  1  |  1  |  0  ||  0  |  0  |
|  1  |  1  |  1  ||  1  |  1  |
+-----+-----+-----++-----+-----+

And the output functions determining the next state (Y_1 as the "new" next Q_1, Y_0 as the "new" next Q_0) are:

Output functions in K-maps

The indexes in the Karnaugh maps correspond with the rows of the truth table because of the order of the variables.

Also take notice, that I used the 'dont-care' X output (for 10 state) to advantage in minimization of the second function (Q_0).

The machine should (theoretically) never go to the 'dont-care' state, therefore you should not worry about using it in the function.

Without circling the X the Y_0 function would be longer: Y_0 = ¬x·¬Q_1·¬Q_0 + x·Q_0. With the X it is only: Y_0 = ¬x·¬Q_0 + x·Q_0.

If it seem unclear to you, do not hesitate to ask in a comment, please.

Upvotes: 1

Related Questions