
Corey G. answered 07/14/20
Computer Engineering instructor who tutors code, math, and writing.
Assuming that you are referring to a counter circuit implemented as an FSM whose combinational logic part is implemented with a ROM device, then the FSM will have 6 states for the light outputs given by the following 1s and 0s
0 0 0 0 0 0 0 0 0 0 all lights off
1 1 1 1 1 1 1 1 1 1 all lights on
1 1 1 1 0 0 1 1 1 1 2 inner lights off
1 1 1 0 0 0 0 1 1 1 4 inner lights off
1 1 0 0 0 0 0 0 1 1 6 inner lights off
1 0 0 0 0 0 0 0 0 1 8 inner lights off
0 0 0 0 0 0 0 0 0 0 all lights off again (same is 1st state)
There is no external input for this counter, however there will be ceil(log2(6)) state variables. This equals to 3 state variables which are needed. This there will be 3 inputs needed for the ROM device to represent the current stat of the FSM.