2.3 Step 3: Create a State Transition Table

The next step in solving a state machine is to create a state transition table. This table will define each possible state transition in terms of the inputs and binary encoding of each state. The state transition table is a truth table that includes columns for each input, as well as columns for each bit of the encoded current state as inputs, and each bit of the encoded next state as outputs. Figure 2-3 shows the completed state transition table.

Figure 2-3. Traffic Light State Transition Table