In: Electrical Engineering
A binary counter has one input X and counts as follows. If X = 0, it counts 2, 3, 1 and repeats; if X = 1, it counts 1, 0, 3 and repeats. You can assume that the following cases do not occur: counter value is 0 with X = 0, and counter value is 2 with X = 1.
(a) Draw the state diagram of the binary counter above. Use the binary counting values as the state names. You do not need to represent the state transitions for the cases that do not occur.
(b) Use two D-type flip-flops and logic gates to design the binary counter. In your answers, include the state table, the flip-flop input equations and the final logic circuit diagram.
Question (a)
The states are assigned the binary values as
The state diagram is as below.
Question (b)
The excitation table of a D flip flop is as shown below
That is, if the present state is 0 and you want the next state to be also 0, then the D flip flop input D should be 0. Similarly if the present state is 0 and you want the next state to be 1, then the D flip flop input D should be 1. So basically what you want as the next state should be given to the D input. Based on this we can complete the state table as follows
Now lets draw the K map for D1 and D0. Since X is used as an input I am using DC to denote dont care in the K map
The K map for
The K map for
Based on this the circuit diagram is drawn as below
The circuit is simulated in NI MULTISIM and the design was verified.