Chapter 12
Chapter 12
Chapter 12
REGISTERS AND COUNTERS
Enclosed is an excerpt from Cengage Learning concerning the License Agreement of the class notes. You the student have permission to use these notes to study from as part of this course provided you agree not to make copies of these notes and not to make them available to 3rd parties not registered for this course. Cengage hereby grants you a nontransferable license to use the Materials for your personal, noncommercial use only. The Materials may not be reproduced or distributed, except that portions of the Materials may be provided to your students in connection with your classroom instruction, so long as such students are advised that they may not copy or distribute any portion of the Materials to any third party. The Materials may be made available in the classroom and collected at the end of each class session, or posted electronically as described herein. Any portion of the Product posted electronically must be through a password-protected site, with all copy and download of the Materials indicates your acceptance of the conditions set forth in this Agreement. If you do not accept these conditions, you must return or destroy any and all copies the Materials within 30 days of receipt.
Figure 12-1: 4-Bit D Flip-Flop Registers with Data, Load, Clear, and Clock Inputs
Figure 12-3:
Figure 12-4:
When EnA = 0, the tri-state outputs of register A are enabled onto the bus. If LdG = 1, these signals on the bus are loaded into register G after the rising clock edge (or into register H if LdH = 1). Similarly, the data in register B, C, or D is transferred to G (or H) when EnB, EnC, or EnD is 0, respectively, and LdG = 1 (or LdH = 1). If LdG = LdH = 1, both G and H will be loaded from the bus. The four enable signals may be generated by a decoder. The operation can be summarized as follows: If EF = 00, A is stored in G (or H). If EF = 01, B is stored in G (or H). If EF = 10, C is stored in G (or H). If EF = 11, D is stored in G (or H).
Loading Accumulator
Before addition in the previous circuit can take place, the accumulator must be loaded with X. This can be accomplished in several ways. The easiest way is to first clear the accumulator using the asynchronous clear inputs on the flip-flops, and then put the X data on the Y inputs to the adder and add the accumulator in the normal way. Alternatively, we could add multiplexers at the accumulator inputs so that we could select either the Y input data or the adder output to load into the accumulator.
Figure 12-5:
A shift register is a register in which binary data can be stored, and this data can be shifted to the left or right when a shift signal is applied.
Figure 12-6:
Figure 12-7:
Right-Shift Register
Figure 12-9:
Figure 12-8:
Note that the 8th rising edge occurs at the end of the 7th clock period.
Figure 12-10: Parallel-In, Parallel-Out, Right Shift Register Figure 12-10: Parallel-In, Parallel-Out, Right Shift Register
Figure 12-11:
Figure 12-14:
(b)
Figure 12-20:
Figure 12-19ab:
Figure 12-21:
C 0 0 0 0 1 1 1 1
B 0 0 1 1 0 0 1 1
A 0 1 0 1 0 1 0 1
C+ 1 0 0 1 0
B+ 0 1 0 1 1
A+ 0 1 0 1 0
Figure 12-22
Given the present state of a T flip-flop (Q) and the desired next state (Q+), the T input must be a 1 whenever a change in state is required. Thus, T = 1 whenever Q+ Q.
Figure 12-23:
Figure 12-24:
Figure 12-25:
Although the original state table for the counter is not completely specified, the next states of states 001, 101, and 110 have been specified in the process of completing the circuit design
Figure 12-26:
C 0 0 0 0 1 1 1 1
B 0 0 1 1 0 0 1 1
A 0 1 0 1 0 1 0 1
C+ 1 0 0 1 0
B+ 0 1 0 1 1
A+ 0 1 0 1 0
SC 1 X 0 0 X X X 0
RC 0 X X X 0 X X 1
SB 0 X X 0 1 X X X
RB X X 0 1 0 X X 0
SA 0 X 1 0 1 X X 0
RA X X 0 1 0 X X 1
Figure 12-21:
Figure 12-21:
Figure 12-28:
Table 12-9. Determination of Flip-Flop Input Equations from Next-State Equations Using Karnaugh Maps
10