← ProblemsCircuits / Sequential Logic / Finite State Machines

One-hot FSM: derive logic by inspection

15%fsm

Given a 10-state FSM with one input in and two outputs, derive the next-state and output logic by inspection, assuming a one-hot encoding where state[i] corresponds to state Si. This is combinational logic only — no clock, no registers.

The transition structure (each row: where the state goes for each value of in):

Statein = 0in = 1
S0S0S1
S1S0S2
S2S0S3
S3S0S4
S4S0S5
S5S8S6
S6S9S7
S7S0S7
S8S0S1
S9S0S1

Outputs (functions of state only): out1 = 1 in states S8 and S9; out2 = 1 in states S7 and S9.

For a one-hot design, each next_state[i] is the OR over all incoming arcs of state[source] & (in condition) — for example, S2 is entered only from S1 when in = 1, so next_state[2] = state[1] & in. Write all ten equations this way (plus out1 and out2). Do not decode the state with case statements or equality comparisons: the grader applies non-one-hot state patterns, which only the inspection-derived sum-of-products equations reproduce.