DE Interview Q&A — Post 2: Logic Families, Sequential & Memory — VLSI Trainers
Digital Electronics · Interview Prep · Post 2

Digital Electronics Interview Q&A

Logic Families, Flip-Flops, Shift Registers, Counters, DAC/ADC, and Digital Memories — the questions that come up most in VLSI, embedded systems, and hardware design interviews.

🎯

Post 2 of 2. This post covers the sequential and hardware-intensive topics that dominate VLSI and chip design interviews. Each answer includes the 💬 slang line — the confident, natural way to open your answer — followed by the complete structured response and a likely follow-up.

Logic Families

Q1 Why does CMOS dominate all modern digital design? What is its killer advantage? Easy
“CMOS’s superpower is near-zero static power — one transistor is always off in steady state, so there’s no DC current path. At GHz frequencies and a billion transistors on chip, that’s the only thing keeping your phone from being a hand warmer.”

In a CMOS gate, PMOS and NMOS transistors always work as complementary pairs. In every stable logic state, one transistor of each complementary pair is cut off — there is no DC current path from V_DD to ground. Power is only consumed when switching (P = C·V²·f).

  • Static power: essentially zero (only leakage in deep sub-micron)
  • Noise margin: ~30–45% of V_DD — much better than TTL’s 0.4V
  • Fan-out: >50 (MOSFET gates draw no DC current)
  • Supply voltage scalability: works from 1V to 15V — enables voltage scaling for power reduction
🔬 VLSI reality: Dynamic power (C·V²·f) has become the dominant concern at advanced nodes. Voltage scaling is the primary tool — halving V_DD reduces dynamic power by 4×. This is why modern SoCs run at 0.7–1.0V rather than 5V.
Q2 Why can’t you connect TTL totem-pole outputs together on a bus? What’s the solution? Medium
“If two totem-poles fight — one driving HIGH and one driving LOW — you get a direct V_CC-to-GND short through both active transistors. It’s like a tug-of-war that sets the rope on fire.”

In a TTL totem-pole output, T₃ (upper transistor) is actively driving HIGH and T₄ (lower transistor) is actively driving LOW. If two gates with opposite output states are connected:

  • Gate A: T₃ ON, T₄ OFF (driving HIGH)
  • Gate B: T₃ OFF, T₄ ON (driving LOW)
  • Result: A’s T₃ → output wire → B’s T₄ → GND. Current path from V_CC to GND with very low impedance → excessive current, heating, possible damage

Solutions:

  • Open-collector outputs: Remove T₃ entirely. Add one external pull-up resistor. Any saturated T₄ pulls the line LOW; resistor pulls HIGH when all are cut off. Enables wired-AND. Slower (passive pull-up).
  • Tri-state outputs: Third state = high-impedance (both T₃ and T₄ cut off). Only one enabled driver at a time. Used for shared data buses in microprocessors.
Q3 What is propagation delay and what does it limit in a digital system? Easy
“Propagation delay is how long a gate takes to respond after its input changes — and it’s what puts a ceiling on your clock frequency.”

Propagation delay (t_pd) is measured from when the input crosses 50% of its swing to when the output crosses 50% of its swing. Two parameters:

  • t_PHL: time for output to transition HIGH → LOW
  • t_PLH: time for output to transition LOW → HIGH
  • Average: t_pd = (t_PHL + t_PLH) / 2

What it limits: The longest combinational path between two flip-flops (the critical path) determines maximum clock frequency: f_max = 1 / (t_setup + t_pd_FF + t_comb_path). In VLSI, Static Timing Analysis (STA) finds this critical path and reports setup/hold violations.

Q4 Why is ECL the fastest logic family? What’s the trade-off? Medium
“ECL is fast because its transistors never saturate — they stay in the active region the whole time. No saturation means no stored charge, no storage time, and sub-nanosecond switching. The catch is it burns 300mW per gate, which is insane.”

The ECL gate is a differential amplifier. A reference transistor biased at −1.29V competes with the input transistors. When an input exceeds the reference, current shifts from the reference branch to the input branch. Transistors switch between cutoff and active regions — never entering saturation:

  • No saturation → no minority carrier storage → no storage time delay
  • Propagation delay ≈ 1ns (vs 10ns for TTL, 70ns for CMOS)
  • Dual complementary outputs: OR and NOR simultaneously available
  • Wired-OR of collectors possible (since outputs are emitter-follower, not totem-pole)

Trade-offs: ~300mW per gate, negative supply (−5.2V), very low noise margin (~0.2V), difficult PCB design (50Ω transmission lines needed). Used in mainframes, high-speed networking, and radar where 1ns speed is worth any power cost.

🔄 Flip-Flops

Q5 What is the difference between setup time and hold time? What happens if you violate them? Medium
“Setup time is how long data needs to be stable BEFORE the clock edge. Hold time is how long data needs to stay stable AFTER the clock edge. Violate either and you get metastability — your flip-flop goes into a limbo state and your chip might output garbage.”
  • Setup time (t_s): Data must be stable for at least t_s before the clock edge. If violated: the FF may not latch the correct data — it partially samples an intermediate value.
  • Hold time (t_h): Data must remain stable for at least t_h after the clock edge. If violated: the FF sees the data change while it’s still in the latch phase — the stored value gets corrupted.

Metastability: When timing is violated, the FF can enter a metastable state — neither a valid 0 nor 1. The output may oscillate or settle to an arbitrary value after an unpredictable time. This is the fundamental problem in clock-domain crossing (CDC) circuits.

🔬 VLSI/STA context: Setup violations are caught by Static Timing Analysis and fixed by reducing combinational path length (buffering, retiming, or higher V_DD). Hold violations are fixed by adding delay buffers on the data path. Hold violations are more dangerous — they cannot be fixed by running the clock slower.
Q6 Why does the JK flip-flop solve the forbidden state problem of the RS flip-flop? Medium
“In RS, S=R=1 is forbidden because both Q and Q-bar go to the same state — they’re no longer complements. JK eliminates this by feeding the outputs BACK to the AND gates — when J=K=1 the output just toggles instead of going to a forbidden state.”

The JK flip-flop adds Q and Q̄ feedback to the AND gates of the clocked RS latch:

  • J input is ANDed with Q̄ (the NOT-Q feedback) — so J can only SET when Q is already 0
  • K input is ANDed with Q (the Q feedback) — so K can only RESET when Q is already 1
  • When J=K=1: if Q=0, only J path is active → sets Q=1. If Q=1, only K path is active → resets Q=0. Net effect: Q toggles. No forbidden state.
J=K=0 → Hold | J=0,K=1 → Reset | J=1,K=0 → Set | J=K=1 → Toggle
Q7 What is the purpose of PRESET and CLEAR inputs on a flip-flop? Easy
“PRESET and CLEAR let you force the flip-flop to a known state instantly, without waiting for a clock edge — they’re asynchronous. Every chip uses them at power-on to get everything to a known state before the clock starts.”

PRESET (PRE̅) and CLEAR (CLR̅) are asynchronous inputs — they operate independently of the clock:

  • PRE̅ = 0 (active): Forces Q = 1 immediately, regardless of J, K, or clock
  • CLR̅ = 0 (active): Forces Q = 0 immediately, regardless of J, K, or clock
  • Both active simultaneously: forbidden (undefined — both outputs try to be 1)
  • Both inactive (HIGH): normal clocked operation

Power-on initialisation: When power is applied, all flip-flop Q outputs are undefined. A brief initialisation pulse on CLR̅ (or PRE̅) resets every FF to a known state before the system clock begins. This is why every real flip-flop in an FPGA or ASIC has an async reset — RTL designers use it to define the power-on state in the reset block.

Q8 How do you convert a JK flip-flop into a D flip-flop? And a T flip-flop? Medium
“For D, just tie J and K together through a NOT — J=D and K=D-bar. For T, tie J=K=T. The excitation table tells you exactly what J and K need to be for any transition you want.”

JK → D flip-flop: D FF characteristic: Q(n+1) = D. From JK excitation table, we need J=D and K=D̄. Connect J directly to D, and K through a NOT gate to D. Simple — 1 NOT gate added.

JK → T flip-flop: T FF characteristic: Q(n+1) = T⊕Q. When T=1, toggle; when T=0, hold. From JK table: toggle when J=K=1, hold when J=K=0. So simply wire J=T and K=T — connect both inputs together. Zero extra gates.

JK→D: J=D, K=D̄ (1 NOT gate)
JK→T: J=T, K=T (0 extra gates — just short J and K together)

↔️ Shift Registers

Q9 What is the difference between SIPO and PISO? Where are they used in real systems? Easy
“SIPO converts serial to parallel — like receiving a byte over SPI one bit at a time. PISO converts parallel to serial — like taking a byte from a CPU data bus and sending it out one bit at a time over UART.”
  • SIPO (Serial In Parallel Out): Data enters 1 bit per clock. After n clocks, the full n-bit word is available simultaneously on all Q outputs. Used in SPI receivers, display drivers (MAX7219 LED driver shifts in 8 bits serially), and serial communication receivers.
  • PISO (Parallel In Serial Out): All n data bits loaded in 1 clock (LOAD mode). Then shifted out 1 bit per clock (SHIFT mode). Used in SPI transmitters, UART serialisers, and converting parallel bus data to serial streams.
🔬 VLSI/DFT: Scan chains in DFT (Design for Testability) are SISO shift registers formed from the FF network in the design itself. The scan-in pin is SIPO for loading test patterns; scan-out is PISO for capturing results.
Q10 What is the difference between a ring counter and a Johnson counter? When would you use each? Medium
“Ring counter recycles the 1 straight back — only one output is HIGH at a time, so you get n states from n flip-flops. Johnson counter recycles the complement — you get 2n states and only one bit changes per step, like Gray code.”
  • Ring counter: Q of last FF fed back to D of first FF. n FFs → n states. Only 1 FF is HIGH at any time. No decode logic needed — each Q directly indicates “I’m in state k”. Used for time-sharing sequences (multiplex n channels, each gets 1 clock slot).
  • Johnson counter: Q̄ of last FF fed back to D of first FF. n FFs → 2n states. Exactly 1 bit changes per clock step. Needs 2-input AND/NAND gates for full state decode. Used where more states per FF are needed and the Gray-code-like property prevents glitches during decode.
4 FFs: Ring → 4 states (MOD-4) | Johnson → 8 states (MOD-8)

🔢 Counters

Q11 What is the difference between a synchronous and asynchronous counter? Which do you use in VLSI? Easy
“Asynchronous (ripple) counter: only the first FF gets the real clock, each one triggers the next. The carry ripples through and accumulates delay. Synchronous: all FFs share the same clock — they all update at once. In VLSI, you always use synchronous. Always.”
  • Asynchronous: Total delay = n × t_pd (accumulates). Glitches appear between flip-flop transitions (e.g. 0111→1000 goes through 0110, 0100, 0000 momentarily). Cannot safely decode with combinational logic — spurious output during transitions can latch incorrect state.
  • Synchronous: All FFs clock simultaneously. Delay = t_pd(FF) + t_comb (independent of n). No glitches — all bits change at the same edge. Combinational decode is safe. Can be cascaded with CO (Carry Out) pin to higher stages cleanly.
🔬 VLSI rule: Asynchronous counters are never used inside a synchronous design. The only acceptable use of asynchronous division is a single T-FF dividing a clock input outside the synchronous domain — and even then, the divided clock must be isolated and re-synchronised before use.
Q12 Walk me through designing a synchronous Mod-6 counter using JK flip-flops. Hard
“The drill is always the same: draw the state table, apply the JK excitation table to get J and K expressions for each FF, simplify with K-maps, then draw the logic.”
  1. Flip-flops needed: 2³ = 8 ≥ 6, so n = 3 FFs (Q₂Q₁Q₀). States 6 and 7 are don’t-cares.
  2. State table: 000→001→010→011→100→101→000 (MOD-6)
  3. JK excitation table for each transition: For each Q(n)→Q(n+1) pair, find required J,K values
  4. K-maps: Minimise J₀,K₀ / J₁,K₁ / J₂,K₂ using the transitions (states 6,7 as don’t-cares)
Result: J₀=K₀=1   J₁=Q₀K̄₂, K₁=Q₀   J₂=Q₁Q₀, K₂=1

Connect these as AND/NOT gates feeding the JK inputs of the three flip-flops. All FFs share the common clock.

Q13 Why do VLSI CDC FIFOs use Gray code counters for read and write pointers? Hard
“When you pass a binary pointer across a clock domain boundary, metastability can hit any bit. If 4 bits change at once and metastability corrupts them, you could read an address that’s nowhere near where you wanted. With Gray code, only 1 bit changes — the worst case is you read the old pointer or the new one. Never a corrupted middle value.”

In an asynchronous FIFO, the write pointer runs in the write clock domain; the read pointer comparison must happen in the read clock domain (and vice versa for full/empty detection). Passing a multi-bit binary counter across a clock domain means all changing bits are subject to metastability simultaneously:

  • Binary 0111 → 1000: 4 bits change. If the synchroniser captures this in-transition, it could see 0100, 0010, 1100, or any other combination — potentially an address far outside the valid range.
  • Gray 0100 → 1100: Only MSB changes. The synchroniser sees either 0100 (old) or 1100 (new) — both are valid pointer values, differing by exactly 1.

This is a fundamental VLSI design rule: always use Gray code counters for FIFO pointers that cross clock domain boundaries. The Gray counter is synthesised as a binary counter with a Gray converter (XOR tree).

📡 DAC & ADC

Q14 Why is the R-2R ladder DAC preferred over the weighted resistor DAC in VLSI? Medium
“The weighted DAC needs resistors spanning a 512:1 range for a 10-bit DAC — impossible to fabricate and temperature-track accurately. R-2R only needs two values, and since they’re both on the same substrate, they drift together. The ratio is what matters, and ratios are rock-solid in silicon.”

For an n-bit weighted resistor DAC, resistors span R to 2^(n-1)·R — a range of 512 for 10-bit. Maintaining this ratio accurately across process, voltage, and temperature (PVT) variation is impractical. Resistors at opposite ends of this range are physically very different and drift differently.

R-2R requires only R and 2R. In VLSI, both are laid out as multiples of a unit resistor in a matched array — they track each other through all PVT variations because:

  • Same material, same orientation, same thermal environment
  • The R:2R ratio (2:1) is constant across temperature changes because they change by the same percentage
  • Bit switches are CMOS transmission gates driven directly by digital inputs
Q15 Compare Flash ADC and SAR ADC. When would you use each? Medium
“Flash is fast but greedy — one clock, done, but needs 2^n minus 1 comparators. SAR is the smart binary search — n clocks for n bits, just one comparator and one DAC. Flash for video and radar, SAR for everything in your phone.”
  • Flash ADC: All 2^n−1 comparators work simultaneously → 1 clock cycle conversion. 8-bit = 255 comparators. 10-bit = 1023 comparators. Power and area grow exponentially with bits. Resolution typically 6–8 bits. Used in: oscilloscopes, video ADCs, radar receivers, high-speed sampling.
  • SAR ADC: Binary search: MSB first, 1 bit per clock → n clocks for n bit. One comparator + one DAC + SAR register. Area and power scale linearly with bits. Resolution typically 10–18 bits. Speed: up to ~100 Msps at 12-bit. Used in: microcontrollers, sensors, audio, IoT, any general-purpose on-chip ADC.
🔬 VLSI/SoC: SAR ADC is the dominant architecture for on-chip converters in MCUs and SoCs. The key challenge is the internal DAC — it must be monotonic and settle within one clock period. At advanced nodes, charge-redistribution SAR DACs (capacitor DAC) outperform resistor-ladder designs because capacitors match better than resistors in CMOS.
Q16 What is the Nyquist theorem and what happens if you violate it? Easy
“Nyquist says sample at least twice as fast as your highest frequency of interest. If you don’t, your ADC will ‘hear’ a high-frequency signal as a lower frequency — that’s aliasing, and there’s no way to recover from it after the fact.”

The Nyquist-Shannon sampling theorem: to perfectly reconstruct a continuous-time signal, the sampling rate f_s must be at least 2 × f_max (the highest frequency component in the signal).

Aliasing: If f_s < 2·f_max, high-frequency components fold back into the baseband and appear as spurious low-frequency signals. Example: a 9 kHz signal sampled at 16 kHz appears as a 7 kHz alias (16 − 9 = 7 kHz).

Solution: Place an anti-aliasing filter (low-pass) before the ADC to band-limit the input to f_s/2. In practice, use f_s = 2.5 to 3× f_max to allow for a realizable filter roll-off.

💾 Digital Memories

Q17 What is the difference between SRAM and DRAM? When is each used? Easy
“SRAM uses a latch — 6 transistors, stays put, no refresh needed, blazing fast. DRAM uses a capacitor — 1 transistor, needs to be refreshed every 64ms because it leaks, but you can pack way more bits per mm². SRAM for cache, DRAM for main memory.”
  • SRAM (6T cell): Cross-coupled CMOS inverters (4T) + 2 access transistors. Holds data as long as power is on. No refresh. Fast (5–50ns). Large cell → low density. Used for: CPU cache (L1/L2/L3), register files, FPGAs.
  • DRAM (1T1C cell): 1 transistor + 1 capacitor. Charge on capacitor = stored bit. Leaks in ~50–100ms → must refresh every 64ms. Slower (~50–100ns). Tiny cell → very high density (GB/chip). Destructive read (must rewrite after read). Used for: main memory (DDR3/4/5, LPDDR, HBM).
🔬 Modern trends: HBM (High Bandwidth Memory) stacks multiple DRAM dies on a silicon interposer beside the processor using TSVs (Through-Silicon Vias). eDRAM integrates DRAM directly on the CPU die for L3/L4 cache. Both trade density advantage for bandwidth.
Q18 What is the difference between EPROM, EEPROM, and Flash memory? Medium
“EPROM — erase with UV light, takes 30 minutes, whole chip at once, needs a quartz window. EEPROM — erase electrically, byte by byte, 10ms, in-circuit. Flash — EEPROM but erased in large blocks, so it’s way faster and cheaper, but you can’t erase just one byte.”
  • EPROM: Floating-gate MOSFET. UV light (25–30 min) excites electrons off gate. Erases entire chip. Requires removal from circuit. Quartz window on package. About 100 erase cycles.
  • EEPROM: Thin-oxide floating gate. Electrical erase (21V, 10ms). Individual byte or word erase. In-circuit programmable. ~10,000–1,000,000 cycles. Used in microcontroller parameter storage, EEPROM-based config memory.
  • Flash: Mass-market EEPROM evolution. Block erase (128 KB–4 MB blocks, ~1ms). Byte/page-level programming. Very high density and endurance (~100k cycles for NOR, ~1k for MLC NAND). NOR Flash (byte-addressable, XIP) for code storage; NAND Flash (block) for data storage (SSDs, SD cards).
Q19 How do you expand memory — what’s the difference between increasing word width vs increasing address space? Medium
“To make words wider, put chips in parallel and tie all their address and control lines together — each chip contributes some of the data bits. To get more addresses, use a decoder on the extra address bits to select which chip is active.”
  • Wider words (parallel): Connect multiple RAM ICs with identical address and control lines. Each IC contributes different data bits. Two 4K×8 chips → 4K×16 (same addresses, 16-bit data). Used to match CPU word width.
  • More addresses (series + decoder): Use a decoder driven by the extra MSBs to enable one chip at a time. Four 1K×8 chips + 2-to-4 decoder → 4K×8 (16K×1 also possible). Each chip handles a different address range.
Example: 4K×8 from 1K×8 chips
→ 4 chips needed (4K/1K = 4)
→ 2-to-4 decoder on A11,A10 → Chip Enable each chip
→ A9–A0 shared (lower address within each chip)
→ D7–D0 shared (all chips on same data bus, only selected chip drives)
Q20 Explain the memory hierarchy. Why does it exist? Easy
“It exists because of the speed-cost trade-off — fast memory costs a lot and can’t be made large. So you build layers: tiny-and-fast close to the CPU, huge-and-slow farther away. The hardware exploits locality to make the system feel like it has both.”

The memory hierarchy exploits two types of locality in typical programs:

  • Temporal locality: If you accessed memory location X recently, you’ll likely access X again soon
  • Spatial locality: If you accessed location X, you’ll likely access X+1, X+2 etc. soon

Hierarchy (fastest/smallest to slowest/largest): Registers (~1 cycle) → L1 SRAM cache (3–5 cycles) → L2/L3 SRAM cache (10–40 cycles) → DRAM main memory (~200 cycles) → Flash/SSD (~100,000 cycles) → Hard disk (~10,000,000 cycles).

🔬 Modern SoC perspective: The memory wall (gap between processor speed and memory bandwidth) drives many VLSI innovations: HBM stacking, on-die eDRAM, prefetching, cache coherency protocols, and NUCA (Non-Uniform Cache Access) architectures.
Quick interview tips for DE questions: Start every answer with the slang line to signal confidence. When asked “explain the difference between X and Y”, always give X first, then Y, then “I’d choose X when… and Y when…”. When asked about VLSI applications, connect every DE concept to a real chip design scenario — setup time → STA, Gray code → CDC FIFO, SRAM → cache. Interviewers at VLSI companies want to know you see the hardware, not just the theory.
Scroll to Top