Digital Logic
Sequential Circuits
Separate level-sensitive latches from edge-triggered FFs, then apply excitation tables to counters.
GATE CSE sequential logic — latches vs FFs with waveforms, SR/JK/T/D tables, excitation, ripple vs sync counters, shift registers, and exam tricks.
Learning outcomes
- Contrast latches and edge-triggered flip-flops using enable/clock behaviour
- Apply SR/JK/T/D characteristic and excitation tables fluently
- Size mod-N counters and compare async ripple vs synchronous designs
- Trace SISO/SIPO/PISO/PIPO shift-register timing and ring/Johnson counts
Latches vs flip-flops
- Latch: level-sensitive — transparent while enable (EN/G) is active; output can change many times in that window.
- Flip-flop: edge-triggered — samples inputs only on the active clock edge (↑ or ↓); holds between edges.
- Master–slave FF = two latches in series with opposite enables → overall edge behaviour.
- GATE cue words: “transparent”, “while clock is high” → latch; “on rising edge”, “next state after clock” → FF.
- Setup/hold (exam level): data must be stable around the capturing edge; violation → metastability (COA link).
| Device | Sensitive to | GATE cue |
|---|---|---|
| D latch | Enable level | Transparent window |
| D FF | Clock edge | Stores on edge |
| JK FF | Clock edge | Toggle when J=K=1 |
| T FF | Clock edge | Q⁺ = Q ⊕ T |
SR latch & JK flip-flop
- Cross-coupled NOR SR: S=1,R=0 → set; S=0,R=1 → reset; S=R=0 → hold; S=R=1 → invalid/forbidden.
- NAND SR uses active-low inputs (different forbidden row) — read the gate type in the stem.
- JK FF removes the forbidden combo: J=K=1 means toggle (Q⁺ = ¬Q) on the clock edge.
- Race-around: level-triggered JK with J=K=1 may toggle repeatedly while CLK stays 1 if pulse is long. Fix with edge trigger or master–slave.
- D FF is the workhorse for registers; JK/T shine in counters via excitation don’t-cares.
Formulas to remember
-
JK: Q⁺ = J¬Q ∨ ¬K Q -
J=K=1 ⇒ Q⁺ = ¬Q (toggle)
Characteristic & excitation tables
- Characteristic: given inputs (+ clock), what is Q⁺? D: Q⁺=D. T: Q⁺=Q⊕T. JK as above.
- Excitation: given desired Q → Q⁺, what inputs are required? Used when designing counters from a state diagram.
- Shortcuts: D = Q⁺ always. T = Q ⊕ Q⁺. JK has don’t-cares (X) that simplify next-state logic.
- Wiring D = ¬Q turns a D FF into a toggle FF (÷2) each clock.
Formulas to remember
-
Q⁺ = D -
Q⁺ = Q ⊕ T -
T = Q ⊕ Q⁺ (excitation)
Worked example
Problem. Q=1 must become Q⁺=0 on a JK FF. What J,K?
Solution. Need reset: J=X, K=1 (from excitation table).
Counters — ripple vs synchronous
- n flip-flops ⇒ at most 2^n distinct states. Mod-N counter needs ≥ ⌈log₂ N⌉ FFs.
- Async / ripple: later FF clocked by previous Q (or ¬Q). Simple but cumulative delay + decoding spikes.
- Synchronous: all FFs share one clock; combinational excitation logic sets J/K/T/D from current state.
- Unused states (e.g. mod-6 with 3 FFs): must self-correct or explicitly reset — GATE may ask next state from an unused code.
- Up/down and decade (mod-10) counters are the usual numerical/MCQ settings.
Formulas to remember
-
Min FFs for mod-N = ⌈log₂ N⌉ -
mod-6 ⇒ 3 FFs (since 4 < 6 ≤ 8)
Worked example
Problem. Minimum FFs for a mod-12 counter?
Solution. 8 < 12 ≤ 16 ⇒ 4 flip-flops.
Shift registers & ring / Johnson
- SISO: serial in, serial out — n clocks to load/unload n bits.
- SIPO / PISO / PIPO: mix serial and parallel ports; parallel load often completes in 1 clock.
- Universal shift register: mode bits select hold / shift-L / shift-R / parallel load.
- Ring counter (n FFs, one circulating 1): n distinct states. Johnson (twisted ring): typically 2n states.
- Serial adder / sequence detector hardware often uses a shift register + combinational compare.
Formulas to remember
-
SISO n-bit word ↔ n clocks -
Ring: n states; Johnson: 2n states (ideal)
GATE exam tricks — sequential
- “Transparent” / “follows input while enable high” ⇒ latch, not edge FF.
- JK with J=K=1 ⇒ toggle — default correct option unless race-around is the theme.
- Race-around appears only for level-triggered JK (long clock pulse), not proper edge FFs.
- Mod-N sizing: find smallest k with 2^k ≥ N; leftover states are the trap in “next state” questions.
- Ripple vs sync: if the stem mentions propagation delay between stages or glitches, think async.
- Excitation don’t-cares (X) exist for JK/T holds — using them wrong over-constrains the circuit.
- D=¬Q ⇒ divide-by-2; two such stages cascade for ÷4, etc.
- SISO load time = bit width; PIPO load time = 1 clock (if parallel enabled).
Formulas to remember
-
2^k ≥ N ⇒ k FFs minimum -
T_toggle = 1 when Q must flip
Worked example
Problem. A 4-bit SISO register holds ABCD. After 2 clocks (shift toward OUT), what leaves first?
Solution. The bit nearest OUT shifts out first — typically D then C if FF3 is the output end (confirm diagram orientation).
Exam tips
- If the stem says “transparent”, think latch not edge FF.
- Mod-N: ⌈log₂ N⌉ FFs, then ask how unused states are handled.
- JK toggle case J=K=1 is the most tested characteristic row.
- Race-around ⇒ level JK + long clock; solution ⇒ edge or master–slave.
- For counter design, build the state table first, then excitation per FF.
- Ripple counters: clock of FF_{i+1} comes from Q_i — delay adds up.
- SISO needs n clocks for n bits; don’t pick “1 clock” unless PIPO/parallel load.
- Ring → n states; Johnson → 2n — easy recall marks.
10 GATE-style MCQs for Sequential Circuits with full explanations. Attempt each question before revealing the answer.
JK with J=K=1 next state is:
Show answer & explanation
Answer: C
Toggle case Q⁺=¬Q.
Min FFs for mod-12 counter:
Show answer & explanation
Answer: B
8<12≤16 ⇒ 4.
D FF with D=¬Q wired behaves as:
Show answer & explanation
Answer: B
Loads complement each edge → T=1.
Level-sensitive storage is a:
Show answer & explanation
Answer: B
Latch follows while enable is active.
Race-around is associated with:
Show answer & explanation
Answer: B
JK may toggle repeatedly while clock stays high.
n FFs maximum distinct states:
Show answer & explanation
Answer: C
Binary state space size.
SISO 4-bit register loads a word in:
Show answer & explanation
Answer: B
One bit per clock serially.
Characteristic of T FF:
Show answer & explanation
Answer: B
Toggle when T=1.
Async counter clocks later FFs from:
Show answer & explanation
Answer: B
Ripple clocking.
SR latch with S=R=1 (NOR type) is:
Show answer & explanation
Answer: D
Forbidden input combination for cross-coupled NOR SR.
Extra page-specific practice beyond the GATE samples. Attempt all 10, then reveal answers to check your reasoning.
Excitation for D when Q→Q⁺ is 0→1:
Show answer & explanation
Answer: B) D=1
Next state equals D.
Mod-10 minimum FFs:
Show answer & explanation
Answer: B) 4
8<10≤16.
Hold condition for T FF:
Show answer & explanation
Answer: B) T=0
No toggle.
Master–slave FF mainly avoids:
Show answer & explanation
Answer: B) Race-around / transparency issues
Edge-like isolation between master and slave.
Johnson counter with n FFs has how many states typically?
Show answer & explanation
Answer: B) 2n
Twisted ring: 2n distinct states.
PIPO register parallel load needs:
Show answer & explanation
Answer: B) 1 clock (with parallel paths)
All bits loaded together.
JK excitation to go 1→0:
Show answer & explanation
Answer: B) J=0,K=1
Reset input active (K=1,J=0).
Sync counter shares:
Show answer & explanation
Answer: B) Common clock to all FFs
Defining sync property.
Transparent window means:
Show answer & explanation
Answer: B) Output follows input while enable high
Latch behaviour.
Up-counter vs down-counter differs in:
Show answer & explanation
Answer: B) Next-state sequencing direction
Count direction in the state diagram.
Topic FAQs
Is a latch a flip-flop?
Often loosely yes, but GATE distinguishes level-sensitive latches from edge-triggered flip-flops.
What causes race-around in a JK latch/FF?
If J=K=1 while the clock/enable stays active long enough, a level-sensitive JK can toggle more than once. Edge-triggered or master–slave designs prevent that.
How many flip-flops for a mod-N counter?
At least ⌈log₂ N⌉. Extra unused binary codes must be designed not to lock the counter in a bad cycle.
Why prefer synchronous counters?
All stages share one clock, so there is no ripple delay between FFs and fewer decoding glitches — at the cost of more next-state logic.
D FF with D tied to ¬Q does what?
Toggles every clock edge (T≡1). Cascading such stages builds a binary frequency divider.
Ring vs Johnson counter states?
An n-bit ring counter (one hot circulating) has n states. A Johnson (twisted-ring) counter typically has 2n states.
Hover a card to reveal the answer with a 3D flip. On touch devices, tap the card or use Show answer.