CSE 205: Digital Logic Design
CSE 205: Digital Logic Design
Chapter 6
Registers and Counters
Clocked sequential circuits
⚫ A group of flipflops and combinational gates.
⚫ Connected to form a feedback path.
⚫ Flipflops + Combinational gates
(essential) (optional)
Register
⚫ A group of flipflops.
⚫ Gates that determine how the information is
transferred into the register.
Counter
⚫ A register that goes through a predetermined
sequence of states.
Registers
A nbit register
⚫ n flipflops capable of storing
n bits of binary information.
⚫ 4bit register is shown in Fig.
6.1.
load 1
'
loa 0
The load input to the d
register determines 1
the action to be taken 0
with each clock pulse
1
1: Paralel load 0
0: No change
1
0
Shift Registers
A register capable of shifting the binary
information held in each cell to its neighbouring
cell, in a selected direction is called a shift
register.
⚫ Clock controls the shift operation
1 0 1 1 0
1 1 0 1 1
Synchrono
us
serial
transfer
Serial Addition
Parallel adders
⚫ Faster,
⚫ cost more logic
Serial adders
⚫ Slower
⚫ nbit addition n clock cycles
⚫ Less hardware
Serial Addition using D FlipFlops
1 0
0 0
010
001
1
0
1
0 1
1 1
1
001
1
?00
1
C
i
2. Synchronous counters
◆ The CLK inputs of all flipflops receive a
common clock.
Binary Ripple Counter
A nbit binary counter → n FFs → count from 0 to
2n1.
Example: 4bit binary ripple counter
⚫ Binary count sequence: 4bit
Binary Ripple
Counter
Reset signal sets all
outputs to 0
Negative edge triggered
Count signal toggles
output of loworder flip
flop
Loworder flip flop
provides trigger for
adjacent flip flop
Output of one flipflop
Clock to the next
Not all flops change
value simultaneously
Lowerorder flops
change first
Binary Ripple
Counter
A3 A2 A1 A0
0 0 0 0
0 0 0 1
0 0 1 0
0 0 1 1
0 1 0 0
0 1 0 1
0 1 1 0
0 1 1 1
1 0 0 0 Ripper Ripper
propagation propagation
Q8 Q4 Q2 Q1
0 0 0 0
0 0 0 1
0 0 1 0
0 0 1 1
0 1 0 0
0 1 0 1
0 1 1 0
0 1 1 1
1 0 0 0
1 0 0 1
no change; 0
0
0
0
1
1
0
1
J=K=1, 0 1 0 0
C_en A 0
0 1 0 1
complement. A1
0 1 1 0
0 1 1 1
1 0 0 0
1 0 0 1
C_en A 0 A1
1 0 1 0
A2
1 0 1 1
1 1 0 0
1 1 0 1
1 1 1 0
1 1 1 1
4bit Up/Down
Binary Counter
Up Down Function
0 0 No change
dow u
0 1 Down Count n p
1 0 Up Count
1 1 Up Count
down up
A3 A2 A1 A0 A'0 A0
0 0 0 0
0 0 0 1
0 0 1 0
0 0 1 1
0 1 0 0
down A' 0 up A 0
0 1 0 1
A'1 A1
0 1 1 0
0 1 1 1
1 0 0 0
1 0 0 1
1 0 1 0
1 0 1 1 down A' 0 A'1 up A 0 A1
1 1 0 0 A'2 A2
1 1 0 1
1 1 1 0
1 1 1 1
BCD Counters
Simplified functions
4bit binary counter
with parallel load
c_en
A0
asyn
c
Fig. 6.14
Fourbit binary counter with parallel load
BCD counter using a counter with
parallel load
Generate any count sequence
⚫ E.g.: BCD counter ⇐ Counter with parallel
load
Fig. 6.15 Two ways to achieve a BCD counter using a counter with
parallel load
Other Counters
Counters
⚫ Can be designed to generate any desired
sequence of states.
DividebyN counter (moduloN counter)
⚫ A counter that goes through a repeated
sequence of N states.
⚫ The sequence may follow the binary count or
may be any other arbitrary sequence.
Counter with unsigned states
A circuit with n flipflops has 2n states
⚫ We may have to design a counter with a given
sequence (unused states)
⚫ Unused states may be treated as don’t care or
assigned specific next state
⚫ Outside noise may cause the counter to enter
unused state
⚫ Must ensure counter eventually goes to the
valid state
Counter with unsigned states
An example
A3 A2 A1 A0
1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1
1 0 0 0