0% found this document useful (0 votes)
25 views

hw5_sol

This document provides solutions to homework problems related to digital circuits, including shift registers, synchronous counters, and the design of a specific counter sequence. It includes detailed explanations of the state transitions, timing diagrams, and design steps for implementing a counter using J-K flip-flops. Various figures and tables are referenced to illustrate the concepts and solutions presented.

Uploaded by

gxrc46r82m
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views

hw5_sol

This document provides solutions to homework problems related to digital circuits, including shift registers, synchronous counters, and the design of a specific counter sequence. It includes detailed explanations of the state transitions, timing diagrams, and design steps for implementing a counter using J-K flip-flops. Various figures and tables are referenced to illustrate the concepts and solutions presented.

Uploaded by

gxrc46r82m
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Digital Circuits: Homeworks #5 Solutions

1. Shift Register Data I/Os.


For the data input and clock in Figure 1a, determine the states of each flip-flop in
the shift register of Figure 1b and show the Q waveforms. Assume that the register
contains all 1s initially.

(a) Input Waveform.

(b) Serial In/Serial Out Shift Register.

Figure 1: Input Waveform and Serial In/Serial Out Shift Register.

Solution: Shift Register Data I/Os


All the Q values are being shifted to right and Q0 takes the serial data input at every
clock. Figure 2 shows the Q waveforms.

Figure 2: Output Waveform.

2. Bidirectional Shift Registers.


Determine the state of the shift register of Figure 3b after each clock pulse for the given
RIGHT /LEF T control input waveform in Figure 3a. Assume that Q0 = 0, Q1 = 1,
Q2 = 1, Q3 = 0, and that the serial data-input line is HIGH.

Solution: Bidirectional Shift Registers.


If RIGHT /LEF T = 1, all the Q values are being shifted to right and Q0 takes the
serial data input at every clock. If RIGHT /LEF T = 0, all the Q values are being
shifted to left and Q3 takes the serial data input at every clock. Figure 2 shows the Q
waveforms.

Homework 5 Page 1 of 5
(a) Input Waveform.

(b) 4-bit Bidirectional Shift Register.

Figure 3: 4-bit Bidirectional Shift Register and Input Waveform.

Figure 4: Output Waveform.

3. Synchronous Counters.
Determine the sequence of the counter in Figure 5. Show the complete timing diagram
of Q0 , Q1 , and Q2 waveforms for 10 clock pulses. Begin with the counter cleared.

Figure 5: Synchronous Counter.

Solution: Synchronous Counters.


Since the counter is cleared initially, the initial state is Q0 = Q1 = Q2 = 0. Q0 will be
0 if Q1 = Q2 = 1, and Q0 will be 1 for all other cases. Thus, we have

000 → 001 → 011 → 111 → 110 → 100 → 001 → 011 → 111 → 110 → 100 → · · ·

Homework 5 Page 2 of 5
Note that we wrote the number in Q2 Q1 Q0 form.
Q waveforms are described in Figure 6. Interestingly, state 000 never appears again.

Figure 6: Output Waveform.

The state diagram of this counter is described in Figure 7

Figure 7: State Diagram.

4. Design of Synchronous Counters.


Design a counter to produce the following binary sequence using J-K flip-flops.

1, 4, 3, 5, 7, 6, 2, 1, 4, 3, 5, . . . .

Please follow 6 steps to design the counter.


(Hint: We have 7 states from 001 to 111. You can start from drawing the state
diagram.)
(Hint2: Use don’t care when the present state is 000.)

Homework 5 Page 3 of 5
Solution: Design of Synchronous Counters.
The first step is drawing the state diagram. Note that we are using binary numbers
(for example, 001 for 1, 010 for 2, etc). The state diagram is given in Figure 8a.
Then, the step 2 is filling the next-state table. This is given in Table 1.

Present State Next State


Q2 Q1 Q0 Q2 Q1 Q0
0 0 0 x x x
0 0 1 1 0 0
0 1 0 0 0 1
0 1 1 1 0 1
1 0 0 0 1 1
1 0 1 1 1 1
1 1 0 0 1 0
1 1 1 1 1 0

Table 1: Step 2.

The step 3 is flip-flop transition table. Transition table of J-K flip-flop is given in
Figure 8b.
The step 4 is Karnaugh maps. These are given in Figure 8c.
The step 5 is Logic expressions. According to Karnaugh maps, we have

J0 =Q̄1 + Q̄2 (1)


K0 =Q̄2 Q̄1 + Q2 Q1 = Q2 XNOR Q1 (2)
J1 =Q2 (3)
K1 =Q̄2 (4)
J2 =Q0 (5)
K2 =Q̄0 . (6)

The final step (step 6) is counter implementation which is given in Figure 8d.

Homework 5 Page 4 of 5
(b) Step 3.

(a) Step 1.

(d) Step 6.

(c) Step 4.

Homework 5 Page 5 of 5

You might also like