MorrisMano5e Chapter6
MorrisMano5e Chapter6
Overview
◼ Ripple Counter
◼ Synchronous Binary Counters
◼ Design with D Flip-Flops
◼ Design with J-K Flip-Flops
Less Significant
Bit output is Clock
for Next Significant Bit!
(Clock is negative edge)
Recall...
+
Example (cont.)
◼ The output of each FF is connected to the
C input of the next FF in sequence.
◼ The FF holding the least significant bit
receives the incoming clock pulses.
◼ The J and K inputs of all FFs are connected
to a permanent logic 1.
◼ The bubble next to the C label indicates
that the FFs respond to the negative-going
transition of the input.
A 4-bit Binary Down
Counter (Ripple Counter)
◼ Use direct Set (S) signals instead of
direct Reset (R), in order to start at 1111.
◼ Alternative designs:
◼ Change edge-triggering to positive
◼ Connect the complement output of each FF
to the C output of the next FF in the
sequence… (homework!)
Ripple Counter Summary
FF Edge FF output used as Clk Counter type
Triggering for next stage FF
NEG Q UP
NEG Q’ DOWN
POS Q’ UP
POS Q DOWN
◼ Q1 complemented on every
clock edge
Q2 complemented if Q8=0,
Q8 Q4 Q2 Q1
◼
Q1 goes from 1 to 0. Q2
cleared if Q8= 1 and Q1
goes from 1 to 0
◼ Q4 complemented when Q2
goes from 1 to 0
◼ Q8 complemented when
Q4Q2 = 11, Q1 goes from 1
to 0. Q8 cleared if either
Q4 or Q2 is 0 and Q1 goes
from 1 to 0
Synchronous Binary Counters
◼ The design procedure for a binary counter is
the same as any other synchronous sequential
circuit.
◼ The primary inputs of the circuit are the CLK
and any control signals (EN, Load, etc).
◼ The primary outputs are the FF outputs
(present state).
◼ Most efficient implementations usually use T-
FFs or JK-FFs. We will examine JK and D flip-
flop designs.
Synchronous Binary Counters:
J-K Flip Flop Design of a 4-bit Binary Up Counter
Synchronous Binary Counters:
J-K Flip Flop Design of a Binary Up Counter (cont.)
Synchronous Binary Counters:
J-K Flip Flop Design of a Binary Up Counter (cont.)
Synchronous Binary Counters:
J-K Flip Flop Design of a Binary Up Counter (cont.)
Synchronous Binary Counters:
J-K Flip Flop Design of a Binary Up Counter (cont.)
logic 1 Q0
J JQ0 = 1
C
KQ0 = 1
K
JQ1 = Q0
J Q1
KQ1 = Q0
C
K
J Q2 JQ2 = Q0 Q1
C KQ2 = Q0 Q1
K
J Q3 JQ3 = Q0 Q1 Q2
C KQ3 = Q0 Q1 Q2
K
CLK
Synchronous Binary Counters:
J-K Flip Flop Design of a Binary Up Counter with EN and CO
EN = enable control
signal, when 0 counter
remains in the same
state, when 1 it counts
JQ0 = 1 · EN
KQ0 = 1 · EN
JQ1 = Q0 · EN
KQ1 = Q0 · EN
JQ2 = Q0 Q1 · EN
KQ2 = Q0 Q1 · EN
JQ3 = Q0 Q1 Q2 · EN
KQ3 = Q0 Q1 Q2 · EN
Fig. 6.12 C0 = Q0 Q1 Q2 Q3 · EN
Thank You
Serial Vs Parallel Counters
◼ If serial gating (chain of gates, info ripples
through) is used
→ serial counter
◼ If serial gating is replaced with parallel
gating (this is analogous with ripple-logic
replaced with carry-lookeahead logic in our
adder designs)
→ parallel counter
◼ Advantage of parallel over serial counter:
faster in certain occasions (1111 → 0000)
Up-Down Binary Counter
clock Q0
n-bit
Up-Down Q1
UD Counter ••
•
Qn-1
UD = 0: count up
UD = 1: count down
A countdown binary counter
can be constructed as shown in Fig. 6.12
except that
the inputs to the AND gates must come from
the complemented outputs, instead of
the normal outputs, of the previous flip‐flops
Synchronous BCD Counter
The table shows an output y, which is equal to 1 when the present state is 1001.
In this way, y can enable the count of the next‐higher significant decade while the same
pulse switches the present decade from 1001 to 0000.
Synchronous BCD Counter
Binary Counter with Parallel Load
Counters employed in digital systems quite often require a parallel‐load capability for
transferring an initial binary number into the counter prior to the count operation.
(Next slide) gives the logic diagram and symbol of a 4-bit synchronous
binary counter with parallel load capability.
BCD counter
The spike may be undesirable, and for that reason, this configuration is not recommended.
Arbitrary Sequence Counter
▪ Counters can be designed to generate any desired sequence of states.
• A sequential circuit with n flip‐flops may use fewer than the maximum
possible number of states ( 2n ).
• States that are not used are not listed in the state table.
• In simplifying the flip‐flops input equations, the unused states may be treated as
don’t‐care conditions or may be assigned specific next states.
• The circuit should eventually go into one of the valid states so that it can
resume normal operation.
• If the unused states are treated as don’t‐care conditions, then after designing the
circuit, the effect of the unused states MUST be investigated from the analysis of
the designed circuit.
Counter with Unused States
Consider a specific counter specified in Table below
The count sequence of the counter is not straight binary, and two states,
011 and 111, are not included in the count. Don’t Care cases
Note: Since there are two unused
states, 011 and 111, we analyze the
circuit to determine their effect.
A ring counter is a circular shift register with only one flip‐flop being
set at any particular time; all others are cleared.
The single bit is shifted from one flip‐flop to the next to produce the
sequence of timing signals.
RING COUNTER
• The decoder decodes the four states of the counter and generates the required
sequence of timing signals.
RING COUNTER
• To generate 2n timing signals, we need either a shift register with 2n flip‐flops OR
an n ‐bit binary counter together with an n ‐to‐2 n ‐line decoder.
• For example, 16 timing signals can be generated with a 16‐bit shift register
connected as a ring counter OR with a 4‐bit binary counter and a 4‐to‐16‐line
decoder.
• In the first case, 16 flip‐flops needed. In the second, 4 flip‐flops and 16 four‐input
AND gates for the decoder needed.
NOTE
• That way, the number of flip‐flops is less than that in a ring counter, and the
decoder requires only two‐input gates. This combination is called a
Johnson counter .
JOHNSON COUNTER
A k ‐bit ring counter circulates a single bit among the flip‐flops to provide
k distinguishable states.
NOTE
Johnson counters can be constructed for any number of timing sequences.
- The number of flip‐flops needed is one‐half the number of timing signals.
- The number of decoding gates is equal to the number of timing signals, and
only two‐input gates are needed.
Thank You