0% found this document useful (0 votes)
20 views8 pages

Understanding Binary Counters and Designs

The document discusses different types of counters including binary ripple counters, synchronous counters, and decoding gates. It describes how ripple counters work using flip-flops connected in series and how synchronous counters use parallel logic. Decoding gates can be used to generate control signals from counter outputs.

Uploaded by

Hemanth Gowda
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views8 pages

Understanding Binary Counters and Designs

The document discusses different types of counters including binary ripple counters, synchronous counters, and decoding gates. It describes how ripple counters work using flip-flops connected in series and how synchronous counters use parallel logic. Decoding gates can be used to generate control signals from counter outputs.

Uploaded by

Hemanth Gowda
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

MODULE – 5

COUNTERS
Primary purpose of a counter is to produce a specified output pattern sequence. It is also called
a pattern generator Each stored 0/1 combination is called the state of the counter. The total
number of states is called its modulus. If a counter has m distinct states then it is called a
mod-m counter The order in which states appear is referred to as its counting sequence.
Depicted by a directed graph called a state diagram.
State Diagram of a Counter:
• 𝑆𝑖 denotes one of the states of the counter.

• Arrows in the graph denote the order in which the states occur.
DESIGN OF BINARY COUNTERS:
A counter is a sequential circuit that goes through a prescribed sequence of states up on the
application ofinput pulse. Counters are in two categories –
Ripple (Asynchronous) Counter – consists of a series connection of complementing flip-flops,
with the output of each flip-flop connected to the clock-pulse input of the next higher-order
flip- flop. The flip-flop holding the LSB receives the clock-pulse.

Synchronous Counter – the input pulses/ clock-pulses are applied to all clock-pulse inputs of
all the flip-flops simultaneously.

Asynchronous Counters:
3-Bit Binary Ripple Counter, Waveforms & Truth Table
The above Figure shows three negative-edge-triggered, JK flip-flops connected in
cascade to form a 3-bit ripple counter. The system clock (a square wave), drives flip-
flop A. The output of flip-flop A drives B, and the output of B drives flip-flop C.
All the J and K inputs are tied to +VCC. Hence, flip-flops will toggle with a
negative transition at its clock input.
Assume that, the flip-flops are all initially reset to 0 outputs. For every clock NT, flip-
flop A will change state. Notice that, the waveform at the output of flip-flop A is one-
half the clock frequency.
Since, A acts as clock for B, each time the waveform at A goes low, flip-flop B will
toggle. Notice that, the waveform at the output of flip-flop B is one-half the frequency
of A and one-fourth the clock frequency.
Since, B acts as clock for C, each time the waveform at B goes low, flip-flop C will
toggle. The waveform at the output of flip-flop C is one-half the frequency of B and
one-eighth the clock frequency.

Problem: What is the clock frequency of a 3-bit ripple counter, if the period of the
MSB waveform is 24 µs?

Solution: Since there are eight clock cycles in one cycle of MSB, the period of the
clock must be 24/8 = 3µs. The clock frequency must be 1/(3*10–6) = 333 KHz.
1. A binary ripple counter in straight binary sequence will be as shown in the above table. A
ripple counter having n flip-flops will have 2n output conditions. For example, the three-flip-
flop counter has 23 = 8 output conditions (000 to 111).
2. A three-flip-flop counter is often referred to as modulus-8 (or Mod-8)
counter, since it has eight states. The modulus of a counter is the total number
of states through which the counter can progress.

No. of Flip-Flops 1 2 3 4 5 n
No. of States 2 4 8 16 32 2n
Problem: How many flip-flops are required to construct a mod-128 counter? A mod-
32 counter? What is the largest decimal number that can be stored in a mod-64
counter?

Solution: A mod-128 counter must have seven flip-flops, since 27 = 128. Five flip-
flops are needed to construct a mod-32 counter. The largest decimal number that can
be stored in a mod-64 (six flip-flops) counter is 111111 = 63.
The 54/7 493A The logic diagram, DIP pinout, and truth table for a 5417493A are given in Fig. This
TTL MSI circuit is a 4-bit binary counter that can be used in either a mod-8 or a mod-16 configuration.
If the clock is applied at input CKB, the outputs will appear at Qs, Qc, and Qn, and this is a mod-8
binary ripple counter exactly like that in Fig. 10.L In this case, flip-flop QA is simply unused.

On the other hand, if the clock is applied at input CKA and flip-flop QA is connected to input CKB, we
have a mod-16, 4-bit binary ripple counter. The outputs are QA, QB, Qc, and QD. The proper truth table
for this connection is given in Fig. 10.2c. All the flip-flops in the 7493A have direct reset inputs that are
active low. Thus a high level at both reset inputs of the NAND gate, R o(I) and Ro(2), is needed to reset all
flip-flops simultaneously. Notice that this reset operation will occur without regard to the clock.
An interesting and useful variation of the 3~bit ripple counter is shown in Fig. The system clock is still
used at the clock input to flip-flop A, but the complement of A, A, is used to drive flipflop B, likewise;
B is used to drive flip-flop C. Take a look at the resulting waveforms. Flip-flop A simply toggles with
each negative clock transition as before. But flip-flop B will toggle each time A goes high! Notice that
each time A goes high, A goes low, and it is this negative transition on A that triggers B. On the time
line, B toggles at points a, c, e, g and i. Similarly, flip-flop C is triggered by B and so C will toggle each
time B goes high. Thus C toggles high at point a on the time line, toggles back low at point e and goes
back high again at point i. The counter contents become ABC= 111 at point a on the time line, change
to 110 at point b, and change to 101 at point c. Notice that the counter contents are reduced by one
count with each clock transition! In other words, the counter is operating in a count-down mode. The
results are summarized in the truth table in Fig. 10.4c. This is still a mod-8 counter, since it has eight
discrete states, but it is connected as a down counter.

A 3-bit asynchronous up-down counter that counts in a straight binary sequence is shown in Fig. It is
simply a combination of the two counters discussed previously. For this counter to progress through a
count-up sequence, it is necessary to trigger each flip-flop with the true side of the previous flip-flop
(as opposed to the complement side.). If the count-down control line is low and the count-up control
line high, this will be the case, and the counter will have count-up waveforms such as those shown in
Fig. for up counter.

On the other hand, if count-down is high and count-up is low, each flip-flop will be triggered from the
complement side of the previous flip-flop. The counter will then be in a count-down mode and will
progress through the waveforms as shown in Fig. for down counter.

DECODING GATES:
A decoding gate can be connected to the outputs of a counter in such a way that the output of the
gate will l,t high (or low) only when the counter contents are equal to a given state. For instance, the
decoding gate connected to the 3-bit ripple counter in Fig. a will decode state 7 ( CBA = 111 ). Thus the
gate output will be high only when A = 1, B = I, and C = 1 and the waveform appearing at the output of
the gate is labeled 7. The Boolean expression for this gate can be written 7 = CBA. A comparison with
the truth table for this counter will reveal that the condition CBA = 111 is true only for· state 7. The
other seven states of the counter can be decoded in a similar fashion. It is only necessary to examine
the truth table for the counter and then the proper Boolean expression for each gate can be written.
For instance, to decode state 5, the truth table reveals that CBA = 101 is the unique state. For the gate
output to be high during this time, we must use C, B, and A at the gate inputs. Notice carefully that if
B = 0, then B The correct Boolean expression is then 5 = CB A, and the desired gate is that given in Fig.
c.

All eight gates necessary to decode the eight states of the 3-bit counter are shown in Fig. a. The gate
outputs are shown in Fig. b. These decoded waveforms are a series of positive pulses that occur in a
strict time sequence and are very useful as control signals throughout a digital system. If we consider
state O as the first event, then state 1 will be the second, state 2 the third, and so on, up to state 7.
Clearly the counter is counting upward in decimal notation from O to 7 and then beginning over again
at 0.
Synchronous Counters
The ripple counter is the simplest to build, but there is a limit to its highest operating frequency. As
previously discussed, each flip-flop has a delay time. In a ripple counter these delay times are additive,
and the total "settling" time for the counter is approximately the delay time times the total number
offlip-flops. Furthermore, there is the possibility of glitches occurring at the output of decoding gates
used with a ripple counter. The first problem fully and the second problem, to some extent can be
overcome by the use of a synchronous parallel counter. The main difference here is that every flip-flop
is triggered in synchronism with the clock.

The construction of one type of parallel binary counter is shown in Fig. along with the truth table and
the waveforms for the natural count sequence. Since each state corresponds to an equivalent binary
number ( or count), we refer to each state as a count from now on.

The basic idea here is to keep the J and K inputs of each flip-flop high, such that the flip-flop will toggle
with any clock NT at its clock input. We then use AND gates to gate every second clock to flip-flop B,
every fourth clock to flip-flop C, and so on. This logic configuration is often referred to as "steering
logic" since the clock pulses are gated or steered to each individual flip-flop. The clock is applied
directly to flip-flop A. Since the JK flip-flop used responds to a negative transition at the clock input
and toggles when both the J and K inputs are high, flip-flop A will change state with each clock NT.
Whenever A is high, AND gate X is enabled and a clock pulse is passed through the gate to the clock
input of flip-flop B. Thus B changes state with every other clock NT at points b, d,f, and hon the time
line. Since, there is an additional AND gate delay for the clock at B flip-flop in comparison to A flip-flop,
it is not a parallel counter in a strict sense of the term. Since AND gate Y is enabled and will transmit
the clock to flip-flop Conly when both A and B are high, flip-flop C changes state with every fourth clock
NT at points d and h on the time line. Examination of the waveforms and the truth table reveals that
this counter progresses upward in a natural binary sequence from count 000 up to count 111,
advancing one count with each clock NT; This is a mod-8 parallel or synchronous binary counter
operating in the count-up mode. Let's see if this counter configuration has cured the glitch problem
discussed previously. The waveforms for this counter are expanded and redrawn in Fig. 10.11, and we
have accounted for the individual flip-flop propagation times.

The counter in Fig. is a synchronous 4-bit up-down counter. To operate in the count-up mode, the
system clock is applied at the count-up input, while the count-down input is held low. To operate in
the countdown mode, the system clock is applied at the count-down input while holding the count-up
input low.
Holding the count-down input low (at ground) will disable AND gates Y1, Y2, and Y3• The clock applied
at count-up will then go directly into flip-flop A and will be steered into the other flip-flops by AND
gates Xi, X2, and X3. This counter will then function exactly as the previously discussed parallel counter
shown in up counter The only difference here is that this is a mod-16counter that advances one count
with each clock NT, beginning with 0000 and ending with 1111. The correct waveforms are shown in
Fig. b. If the count-up line is held low, the upper AND gates X1, X2, and X:1 are disabled. The clock
applied at input count-down will go directly into flip-flop A and be steered into the following flip-flops
by AND gates Y1, Y2, and Y3. Flip-flop A will toggle each time there is a clock NT as shown in Fig. c.
Each time A is high, AND gate Y1 will be enabled and the clock NT will toggle flip-flop Bat points a, c,
e, g, and so on. Whenever both A· and B are high, AND gate Y2 is enabled, and thus a clock will be
steered into flip-flop C at points a, e, i, m, and q. Similarly, AND gate Y3 will steer a clock into flip-flop
D only when A, B, and C are all high. Thus flip-flop D will toggle at points a and i on the time line. The
waveforms in Fig.c clearly show that the counter is operating in a count-down mode, progressing one
count at a time from 1111 to 0000. If you examine the logic diagram for the 54/74193 TTL circuit shown
in Fig. ,This MSI circuit is a synchronous 4-bit up-down counter that can also be cleared and preset to
any desired count-attributes that we discuss later. For now, you should carefully examine the steering
logic for each flip-flop and study the OR gate and the two AND gates at the input of the OR gate used
to provide the clock to each flip-flop

Common questions

Powered by AI

The state decoding process for a 3-bit ripple counter involves using decoding gates to translate the binary output of the counter into a specific high or low signal when the counter reaches certain states. For example, to decode state 7, where the binary output is 111, a Boolean expression such as 7 = CBA is used, and a gate is configured to output high only when this condition is true . The purpose of decoding is to allow for specific actions or signals to be generated based on the binary count, enabling the counter's outputs to control other parts of a digital system effectively .

A ripple counter is a type of asynchronous counter where each flip-flop is triggered by the previous flip-flop, which can lead to cumulative delay because the output of one feeds the clock input of the next. This means the total delay is the sum of the individual delays of the flip-flops . In contrast, a synchronous counter applies the clock input directly to all flip-flops simultaneously, reducing delay since all flip-flops change state at the same time . The primary implication of these differences is that synchronous counters can handle higher frequencies and have a more predictable timing, reducing potential glitches in the output. However, they are often more complex to design compared to ripple counters .

Decoding gates in digital systems connected to counters allow specific binary states to be interpreted as control signals. By using a decoding gate, one can create a logic condition that outputs a high (or low) signal when a certain state in the counting sequence is reached . For instance, a 3-bit ripple counter can have decoding gates configured to detect the binary state 111; the gate's Boolean logic expression, such as 7 = CBA, ensures that the output is high only when this condition is met . This ability lets the digital system respond to specific count sequences, triggering actions or controlling elements within the system, such as enabling signal paths, initialiizing processes, or managing sequential operations effectively controlled by the counter's state transitions .

In asynchronous counters, complementary snap connections can influence the sequence in which the counter progresses through its states. Typically, a flip-flop toggle is driven by the true output of the previous stage. However, by using complementary connections, the counter can be forced into a count-down mode instead of a count-up mode. In this configuration, flip-flops toggle on the opposite phase transition of the previous one, effectively reversing the counting sequence . For instance, using the complement of the output A as the clock signal for the next flip-flop B, B will toggle each time A goes high and returns low, effectively reversing edge-triggered toggling points . This setup allows for flexible design choices that impact whether the counter increases or decreases in count with each clock pulse .

Steering logic in synchronous counters is a technique used to distribute clock pulses intelligently across various flip-flops based on the state of previous stages. In a synchronous counter, every flip-flop is intended to toggle simultaneously with the clock pulse, but steering logic adds the ability to direct specific pulses to toggling specific combinations of flip-flops, thus reducing unnecessary toggling and power consumption . This method uses AND gates to ensure that a toggle occurs only when prior conditions are met, such as the necessary number of leading bits being high, thus ensuring that flip-flop operations proceed only when needed . This not only reduces potential delays created by non-required operations but also eliminates ripple effects seen in asynchronous designs, significantly enhancing the counter's operational efficiency by preventing redundant flips and synchronizing the operation more closely .

A synchronous up-down counter provides the ability to count in both ascending and descending order within a digital system. This flexibility is achieved by altering the steering logic, where the state transitions are governed by which edges are used to trigger the counting sequence . In count-up mode, the clock is steered to increment the value, while in count-down mode, it decrements by toggling upon different logic conditions . The benefits of using such counters include greater flexibility in applications where bi-directional counting is necessary, as well as improved reliability due to synchronous operation that minimizes propagation delays and the risk of glitches . Their versatility and precision in timing control make them advantageous in complex counting scenarios like bidirectional counting, cyclic operations, and in frequency-control settings .

Ripple counters face challenges mainly due to the propagation delay introduced by each flip-flop's inherent delay, as the clock signal is distributed sequentially from one flip-flop to the next. This delay aggregates as the number of flip-flops increases, potentially leading to discrepancies and glitches, especially when outputs are combined for further decoding applications . Synchronous counters address these issues by using a single clock pulse that is applied to all flip-flops simultaneously, eliminating cumulative delays and reducing the chance of glitches . Synchronous counters thus offer a more reliable performance, especially in high-speed applications, despite their increased design complexity .

Designing a mod-128 counter primarily involves ensuring that there are enough flip-flops to represent the required number of states. Since a mod-128 counter has 128 distinct states, the number of flip-flops needed is log2(128) = 7, because 2^7 = 128 . This increase in flip-flops affects the design by first increasing the complexity of the wiring and logic implementation needed to ensure each flip-flop toggles appropriately to count correctly through all states. Additionally, more flip-flops mean a higher potential for propagation delay, which necessitates the use of synchronous designs to maintain precision and efficiency in counting through all states within the desired time frame . It also increases the potential power requirements and physical space needed for the counter, which must be considered in system-level designs .

The modulus of a counter is determined by the number of distinct states it can represent, which is directly linked to the number of flip-flops used. Mathematically, the modulus (or number of states) is 2^n, where n is the number of flip-flops. For example, a 3-bit counter, which consists of three flip-flops, can represent 2^3 = 8 states, making it a mod-8 counter . This relationship allows designers to calculate the number of flip-flops needed for counters with different moduli, such as using seven flip-flops for a mod-128 counter or five for a mod-32 counter .

A state diagram in the context of binary counters is important because it visually represents the sequence of states that the counter will undergo. Each state corresponds to a specific output pattern or condition of the counter. The diagram uses directed graphs, where states are shown as nodes and transitions due to clock pulses are shown as arrows between these nodes . This tool is used to plan and verify the behavior of counters in a design, ensuring that all states are covered and the correct sequence is maintained. It helps in understanding and designing the counting sequence of the counters and in troubleshooting any design issues .

You might also like