I am trying to create a Crosswalk System using a finite state machine. Although I understand how to do it, apparently I am continuously arriving at the wrong equations for my D inputs since my K-maps are incorrect. I am using 2 D-flipflops for this statemachine. I have tried numerous times and re-did my k-maps but I am still arriving at the wrong equations; apparently, there should be 3 groups for both the D1 input and D0 input. I will post the diagram to the state machine and also my work. All I am asking for is the K-map for the state machine. Here is the diagram below along with my k-map, please let me know where I am doing this incorrectly, thanks:

Diagram and Outputs Link to diagram image for higher resolution: https://i.stack.imgur.com/zyDb9.png

My K-Map


2 Answers 2


I like these problems. They're like Sudoku for EEs.

I am not familiar with your style of Karnaugh-map. I will show you how we were taught this.

The state register has two flip-flops with inputs D1, D0 and outputs Q1, Q0. We have inputs TC, C7 and RESET. Reset is a special case. If we want it to be asynchronous then we connect it to the reset input of the flip-flops, and then it does not enter into our logic equations. If we want it to be synchronous then we do use it in the equations, but its function is so simple that we can keep it out of the K-maps.

First we will deal with the state transitions, then with the outputs.

enter image description here

D1 and D0 get their own K-maps. Reset is 'R' and you can eliminate it if we're to use asynchronous resets.

enter image description here

Now the outputs. Since the outputs only depend on the state values and not the inputs (name that state machine), it makes it easy to write the output equations by inspection.

WALK is only on in state 00. WALK = !Q1 * !Q0 (! means 'not')

HAND is on in states 11 and 10. HAND = Q1

NUM_ON is on in states 01 and 11. Num_on = Q0

Finally EN is only off in state 01. EN = !( !Q1 * Q0)


I think I can help you with this but I'm struggling to decipher the K-Map you have put up. I think what would be best is if you could list each state and for each state list the inputs and the condition the inputs will be in, the outputs and what you want them to be in each state and a description in your own words of what is meant to be happening in that state (this is usually where I start when designing an FSM).


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.