Title: Registers and Counters
1Chapter 6
Digital Logic Design
2Registers
- Registers like counters are clocked sequential
circuits - A register is a group of flip-flops. Each
flip-flop capable of storing one bit of
information - An n-bit register consists of n flip-flops
capable of storing n bits of information - besides flip-flops, a register usually contains
combinational logic to perform some simple tasks - In summary
- flip-flops to hold information
- combinational logic to control the state
transition
3Registers
- Group of D Flip-Flops
- Synchronized (Single Clock)
- Store Data
4Registers
A3
A2
A1
A0
Note New data has to go in with every clock
5Registers with Parallel Load
- Control Loading the Register with New Data
LD Q(t1)
0 Q(t)
1 D
6Registers with Parallel Load
- Should we block the Clock to keep the Data?
Delays the Clock
7Registers with Parallel Load
A0
I0
A1
I1
A2
I2
A3
I3
8Registers with Parallel Load
D
Q
A0
I0
D
Q
A1
I1
A2
D
Q
I2
D
Q
A3
I3
CLK
Load
9Shift Registers
SerialInput
SerialOutput
10Shift Registers
Q3
Q2
Q1
Q0
SI
SO
CLK
Q3
Q2
Q1
Q0
11Parallel transfere
12Serial Transfer
SI
SO
SI
Shift Register A
Shift Register B
CLK
CLK
13Serial Addition
SI
ShiftControl
FA
x y z
S C
SI
CLK
Q
D
CLR
Clear
14Universal Shift Register
- Parallel-in Parallel-out
- Serial-in Serial-out
- Serial-in Parallel-out
- Parallel-in Serial-out
15Universal Shift Register
S1S0
SI for SL
SI for SR
D1
D0
D2
D3
16Universal Shift Register
Q3
Q2
Q1
Q0
S1
S0
USR
SRin
SLin
D3
D2
D1
D0
Mode Control Mode Control Register Operation
S1 S0 Register Operation
0 0 No change
0 1 Shift right
1 0 Shift left
1 1 Parallel load
17Ripple Counters
Q0
Q1
Q2
Q3
18Ripple Counters
Q3
Q2
Q1
Q0
CLK
0
1
2
3
4
5
6
7
8
9
19BCD Ripple Counter
20Decades Counter
Q3
Q2
Q1
Q0
Q3
Q2
Q1
Q0
Q3
Q2
Q1
Q0
BCDCounter
BCDCounter
BCDCounter
Count
(CLK)
1s Digit
10s Digit
100s Digit
21Synchronous Binary Counter
Q3
Q2
Q1
Q0
Enable
CLK
To Next Stage
22Up-Down Binary Counter
Q3
Q2
Q1
Q0
CLK
Up
Down
23BCD Counter
0
0
0
0
0
1
1
1
1
0000
0001
0010
0011
0100
1
1
1001
1000
0111
0110
0101
1
1
1
1
0
0
0
0
0
Q3
Q2
Q1
Q0
E
24BCD Counter
0
0
0
0
0
1
1
1
1
0000 / 0
0001 / 0
0010 / 0
0011 / 0
0100 / 0
1
1
1001 / 1
1000 / 0
0111 / 0
0110 / 0
0101 / 0
1
1
1
1
0
0
0
0
0
Q3
Q2
Q1
Q0
y
E
25Binary Counter with Parallel Load
Q3
I3
CLR LD Count Q(t1)
0 x x 0
1 0 0 Q(t)
1 0 1 Q(t)1
1 1 x I
Q2
I2
Q1
I1
Q0
I0
LD
Count
CLR
Usually Asynchronous Clear
26BCD Counter Example
LD
Q3
I3
0
A3
0
Q2
I2
A2
Q1
I1
0
A1
Q0
I0
0
A0
Count
Count
CLR
CLK
1
27Ring Counter
1000
0001
0010
0100
28Johnson Counter
0111
0000
0001
0011
1111
1000
1100
1110
29Homework
- Mano
- Chapter 6
- 6-2
- 6-3
- 6-4
- 6-13
- 6-14
- 6-16
- 6-18
30Homework
6-2 Include a synchronous clear input to the Register with Parallel Load. The modified register will have a parallel load capability and a synchronous clear capability. The register is cleared synchronously when the clock goes through a positive transition and the clear input is equal to 1.
6-3 What is the difference between serial and parallel transfer? Explain how to convert serial data to parallel and parallel data to serial. What type of register is needed?
31Homework
6-4 The content of a 4-bit register is initially 1101. The register is shifted six times to the right with the serial input being 101101. What is the content of the register after each shift?
6-13 Show that a BCD ripple counter can be constructed using a 4-bit binary ripple counter with asynchronous clear and a NAND gate that detects the occurrence of count 1010.
6-14 How many flip-flop will be complemented in a 10-bit binary ripple counter to reach the next count after the following count(a) 1001100111(b) 0011111111(c) 1111111111
32Homework
6-16 The BCD ripple counter has four flip-flops and 16 states, of which only 10 are used. Analyze the circuit and determine the next state for each of the other six unused states. What will happen if a noise signal sends the circuit to one of the unused states?
6-18 What operation is performed in the up-down counter when both the up and down inputs are enabled? Modify the circuit so that when both inputs are equal to 1, the counter does not change state, but remains in the same count.