In digital electronics, circuits are broadly classified into combinational and sequential types. Understanding the difference between them is essential before diving into flip-flops and counters.
Combinational circuits are those whose outputs depend only on the current inputs. Examples include adders and multiplexers. However, these circuits have no memory, meaning they do not store or remember previous input states.
Sequential circuits, on the other hand, produce outputs that depend not only on current inputs but also on past inputs-this implies they have memory elements. The ability to store information from previous states makes sequential circuits fundamental in building memory units, registers, and counters.
Why is memory important? Imagine a digital clock that needs to keep track of time. Without a way to remember the current count (hours, minutes, seconds), it couldn't progress logically. Sequential circuits achieve this by using basic building blocks called flip-flops, which store single bits of information.
In sequential circuits, a timing mechanism called the clock controls when data is sampled and updated, enabling synchronized and predictable operation.
Flip-flops are fundamental storage elements in digital electronics. Each flip-flop can store one binary bit (0 or 1). The key feature that distinguishes various flip-flops is how their inputs control the stored output state.
Four common types of flip-flops used in sequential circuits are:
Each flip-flop responds to inputs (and usually a clock signal) to change their output state Q. Let's examine each type with their characteristic truth tables, circuit symbols, and behavior.
| S | R | Q(next) | Remark |
|---|---|---|---|
| 0 | 0 | Q(previous) | Hold state |
| 0 | 1 | 0 | Reset |
| 1 | 0 | 1 | Set |
| 1 | 1 | Invalid | Not allowed |
| J | K | Q(next) | Remark |
|---|---|---|---|
| 0 | 0 | Q(previous) | Hold state |
| 0 | 1 | 0 | Reset |
| 1 | 0 | 1 | Set |
| 1 | 1 | Q′(Toggles) | Toggle |
| D | Q(next) | Remark |
|---|---|---|
| 0 | 0 | Output follows input |
| 1 | 1 | Output follows input |
| T | Q(next) | Remark |
|---|---|---|
| 0 | Q(previous) | Hold state |
| 1 | Q′(Toggle) | Toggle output |
Notice the simplicity and increasing versatility from SR to JK flip-flops, and then to D and T types which are widely used in counter designs and data storage.
Counters are sequential circuits designed to count pulses and produce a binary (or other based) count sequence as output. They are implemented by connecting flip-flops in specific configurations. Generally, there are two types of counters:
The key difference is timing: asynchronous counters experience propagation delays causing ripple effects, while synchronous counters avoid such delays using common clocking.
Two special variants often appear in exam questions:
Let's visualize a 4-bit asynchronous (ripple) counter using JK flip-flops.
graph TD FF0[JK Flip-Flop Q0] --> FF1[JK Flip-Flop Q1] FF1 --> FF2[JK Flip-Flop Q2] FF2 --> FF3[JK Flip-Flop Q3] Clock --> FF0 FF0 --> FF1.clock FF1 --> FF2.clock FF2 --> FF3.clock
Here, each flip-flop toggles its state when the previous flip-flop changes from 1 to 0 on its output, creating a binary counting sequence.
sequenceDiagram participant Clock participant Q0 participant Q1 participant Q2 participant Q3 Clock->>Q0: Toggle on rising edge note right of Q0: Q0 toggles every clock cycle Q0->>Q1: Toggle on Q0 falling edge note right of Q1: Q1 toggles every 2 clock cycles Q1->>Q2: Toggle on Q1 falling edge note right of Q2: Q2 toggles every 4 clock cycles Q2->>Q3: Toggle on Q2 falling edge note right of Q3: Q3 toggles every 8 clock cycles
This illustrates the characteristic "ripple" effect of asynchronous counters, where outputs change one after another, with a delay at each flip-flop.
Step 1: Use three JK flip-flops: FF0, FF1, and FF2, where each flip-flop output is named Q0, Q1, and Q2 respectively.
Step 2: Connect the clock input of FF0 to the external clock pulse. Both J and K inputs of all flip-flops are connected to logic high (1) to ensure toggling on every triggering clock edge.
Step 3: Connect the clock input of FF1 to the output Q0 of FF0, and the clock input of FF2 to output Q1 of FF1.
Step 4: The outputs Q2 Q1 Q0 represent the binary count, with Q0 as the least significant bit.
Counting sequence:
| Count | Q2 | Q1 | Q0 |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 1 | 0 | 0 | 1 |
| 2 | 0 | 1 | 0 |
| 3 | 0 | 1 | 1 |
| 4 | 1 | 0 | 0 |
| 5 | 1 | 0 | 1 |
| 6 | 1 | 1 | 0 |
| 7 | 1 | 1 | 1 |
Answer: By connecting JK flip-flops as described, the circuit will count from 0 to 7 (binary) on successive clock pulses, toggling correctly with propagation delay inducing ripple.
Step 1: Write the truth table:
| J | K | Q | \( Q_{next} \) |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 1 |
| 0 | 1 | 0 | 0 |
| 0 | 1 | 1 | 0 |
| 1 | 0 | 0 | 1 |
| 1 | 0 | 1 | 1 |
| 1 | 1 | 0 | 1 |
| 1 | 1 | 1 | 0 |
Step 2: From the table, \( Q_{next} \) can be expressed as:
\[ Q_{next} = J \overline{Q} + \overline{K} Q \]
Explanation:
This characteristic equation is widely used for JK flip-flop analysis.
Answer: The characteristic equation is \( Q_{next} = J \overline{Q} + \overline{K} Q \).
Step 1: Since mod-6 requires counting 6 states, minimum flip-flops needed are \( n \) such that \( 2^n \geq 6 \); here \( n=3 \) flip-flops (Q2 Q1 Q0).
Step 2: List desired counting sequence in binary:
| Count | Q2 | Q1 | Q0 |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 1 | 0 | 0 | 1 |
| 2 | 0 | 1 | 0 |
| 3 | 0 | 1 | 1 |
| 4 | 1 | 0 | 0 |
| 5 | 1 | 0 | 1 |
After state 5 (binary 101), the counter resets to 0 (000).
Step 3: State transitions:
| Present State (Q2 Q1 Q0) | Next State (Q2' Q1' Q0') |
|---|---|
| 000 | 001 |
| 001 | 010 |
| 010 | 011 |
| 011 | 100 |
| 100 | 101 |
| 101 | 000 |
Step 4: Use JK flip-flop excitation table to find J and K inputs for each flip-flop:
| Flip-Flop | Present Q | Next Q | J | K |
|---|---|---|---|---|
| Q0 | 0 | 1 | 1 | X (don't care) |
| 1 | 0 | X | 1 | |
| 0 | 0 | 0 | 0 | |
| 1 | 1 | 0 | 0 |
Similarly for Q1 and Q2 (due to space limits, refer to flip-flop excitation tables or use Karnaugh maps for simplification).
Step 5: Derive logic expressions for J and K inputs for each flip-flop using Karnaugh maps based on state transitions.
Result: A synchronous mod-6 counter with proper inputs to JK flip-flops which counts 0 to 5 and resets.
Note: This example requires stepwise Karnaugh minimization and is a common topic in entrance exams.
Step 1: In SR flip-flop, the input condition S=1 and R=1 is invalid and causes unpredictable outputs.
Step 2: To avoid this, feed the output Q back into the inputs such that:
This feedback removes the invalid state since when J=K=1, the flip-flop toggles the output rather than entering invalid condition.
Step 3: The new inputs J and K control the SR inputs with logic circuits to create a toggle action when both are 1.
Answer: By connecting inputs as \( S = J \overline{Q} \), \( R = K Q \), the SR flip-flop behaves as a JK flip-flop without invalid input combination.
Step 1: Setup time is the minimum time before the clock edge that the data input (D) must be stable.
Step 2: Hold time is the minimum time after the clock edge that the data input remains stable.
Step 3: Propagation delay (\( t_p \)) is the time taken by the flip-flop output to respond after the triggering clock edge. It can be separated into \( t_{PHL} \) (output transitions from high to low) and \( t_{PLH} \) (low to high).
Answer: The data input must be stable at least for the setup time before the clock rising edge and remain stable for the hold time after it. The output Q changes state after the propagation delay on the clock's triggering edge.
When to use: While designing counters or sequential logic for efficient input calculation.
When to use: To speed up analysis without re-checking truth tables.
When to use: To quickly predict glitches or timing issues in ripple counters.
When to use: For minimizing combinational logic complexity in counters.
When to use: While solving timing and waveform-based exam problems.
Progress tracking is paywalled — subscribe to mark subtopics as understood and save your streak.
Go to practice →