Home / Courses / CSIR NET Physics / Practice / Flip-flops, counters and registers

Flip-flops, counters and registers

Electronics · 76 questions and templates for CSIR NET Physics, in order from warm-up to top rank. Check each answer, then read the full solution.

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.

  1. MCQWarm-up

    For an SR latch built from two cross-coupled NOR gates, which input combination is not allowed?
    1. S=0,R=0
    2. S=1,R=0
    3. S=1,R=1
    4. S=0,R=1
    Answer and solution

    Answer: C

    With both inputs 1, both NOR outputs are forced to 0, so Q and Q‾ are no longer complements; and when both inputs return to 0 together the final state depends on which gate is faster. S=R=0 holds the state. (For a NAND latch the forbidden pair is S=R=0 on its active-low inputs.)

    Why people get this wrong: S=R=0 is the memory (hold) condition for a NOR latch.

  2. MCQWarm-up

    An edge-triggered JK flip-flop has J=K=1. At each active clock edge its output
    1. toggles (changes to the opposite state)
    2. resets to 0
    3. sets to 1
    4. stays the same
    Answer and solution

    Answer: A

    The JK characteristic equation Q+=JQ‾+K‾Q gives Q+=Q‾ for J=K=1. This is how a JK flip-flop becomes a T flip-flop and a divide-by-2.

    Why people get this wrong: Thinking J=K=1 is forbidden as in the SR latch; resolving that problem is the reason the JK exists.

  3. MCQWarm-up

    The minimum number of flip-flops for a binary counter that counts through 12 states (mod-12) is
    1. 3
    2. 12
    3. 6
    4. 4
    Answer and solution

    Answer: D

    n flip-flops give 2n states. 23=8<12≤16=24, 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.

  4. 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: 2n=10 states for n=5. A plain ring counter with one circulating 1 has only n=5.

    Why people get this wrong: Confusing it with the ring counter (5) or a binary counter (32).

  5. MCQWarm-up

    The characteristic equation of a D flip-flop is
    1. Q+=DQ‾
    2. Q+=D
    3. Q+=D⊕︎Q
    4. Q+=D‾
    Answer and solution

    Answer: B

    At the clock edge the output takes the value of D, whatever it was before. So Q+=D. D⊕︎Q is the T flip-flop with T=D.

    Why people get this wrong: The D flip-flop has no hold input: holding needs D=Q fed back (or a clock enable).

  6. MSQWarm-up

    Which statements comparing ripple (asynchronous) and synchronous counters are correct?
    1. In a synchronous counter every flip-flop is clocked by the same clock
    2. In a ripple counter the propagation delays add up along the chain
    3. Decoding the outputs of a ripple counter can give short false pulses (glitches)
    4. 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 n 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.

  7. MCQWarm-up

    A state machine has 10 states. With one-hot encoding (exactly one flip-flop set per state), it needs
    1. 4 flip-flops
    2. 10 flip-flops
    3. 5 flip-flops
    4. 1024 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 ⌈log2⁡10⌉=4, 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.

  8. NATStandard

    A 4-bit binary ripple counter is clocked at 16 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 16/24=1 kHz, with a 50% duty cycle.

    Why people get this wrong: Dividing by 4 (the number of flip-flops) instead of 24.

  9. MCQStandard

    The characteristic equation of a JK flip-flop is
    1. Q+=J+KQ
    2. Q+=JK+Q‾
    3. Q+=JQ‾+K‾Q
    4. Q+=J⊕︎K
    Answer and solution

    Answer: C

    From the table: JK=00 holds (Q+=Q), 10 sets, 01 resets, 11 toggles. The K-map of Q+ against J,K,Q simplifies to JQ‾+K‾Q: set when 0 if J=1, stay 1 unless K=1.

    Why people get this wrong: Check the toggle case: J=K=1 must give Q‾.

  10. NATStandard

    An 8-bit serial-in serial-out shift register is clocked at 1 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.

  11. MCQStandard

    To make a T flip-flop from a JK flip-flop, connect
    1. J=T and K=T‾
    2. J=K=T
    3. J=T and K=0
    4. J=Q‾ and K=T
    Answer and solution

    Answer: B

    With J=K=T: T=0 gives hold, T=1 gives toggle, exactly the T flip-flop. J=T, K=T‾ gives a D flip-flop instead.

    Why people get this wrong: J=D, K=D‾ is the JK-to-D conversion.

  12. NATStandard

    A 4-bit ripple up-counter has its asynchronous clear driven by a NAND gate whose inputs are Q3 and Q1 (Q0 is the least significant bit). Starting from 0000, it cycles through how many stable states?
    Answer and solution

    Answer: 10

    The first count with Q3=Q1=1 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.

  13. MCQStandard

    A level-triggered JK flip-flop with J=K=1 suffers the race-around condition when
    1. the clock is high for longer than the flip-flop's propagation delay, so it toggles more than once per pulse
    2. the clock is too slow overall
    3. the inputs change after the clock goes low
    4. 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 J, K 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.

  14. MCQStandard

    What distinguishes a D latch from an edge-triggered D flip-flop?
    1. The latch has no enable input
    2. The latch can only store a 1
    3. The latch is transparent: its output follows D for as long as the enable is active, while the flip-flop samples D only at the clock edge
    4. 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.

  15. MSQStandard

    For a 4-bit Johnson counter in its normal sequence, which statements are correct?
    1. It has 8 states
    2. Successive states differ in exactly one bit
    3. Each state can be decoded with a single 2-input gate
    4. 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.

  16. 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: 4×10=40 ns. The period must be at least that: fmax=1/40 ns=25 MHz.

    Why people get this wrong: Using one flip-flop delay (100 MHz) as for a synchronous counter.

  17. MCQStandard

    A JK flip-flop must go from Q=0 to Q=1 at the next clock edge. The required inputs are (X = don't care)
    1. J=0, K=X
    2. J=X, K=1
    3. J=X, K=0
    4. J=1, K=X
    Answer and solution

    Answer: D

    From 0, either "set" (J=1, K=0) or "toggle" (J=1, K=1) gives 1. So J=1, K=X. Excitation tables like this are the starting point for synchronous counter design.

    Why people get this wrong: J=X, K=0 is the excitation for 1→1.

  18. MCQStandard

    A ring counter of 6 flip-flops holds a single 1 that circulates, clocked at 12 MHz. The waveform at any one flip-flop output has
    1. frequency 2 MHz and duty cycle 1/6
    2. frequency 2 MHz and duty cycle 50%
    3. frequency 1 MHz and duty cycle 50%
    4. frequency 12 MHz and duty cycle 1/6
    Answer and solution

    Answer: A

    The single 1 returns to the same flip-flop every 6 clocks, so each output repeats at 12/6=2 MHz. It is high for 1 clock out of 6: duty cycle 1/6. (A Johnson counter of the same length would give 50% duty at 1 MHz.)

    Why people get this wrong: A 50% duty cycle belongs to the Johnson (twisted-ring) counter.

  19. NATStandard

    A serial link (UART) sends each byte as 1 start bit, 8 data bits, no parity and 1 stop bit, at 9600 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 1+8+1=10 bits. At 9600 bit/s that takes 10/9600=1.042 ms, so the link carries at most 960 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 0.83 ms; start and stop bits also take line time.

  20. 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: T≥tcq+tlogic+tsu=17 ns. fmax=1/17 ns=58.8 MHz.

    Why people get this wrong: Leaving out the setup time or the clock-to-Q delay.

  21. 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: tcq,min+tlogic,min≥th+tskew. So tskew≤1.0+0.5−0.8=0.7 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.

  22. MCQExam level

    Three D flip-flops have D2=Q1, D1=Q0 and D0=Q‾2. Starting from Q2Q1Q0=000, the state after 4 clock edges is
    1. 111
    2. 110
    3. 100
    4. 011
    Answer and solution

    Answer: B

    Each edge shifts left and feeds in Q‾2: 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 Q2 instead of its complement gives a ring that stays at 000.

  23. 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: 26−1=63. 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.

  24. MCQExam level

    In a Mealy state machine, the outputs depend on
    1. the present state only
    2. the present state and the present inputs
    3. the inputs only, with no memory
    4. 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.

  25. 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.

  26. MSQExam level

    Which statements about metastability in flip-flops are correct?
    1. It can occur when the data changes inside the setup-hold window around the clock edge
    2. A chain of two flip-flops (a synchroniser) greatly reduces the chance that a metastable value reaches the logic
    3. The mean time between failures grows exponentially with the time allowed for the flip-flop to resolve
    4. 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 et/τ. Giving it one more clock period to resolve multiplies the MTBF by eT/τ. The probability can be made tiny but never zero.

    Why people get this wrong: Metastability is reduced, never eliminated.

  27. NATExam level

    A 3-bit synchronous counter has J0=K0=1, J1=K1=Q0 and J2=K2=Q0Q1. Starting from 000, after 13 clock edges its state, read as a binary number Q2Q1Q0, is ______.
    Answer and solution

    Answer: 5

    Bit 0 toggles every edge, bit 1 when Q0=1, bit 2 when Q0Q1=1: a binary up-counter, mod 8. After 13 edges: 13mod8=5 (101).

    Why people get this wrong: Reading it as a down counter.

  28. MCQExam level

    A ripple counter uses positive-edge-triggered T flip-flops (T=1), each clocked from the Q output of the previous one. It counts
    1. up
    2. down
    3. up to 3 and stops
    4. not at all: the outputs stay at 0
    Answer and solution

    Answer: B

    Bit 1 toggles when Q0 rises (0 → 1). From 00: Q0 rises, so Q1 toggles: 11; next Q0 falls: 10; then rises: Q1 toggles: 01; then 00. The sequence 0, 3, 2, 1 is a down count. Negative-edge flip-flops clocked from Q (or positive-edge from Q‾) count up.

    Why people get this wrong: Assuming every ripple counter counts up.

  29. NATExam level

    A Johnson counter with 5 flip-flops is clocked at 1 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 2n=10 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).

  30. MCQExam level

    A JK flip-flop has its own outputs fed back to its inputs: J=Q‾ and K=Q. At each clock edge it
    1. holds its state
    2. resets to 0
    3. sets to 1
    4. toggles
    Answer and solution

    Answer: D

    Q+=JQ‾+K‾Q=Q‾⋅Q‾+Q‾⋅Q=Q‾. With Q=0 it sees J=1, K=0 (set); with Q=1 it sees J=0, K=1 (reset): it toggles.

    Why people get this wrong: Plugging in the inputs without letting them depend on Q.

← All topics · Timed mock test →