Assignment 11 (Assigned September 20)


1. An n-state State Machine is to have only a clock input and a single output Q whose value is 1 if and only if the number of clock ticks (after reset) is either a multiple of 3 or a multiple of 2 (and 0 otherwise). That means, you have seen either multiples of two or multiples of three number of state changes. How many states are required for this Finite State Machine? Justify your answer with a sketch of a state diagram for your machine. Hint: More than two states are required.

2. In this problem, you are to design a state machine with four states, numbered 0 through 3, and a two-bit number, n, as its only input. The next state is always the (current state + n) modulo 4. Draw the state diagram for this state machine. Label all states and arrows.

3. Give a next state table corresponding to the state diagram given below which defines one kind of traffic light controller. Note that you have one input variable, W. A transition labeling of 0,1 means input can be 0 or 1. Label your table appropriately. Do not include any output logic.

4. You are to design a controller, in the form of a state machine, for a 20¢ gum ball machine.  Your controller circuit should accept one input, C, to be interpreted as follows:  C = 0 denotes an input of 5¢, C = 1 denotes an input of 10¢.  You are to light a light to indicate that at least 20¢ has been entered.  Two seven-segment displays are to display the cumulative amount entered up through 20¢.  Any amount over 20¢ is merely displayed as 20¢.  Once you enter 20¢ or more, subsequent entries will be accepted but ignored (i.e., you are to stay in the “stopping” state, that is, the machine can take more money but not do anything).  Your solution should be in the form of a state machine together with the output logic required to display the amount entered.  You are to assume that the seven-segment displays are already wired to 4-bit decoders as in the lab kits so your output logic should only provide inputs to these decoders as 00, 05, 10, 15, and 20¢ together with a signal to control the lamp.