GATE Electronics (EC): Digital Circuits (Boolean algebra, K-maps, logic gates, MUX, flip-flops, counters, timing, ADC/DAC, memory), previous-year questions solved, part 2
Part 2 of 2 of the Digital Circuits: Flip-Flops, MUX, ADC hub: 17 more official GATE EC questions on flip-flops, counters, shift registers and timing, ADCs, DACs and sample-and-hold and memory and computer organisation, each solved step by step and checked against the official answer key. Part 1 covers number systems, Boolean algebra and K-maps and logic gates, CMOS logic, multiplexers and encoders.
Questions from official GATE EC papers (IIT Kharagpur 2022, IIT Kanpur 2023, IISc Bengaluru 2024, IIT Roorkee 2025, IIT Guwahati 2026); solutions by Skill-Lync. · Updated 17 Nov 2026 · 17 of 32 questions on this page
2-bit counter LSB drives J and K of a flip-flop: Q frequency and duty cycle for a 25% duty clock?
- (A)frequency is and duty cycle is 50%
- (B)frequency is and duty cycle is 25%
- (C)frequency is and duty cycle is 50%
- (D)frequency is and duty cycle is 25%
Answer: (A) Official key: A
- Both the counter and the flip-flop are edge triggered on the same clock, so only the clock frequency matters. The 25% duty cycle changes nothing, because the output moves only at the rising edge.
- The counter LSB toggles every clock: . It is wired to and together, so .
- With the flip-flop toggles, with it holds. The flip-flop sees the old LSB at each edge, so it toggles on every second clock edge.
- Q over eight clocks: . One full Q cycle lasts 4 clocks and Q is high for 2 of them.
- Frequency , duty cycle 50%: option (A).
Trap: treating the flip-flop as a plain toggle ( always). Then Q toggles on every clock, giving with 50%, option (C). We simulated both wirings: the drawn one gives and 50%, the wrong one gives and 50%.
Using one register's output as the toggle enable of the next is how a synchronous counter divides a clock without ever clocking one flip-flop from another's output. FPGA designers do it with a clock enable rather than a derived clock.
Three D flip-flops in series at 1 GHz: what are the throughput (Mbit/s) and latency (ns)?
- (A)1000, 3
- (B)333.33, 1
- (C)2000, 3
- (D)333.33, 3
Answer: (A) Official key: A
- On each rising edge every flip-flop copies its D input, so a new bit enters and a bit leaves on every clock.
- Throughput one bit per clock .
- A bit has to pass 3 flip-flops, so it appears at the output 3 clock edges after it entered. Latency .
- Option (A).
Trap: dividing the rate by the number of stages, , option (D). Stages add delay, not a slower rate, because all three flip-flops work on different bits at the same time. A clock-by-clock simulation showed one bit out per clock and a 3-clock shift.
Latency and throughput are separate numbers in every pipelined design: a 3-stage pipeline in a DSP block or a CPU adds 3 cycles of delay but still delivers one result per clock.
Cross-coupled NAND gates, 1 ns per gate: what is the critical path delay in ns?
Answer: Official key: 02 to 02
- The circuit is an SR latch: the upper NAND has inputs and and drives ; the lower NAND has inputs and and drives .
- A change at goes through the upper NAND first: updates after 1 ns.
- The new is an input of the lower NAND, so updates 1 ns later, at 2 ns. A change at does the same in the other order.
- The longest path from an input to an output passes through both gates once: 2 ns.
Trap: answering 1 ns, the delay of the gate you drive. only settles after has changed, at 2 ns. Going round the loop again is not a new path, because the outputs have already settled. A unit-delay simulation from every stable state settled in at most 2 ns, and a path search found the same 2.
Latches and cross-coupled gates are why static timing tools break feedback loops before they report a critical path: the loop is not a path, so the tool cuts it. Real SR latches are also used to debounce a switch.
Two D flip-flops with Q2 fed to D1 and Q1-bar to D2, Q1 = 1, Q2 = 0, 1 MHz clock: frequency of Q2?
Answer: Official key: 250 to 250 OR 500 to 500
- From the figure, and . On each clock, and .
- from : , and then it repeats. This is a 2-bit Johnson (twisted-ring) counter with 4 states.
- over the four clocks is : one full cycle every 4 clocks.
- .
Note: the official key accepts 250 and also 500. The circuit as drawn gives 250. The 500 kHz that the key also accepts is what you get by assuming toggles on every clock, as a single flip-flop with would. Both answers earned the marks in GATE 2023, but the circuit as drawn goes through four states, so 250 kHz is the frequency it actually produces. We simulated 40 clocks and measured the period of : 4 clocks.
A twisted-ring (Johnson) counter has only one bit changing per state, which makes its outputs glitch-free and easy to decode. It is used for sequencing and for dividing a clock by an even number without extra logic.
Two T flip-flops with T1 = Q1 + Q0 bar and T0 = Q1 + Q0: what is the state sequence?
- (A)
- (B)
- (C)
- (D)
Answer: (B) Official key: B
- Read the gates off the figure: and . A T flip-flop toggles when its input is and holds when it is .
- : , . Only toggles: next state .
- : , . Both toggle: , , next state .
- : , . Only toggles: next state .
- : , . Both toggle: next state .
- So the circuit cycles , and the unused state falls into it. Starting from the sequence is : option (B).
Trap: option (A), which sends to . At both inputs are (because makes both OR gates ), so both bits toggle and the next state is , not . We computed the next state of all four states from the toggle rule and checked each option transition by transition: only (B) has every step valid.
Counters built from toggle flip-flops are the ripple and synchronous counters inside every timer peripheral. Designers also check that unused states such as fall back into the main cycle, so a glitch cannot lock a state machine in a dead state.
Two MUX-fed D flip-flops with SEL and S waveforms: what is the sequence of Y from T0 to T3?
The sequence of output from time to is ________.
- (A)1011
- (B)0100
- (C)0010
- (D)1101
Answer: (A) Official key: A
- The multiplexers pass the input marked when and the input marked when . So if else , and if else . .
- The flip-flops load on the rising clock edges, which come just before each of . Read and at each of these edges: and .
- Edge before : , so , whatever the old state was. .
- Edge before : , . , old . .
- Edge before : , . , old . .
- Edge before : . , . .
- from to is : option (A).
Trap: option (B), , which is the exact complement. It comes from using on one flip-flop and on the other, or from reading the XOR as an XNOR. We simulated the circuit clock by clock from all four possible power-up states: every start gives , so the answer does not depend on the unknown initial state. The and transitions all fall between a falling edge and the next rising edge, so which value each flip-flop samples is unambiguous.
A flip-flop with a multiplexer on its D input is the standard load-enable and scan-mux cell of every register in a chip: SEL chooses between functional data and a test or hold value, and the second stage picks up the previous stage's old value, just as in a shift register.
Two D flip-flops and an AND gate (1 ns), setup 2 ns, clock-to-Q 2 ns: maximum clock frequency?
The maximum clock frequency (in MHz, rounded off to the nearest integer) such that there are no setup violations is ________.
Answer: Official key: 200 to 200
- The clock period must cover the slowest register-to-register path: .
- Path has no logic: .
- Path has the gate: . This is the critical path.
- , so .
Trap: stopping at the flip-flop-to-flip-flop path (), which gives . The feedback path through the AND gate is slower. The input is external and is assumed to be stable at the clock edge, as the question gives no delay for it. The hold check passes too: clock-to-Q of is larger than the hold time of . We evaluated both paths in code.
Static timing analysis tools such as Vivado and Synopsys PrimeTime do exactly this sum for every path in an FPGA or ASIC and report the worst one as the critical path, which sets the maximum clock; fixing it usually means moving logic across a register boundary (pipelining).
A binary ripple counter counts from 0 to 64: how many flip-flops does it need?
- (A)6
- (B)7
- (C)4
- (D)5
Answer: (B) Official key: B
- Counting from to inclusive needs different states.
- flip-flops give states and reach a largest count of . We need .
- gives , which falls one short of . gives , which is enough.
- flip-flops: option (B). The options with , and flip-flops all fail.
Trap: option (A), , from the thought that . But in binary is , which is 7 bits. Six flip-flops end at . We checked each option: only 7 can hold the count .
Sizing a counter is a routine step in FPGA and microcontroller timer design: the register width decides the longest interval a timer can count before it wraps. Designers always count states, not the largest value's power of two.
Negative-edge JK flip-flop with J = K = 1 on a 10 cycles/second clock: output frequency?
Answer: Official key: 4.90 to 5.10
- With the characteristic equation becomes : the output toggles at every active clock edge.
- The active edge is the falling edge. A cycles/second square wave has falling edges per second, so toggles times per second.
- One output cycle needs two toggles (low to high, then high to low). Output frequency cycles/second.
Trap: answering and forgetting that a toggle is only half an output cycle. A JK flip-flop with is a divide-by-2 stage. We simulated 10 seconds of the clock and counted 100 toggles, which is 50 output cycles in 10 s.
A flip-flop with (or a D flip-flop with ) is the divide-by-2 cell in every clock divider and ripple counter. Clock trees and prescalers on microcontrollers are built by chaining these stages.
Shift-left register and D flip-flop with XOR feedback: register content after the 5th clock?
- (A)00011111
- (B)10111111
- (C)00111111
- (D)11000011
Answer: (A) Official key: A
- Wiring: on every clock the register shifts left, goes to the D flip-flop, and takes in (the flip-flop's output before the edge).
- Start: register , . Edge 1: , register , .
- Edges 2, 3, 4, 5: is still because is still , so a is shifted in each time: , , , .
- After the 5th edge: : option (A).
Trap: option (C), , is the content after the 6th edge. The first reaches only after 8 edges, so the flip-flop does not change the output in the first five clocks. We simulated the circuit clock by clock: the 5th edge gives 00011111 and the 6th gives 00111111.
A shift register feeding back through a flip-flop and an XOR is the pattern behind linear-feedback shift registers, used for pseudo-random test patterns, CRC checks and scramblers in serial links. Chip designers simulate them clock by clock exactly like this.
An ADC with a full-scale sine input has SNR 61.96 dB: what is its resolution in bits?
Answer: bits Official key: 10 to 10
- For an ideal -bit ADC with a full-scale sine input, .
- , so .
- bits.
Check: gives 55.94 dB and gives 67.98 dB, and gives exactly 61.96 dB. Rule of thumb: every extra bit adds about 6 dB of SNR. Dropping the 1.76 dB term gives here, which is not a whole number of bits, a sign that the full formula is the one to use.
ENOB (effective number of bits) on an ADC datasheet is found by running this formula backwards on the measured SNR, and a 10-bit part that measures 56 dB is really a 9-bit converter.
Sample-and-hold, time constant 1 us, 1 V full scale: how long must the switch stay closed for 12-bit accuracy?
Answer: Official key: 8.30 to 8.34
- The capacitor charges as , so the remaining error is .
- 12-bit accuracy means the error must fall below 1 LSB, . So .
- .
Trap: using a half-LSB error, , or . Both are outside the official range 8.30 to 8.34. We recomputed at and got .
Acquisition time is how a sample-and-hold or the input stage of an SAR ADC is sized: the source resistance times the sampling capacitor must settle to within 1 LSB before the switch opens, which limits the sample rate.
Full-scale sine, 10-bit ADC, signal power 1 W, noise and distortion 10 uW: effective number of bits?
- (A)7
- (B)8
- (C)9
- (D)10
Answer: (B) Official key: B
- The signal-to-noise-and-distortion ratio is .
- In decibels: .
- For a full-scale sine, . So .
- Rounded to the nearest integer: bits, option (B).
Trap: option (D), . That is the nominal resolution. Noise and distortion cost bits, so the converter performs like an ideal -bit one. We evaluated the formula in code: and .
ADC datasheets quote ENOB from SINAD exactly this way: a 12-bit part with an ENOB of 10.5 bits is normal, and choosing a converter for a sensor front end means checking ENOB at your signal frequency, not the headline bit count.
4-bit weighted-resistor DAC, V_REF = 2 V: change in output when 1110 changes to 1101 (mV)?
When the input changes from 1110 to 1101, the magnitude of the change in the output voltage (in mV, rounded off to the nearest integer) is ________.
Answer: Official key: 250 to 250
- The op-amp is an inverting summer. With feedback resistor , the output is .
- For : .
- For : .
- Change: . This is one LSB, , because is and is .
Trap: adding the two switch steps instead of netting them. turning off removes and turning on adds . They move the output in opposite directions, so the net is , not . We computed both outputs with exact fractions: and .
Binary-weighted resistor DACs are the textbook form, but real chips use R-2R ladders or segmented current sources because an or resistor is hard to match to the needed accuracy; the matching error shows up as DNL and INL on the datasheet.
10-bit ADC, 1 MHz sampling, 3.3 V full scale, 500 kHz sine: maximum SNR and data rate?
For an input sinusoidal signal with frequency , the maximum SNR (in dB, rounded off to two decimal places) and the data rate (in Mbps) at the output of the ADC are ________, respectively.
- (A)61.96 and 10
- (B)61.96 and 5
- (C)33.36 and 10
- (D)33.36 and 5
Answer: (A) Official key: A
- The best SNR of an ideal -bit ADC with a full-scale sine is . For : . The full scale cancels out of the ratio.
- The ADC outputs bits for every sample, at : data rate .
- The input equals , so it is just allowed by the sampling theorem. It does not change the output data rate, which is set by the sampling clock.
- and : option (A).
Trap: option (B), which multiplies the bits by the input frequency (). The ADC produces a code on every clock, not once per input cycle. We computed the SNR formula and the rate in code and matched them against all four options: only (A) fits.
Raw ADC data rate is bits times sample rate, and it sizes the interface: a 10-bit, 1 MSPS converter needs a 10 Mbps stream, which a standard SPI or LVDS link carries easily, while a 14-bit, 100 MSPS converter needs a dedicated high-speed serial interface.
32-bit instruction, 24 registers, 40 opcodes, 3 register fields: maximum unsigned immediate?
Answer: Official key: 2047 to 2047
- The opcode must distinguish instructions: bits.
- Each register identifier must distinguish registers: bits. There are three of them: bits.
- The instruction is bits, so the immediate field gets bits.
- An unsigned -bit integer goes from to : .
Trap: the off-by-one answer (that is , the number of values, not the largest value). Using a -bit opcode would also be wrong: , so it cannot name instructions. We counted the fields in code and checked both wrong paths fall outside the key.
This is how real RISC instruction sets are laid out: in RISC-V, for example, the 12-bit immediate of an I-type instruction is whatever is left of 32 bits after the opcode and register fields, which is why large constants need a second instruction.
256 KB memory with first address 2500H: what is the address of its last location?
- (A)
- (B)
- (C)
- (D)
Answer: (C) Official key: C
- byte locations .
- The locations run from the first address to the first address plus (size ): last address .
- : option (C).
Check: the last-address low bits are because the first address ends in and a size that is a multiple of always ends the block on . Trap: (B) spans only and (D) spans ; the code confirmed both sizes and that only (C) spans . This assumes byte-addressable memory, the usual reading of an address range quoted in KB.
Memory-map arithmetic like this is done daily when assigning address ranges to RAM, flash and peripherals in a microcontroller or SoC. In a real memory map a 256 KB block would normally start on a 256 KB boundary (00000H, 40000H, ...), so the chip select can be decoded from the top address bits alone; a block starting at 2500H, as here, is valid arithmetic but needs a comparator to decode.