Eea051 06
Eea051 06
數位邏輯
Chapter 6
Registers and Counters
• Clocked sequential circuit
– No flip-flops → reduce to combinational circuit
– No combinational circuit → remain a sequential circuit
吳俊興 • registers and counters
高雄大學 資訊工程學系 • Register: a group of flip-flops capable of storing one bit of
information
– n-bit register consists of a group of n flip-flops capable of storing n bits
December 2004 • Counter: a register going through a predetermined sequence
of states
Selection inputs
control the mode
of operation
A3 A2 A1 A0
1 1 1 1
1 1 1 0
1 1 0 1
1 1 0 0
Binary count-down counter 1 0 1 1
1 0 1 0
• use positive-trigger T 1 0 0 1
flip-flops instead 1 0 0 0
0 1 1 1
• synchronous counter: clock pulses are applied to inputs of all FF
• 3-bit binary counter with T flip-flops
• similar to 4-Bit synchronous count up
binary counter
Load an initial binary number into the counter prior to the count operation
• Divide-by-N counter (modulo-N counter): a counter that goes
through a repeated sequence of N states
• Counters can be used to generate timing signals to control
the sequence of operations in a digital system
• Counters can be constructed also by means of shift registers
• The sequence of counters may follow the binary count or
may be any other arbitrary sequence
• non-binary counters
– Ring counter
It can be used to generate – Johnson counter
any desired count sequence
switch-tail ring counter: a circular shift register with the complement output
•Outside interference may cause a circuit to enter one of the unused states of the last flip-flop connected to the input of the first flip-flop
•Example: – double the number of states for a ring counter (Figure 6-17a)
Johnson counter: a k-bit switch-tail counter with 2k decoding gates to
provide outputs for 2k timing signals
Connecting Figure 6-18a
with 8 AND gates listed
Figure 6-18b to complete
the construction of the
Johnson counter
two unused states: 011 and 111
Simplified equations: • Disadvantage: it never finds its
JA=B KA=B way to a valid state if it is at an
unused state
JB=C KB=1 We need to analyze the
circuit to determine the -Correcting: DC = (A+C)B
JC=B’ KC=1 • # of FF = ½ # of timing signals
effects of unused states!
• # of 2-input decoding gates
Self correcting counter: if it happens to be in an unused state, it eventually = # of time signals
reaches the normal counter sequence after one or more clock pulses
• ring counter: a circuit shift register with only one flip-flop being set an any
particular time, all others are cleared. The single bit is shifted from one flip- Chapter 6 Registers and Counters
flop to the next to produce the sequence of timing signals
• Two approaches: (a) ring-counter (b) counter and decoder
6-1 Registers
• k-bit ring counter: k flip-flops to provide k distinguishable states 4-bit register, register with parallel load
6-2 Shift Registers
4-bit shift register, serial shift register, serial adder,
second-form serial adder, universal shift register
6-3 Ripple Counters
4-bit binary ripple counter, count-down counter,
BCD ripple counter, multi-decade BCD counter
6-4 Synchronous Counters
4-bit synchronous binary counter, count-down
counter, up-down binary counter, BCD counter,
binary counter with parallel load
6-5 Other Counters
ring counter, Johnson counter