Determining the ROM contents of a circuit
A, B, and C are used as a 3-bit representation of the "present state". For instance, a present state of 1 (first row of the transition table) corresponds to ABC=001.

For each present state, there's one row for x=0 and one row for x=1.

For each of those rows, the contents of the ROM include the new values for A, B, and C to represent the next state, and one bit for the output.

The unused rows in the ROM (like the first two rows, for ABC=000) are left as all zeroes. Note that this will make the state machine "hang" if it reaches an undefined state.