Combination of Two Questions:
Exercise B.37A friend would like you to build an “electronic eye” for use as a fake security device. The device consists of three lights lined up in a row, controlled by the outputs Left, Middle, and Right, which, if asserted, indicate that a light should be on. Only one light is on at a time, and the light “moves” from left to right and then from right to left, thus scaring away thieves who believe that the device is monitoring their activity. Draw the graphical representation for the finite state machine used to specify the electronic eye. Note that the rate of the eye’s movement will be controlled by the clock speed (which should not be too fast) and that there are essentially no inputs.
Exercise B.38 Assign state numbers to the states of the finite state machine you constructed for the above problem (Exercise B.37) and write a set of logic equations for each of the outputs, including the next state bits.