Flip-flops, counters and registers
Electronics · 81 questions and templates for GATE Physics, in order from warm-up to top rank. Check each answer, then read the full solution.
New to this topic? Read the lesson first: Flip-flops, counters and registers.
Loading questions… (they need JavaScript; nothing you type is sent anywhere)
Written questions with solutions
The same questions as a list, so you can print them or read without the practice box. Templates (fresh numbers) appear only in the practice box above.
-
MCQWarm-up
For an SR latch built from two cross-coupled NOR gates, which input combination is not allowed?Answer and solution
Answer: C
With both inputs 1, both NOR outputs are forced to 0, so and are no longer complements; and when both inputs return to 0 together the final state depends on which gate is faster. holds the state. (For a NAND latch the forbidden pair is on its active-low inputs.)Why people get this wrong: is the memory (hold) condition for a NOR latch.
-
MCQWarm-up
An edge-triggered JK flip-flop has . At each active clock edge its output- toggles (changes to the opposite state)
- resets to 0
- sets to 1
- stays the same
Answer and solution
Answer: A
The JK characteristic equation gives for . This is how a JK flip-flop becomes a T flip-flop and a divide-by-2.Why people get this wrong: Thinking is forbidden as in the SR latch; resolving that problem is the reason the JK exists.
-
MCQWarm-up
The minimum number of flip-flops for a binary counter that counts through 12 states (mod-12) is- 3
- 12
- 6
- 4
Answer and solution
Answer: D
flip-flops give states. , so 4 are needed (4 of the 16 states unused).Why people get this wrong: A ring counter would need 12 and a Johnson counter 6, but the question asks for a binary counter.
-
NATWarm-up
A Johnson (twisted-ring) counter is built with 5 flip-flops. The number of distinct states in its normal sequence is ______.Answer and solution
Answer: 10
In a Johnson counter the complement of the last output is fed back to the first. Ones fill in from one end and then zeros: states for . A plain ring counter with one circulating 1 has only .Why people get this wrong: Confusing it with the ring counter (5) or a binary counter (32).
-
MCQWarm-up
The characteristic equation of a D flip-flop isAnswer and solution
Answer: B
At the clock edge the output takes the value of , whatever it was before. So . is the T flip-flop with .Why people get this wrong: The D flip-flop has no hold input: holding needs fed back (or a clock enable).
-
MSQWarm-up
Which statements comparing ripple (asynchronous) and synchronous counters are correct?- In a synchronous counter every flip-flop is clocked by the same clock
- In a ripple counter the propagation delays add up along the chain
- Decoding the outputs of a ripple counter can give short false pulses (glitches)
- Synchronous counters need no logic gates at all
Answer and solution
Answer: A, B, C
Ripple counters clock each flip-flop from the previous output, so the last one changes delays after the clock and passes through wrong intermediate states (011 goes to 010, 000, then 100). A synchronous counter changes all bits together, but it needs gates to decide which bits toggle.Why people get this wrong: Synchronous counters trade gates for speed and clean outputs.
-
MCQWarm-up
A state machine has 10 states. With one-hot encoding (exactly one flip-flop set per state), it needs- flip-flops
- flip-flops
- flip-flops
- flip-flops
Answer and solution
Answer: B
One-hot gives each state its own flip-flop, so 10 states need 10 flip-flops. Binary encoding would need only , but one-hot makes the next-state and output logic simpler and faster, which is why it is common in FPGAs.Why people get this wrong: 4 is the binary-encoded count; the question fixes the encoding.
-
NATStandard
A 4-bit binary ripple counter is clocked at kHz. The frequency of the square wave at its most significant output is ______ kHz.Answer and solution
Answer: 1 kHz
Each flip-flop divides by 2, so the fourth output runs at kHz, with a 50% duty cycle.Why people get this wrong: Dividing by 4 (the number of flip-flops) instead of .
-
MCQStandard
The characteristic equation of a JK flip-flop isAnswer and solution
Answer: C
From the table: holds (), sets, resets, toggles. The K-map of against simplifies to : set when 0 if , stay 1 unless .Why people get this wrong: Check the toggle case: must give .
-
NATStandard
An 8-bit serial-in serial-out shift register is clocked at MHz. A bit entering the serial input appears at the serial output after ______ μs.Answer and solution
Answer: 8 μs
Each clock moves the bit one stage, so it needs 8 clocks of 1 μs each: 8 μs. Shift registers make digital delay lines this way.Why people get this wrong: Answering 7: the bit is at the output only after the eighth edge.
-
MCQStandard
To make a T flip-flop from a JK flip-flop, connect- and
- and
- and
Answer and solution
Answer: B
With : gives hold, gives toggle, exactly the T flip-flop. , gives a D flip-flop instead.Why people get this wrong: , is the JK-to-D conversion.
-
NATStandard
A 4-bit ripple up-counter has its asynchronous clear driven by a NAND gate whose inputs are and ( is the least significant bit). Starting from 0000, it cycles through how many stable states?Answer and solution
Answer: 10
The first count with is 1010 = 10. As soon as it appears the counter clears to 0000, so 1010 lasts only a few nanoseconds. Stable states: 0 to 9: a decade (mod-10) counter.Why people get this wrong: Counting the momentary state 1010 as an eleventh state.
-
MCQStandard
A level-triggered JK flip-flop with suffers the race-around condition when- the clock is high for longer than the flip-flop's propagation delay, so it toggles more than once per pulse
- the clock is too slow overall
- the inputs change after the clock goes low
- it is replaced by an edge-triggered device
Answer and solution
Answer: A
While the clock is high the flip-flop is transparent: it toggles, the new output feeds back through , and toggles it again, repeatedly, until the clock falls. The final state is unpredictable. Master-slave and edge-triggered designs allow only one change per clock.Why people get this wrong: The fix is a short sampling window, not a slower clock.
-
MCQStandard
What distinguishes a D latch from an edge-triggered D flip-flop?- The latch has no enable input
- The latch can only store a 1
- The latch is transparent: its output follows for as long as the enable is active, while the flip-flop samples only at the clock edge
- There is no difference in behaviour
Answer and solution
Answer: C
A latch is level sensitive; a flip-flop is edge sensitive. In a pipeline of latches clocked together, data could race through several stages in one clock phase; flip-flops prevent that.Why people get this wrong: Both store one bit; the difference is when they listen to the input.
-
MSQStandard
For a 4-bit Johnson counter in its normal sequence, which statements are correct?- It has 8 states
- Successive states differ in exactly one bit
- Each state can be decoded with a single 2-input gate
- It returns to the normal sequence by itself from any power-up state
Answer and solution
Answer: A, B, C
The sequence is 0000, 1000, 1100, 1110, 1111, 0111, 0011, 0001: 8 states, one bit changing at a time, and each state is identified by one adjacent pair of bits (so glitch-free 2-input decoding). The other 8 states form a separate loop; without extra logic a counter that starts there stays there.Why people get this wrong: The unused states of a Johnson counter form a lock-out loop.
-
NATStandard
A 4-bit ripple counter uses flip-flops with a propagation delay of 10 ns. If every output must settle before the next clock edge, the highest clock frequency is ______ MHz.Answer and solution
Answer: 25 MHz
The worst case (for example 0111 to 1000) ripples through all four flip-flops: ns. The period must be at least that: MHz.Why people get this wrong: Using one flip-flop delay (100 MHz) as for a synchronous counter.
-
MCQStandard
A JK flip-flop must go from to at the next clock edge. The required inputs are ( = don't care)- ,
- ,
- ,
- ,
Answer and solution
Answer: D
From 0, either "set" (, ) or "toggle" (, ) gives 1. So , . Excitation tables like this are the starting point for synchronous counter design.Why people get this wrong: , is the excitation for .
-
MCQStandard
A ring counter of 6 flip-flops holds a single 1 that circulates, clocked at MHz. The waveform at any one flip-flop output has- frequency MHz and duty cycle
- frequency MHz and duty cycle
- frequency MHz and duty cycle
- frequency MHz and duty cycle
Answer and solution
Answer: A
The single 1 returns to the same flip-flop every 6 clocks, so each output repeats at MHz. It is high for 1 clock out of 6: duty cycle . (A Johnson counter of the same length would give 50% duty at MHz.)Why people get this wrong: A 50% duty cycle belongs to the Johnson (twisted-ring) counter.
-
NATStandard
A serial link (UART) sends each byte as 1 start bit, 8 data bits, no parity and 1 stop bit, at baud (bits per second), with no gaps between frames. Sending one byte takes ______ ms (to two decimal places).Answer and solution
Answer: 1.04 (±0.01)
Each frame is bits. At bit/s that takes ms, so the link carries at most bytes per second. The shift register in the receiver is clocked from a local clock that samples the middle of each bit.Why people get this wrong: Counting only the 8 data bits gives ms; start and stop bits also take line time.
-
NATExam level
In a synchronous circuit, a flip-flop with clock-to-Q delay 3 ns drives combinational logic with a worst-case delay of 12 ns into a flip-flop with setup time 2 ns (no clock skew). The maximum clock frequency is ______ MHz (to one decimal place).Answer and solution
Answer: 58.8 MHz (±0.1)
The data launched at one edge must arrive a setup time before the next: ns. MHz.Why people get this wrong: Leaving out the setup time or the clock-to-Q delay.
-
NATExam level
A flip-flop has minimum clock-to-Q delay 1.0 ns and drives a path with minimum logic delay 0.5 ns into a flip-flop with hold time 0.8 ns. The largest clock skew (capture clock arriving later than launch clock) the path can tolerate without a hold violation is ______ ns.Answer and solution
Answer: 0.7 ns (±0.01)
Hold requires the new data not to reach the capturing flip-flop until a hold time after its clock edge: . So ns. Note that the clock period does not enter hold checks.Why people get this wrong: Trying to fix a hold problem by slowing the clock: it does not help.
-
MCQExam level
Three D flip-flops have , and . Starting from , the state after 4 clock edges is- 111
- 110
- 100
- 011
Answer and solution
Answer: B
Each edge shifts left and feeds in : 000 → 001 → 011 → 111 → 110 (after 4) → 100 → 000. It is a 3-bit Johnson counter with 6 states.Why people get this wrong: Shifting in instead of its complement gives a ring that stays at 000.
-
NATExam level
A 6-bit linear feedback shift register (XOR feedback) with well-chosen taps runs through a maximal-length sequence. Its length (number of distinct states) is ______.Answer and solution
Answer: 63
With XOR feedback the all-zero state maps to itself, so it cannot be part of the cycle. A primitive feedback polynomial visits every other state: . These sequences are used as pseudo-random generators and in CRC and scrambler circuits.Why people get this wrong: Answering 64: the all-zero state is a trap state for XOR feedback.
-
MCQExam level
In a Mealy state machine, the outputs depend on- the present state only
- the present state and the present inputs
- the inputs only, with no memory
- the clock frequency
Answer and solution
Answer: B
Moore outputs are functions of the state only, so they change only after a clock edge. Mealy outputs also depend on the inputs, so they can respond within the same clock cycle and the machine often needs fewer states.Why people get this wrong: State only is the Moore machine.
-
NATExam level
A Mealy machine must output 1 whenever the last four input bits are 1011 (overlapping allowed). The minimum number of states is ______.Answer and solution
Answer: 4
States remember the longest useful prefix seen: S0 (nothing), S1 ("1"), S2 ("10"), S3 ("101"). In S3 an input 1 completes 1011: output 1 and go to S1 (the final 1 starts a new match). A Moore machine needs a fifth state to hold the output.Why people get this wrong: Adding a separate "found" state belongs to the Moore design.
-
MSQExam level
Which statements about metastability in flip-flops are correct?- It can occur when the data changes inside the setup-hold window around the clock edge
- A chain of two flip-flops (a synchroniser) greatly reduces the chance that a metastable value reaches the logic
- The mean time between failures grows exponentially with the time allowed for the flip-flop to resolve
- A fast enough flip-flop removes metastability completely
Answer and solution
Answer: A, B, C
A flip-flop is a bistable circuit; a violated window can leave it balanced near the midpoint, from which it escapes as . Giving it one more clock period to resolve multiplies the MTBF by . The probability can be made tiny but never zero.Why people get this wrong: Metastability is reduced, never eliminated.
-
NATExam level
A 3-bit synchronous counter has , and . Starting from 000, after 13 clock edges its state, read as a binary number , is ______.Answer and solution
Answer: 5
Bit 0 toggles every edge, bit 1 when , bit 2 when : a binary up-counter, mod 8. After 13 edges: (101).Why people get this wrong: Reading it as a down counter.
-
MCQExam level
A ripple counter uses positive-edge-triggered T flip-flops (), each clocked from the output of the previous one. It counts- up
- down
- up to 3 and stops
- not at all: the outputs stay at 0
Answer and solution
Answer: B
Bit 1 toggles when rises (0 → 1). From 00: rises, so toggles: 11; next falls: 10; then rises: toggles: 01; then 00. The sequence 0, 3, 2, 1 is a down count. Negative-edge flip-flops clocked from (or positive-edge from ) count up.Why people get this wrong: Assuming every ripple counter counts up.
-
NATExam level
A Johnson counter with 5 flip-flops is clocked at MHz. The frequency of the square wave at any one flip-flop output is ______ kHz.Answer and solution
Answer: 100 kHz
The normal sequence has states, and each output is high for 5 consecutive states and low for 5. So each output repeats every 10 clocks: 100 kHz with a 50% duty cycle.Why people get this wrong: Dividing by 5 (a ring counter) or by 32 (a binary counter).
-
MCQExam level
A JK flip-flop has its own outputs fed back to its inputs: and . At each clock edge it- holds its state
- resets to 0
- sets to 1
- toggles
Answer and solution
Answer: D
. With it sees , (set); with it sees , (reset): it toggles.Why people get this wrong: Plugging in the inputs without letting them depend on .