FREE — INTERVIEW QUESTIONS

Digital electronics interview questions, with worked answers, Verilog and numericals

90+ free questions on the round that opens most VLSI interviews: number systems, gates, K-maps, adders, flip-flops, setup and hold, counters, FSMs and CMOS basics. Includes 18 worked answers, 8 solved numericals, a K-map solved step by step and a two's-complement converter.

550+ Digital Electronics Interview Questions ebook cover
DIGITAL ELECTRONICS EBOOK · 581 QUESTIONS · 27 CHAPTERS

Get the complete digital logic question bank, fully answered

581 questions with interview-ready answers and tips, 20 Verilog exercises with solutions, 25 solved numericals and 30 debugging scenarios.

INSTANT PDF DOWNLOAD · 8 FREE PREVIEW PAGES
See the ebook

Whatever VLSI role you apply for, someone will ask you to convert a number, simplify a function, draw a flip-flop waveform or design a counter. It's the screening round for RTL, verification, FPGA, physical design and DFT jobs, and the foundation every later round quietly assumes.

The questions sound simple, which is the trap. Interviewers use them to see how you reason: whether you check your arithmetic, mention the edge case, and know why a circuit works, not just what it's called. Use the formula sheet and converter first, skim the 50 questions by topic, then attempt each worked answer and numerical before you open it.

HOW IT'S ASKED

Three levels of a digital electronics round

LEVEL 1

Numbers, codes & gates

Base conversions in your head, two's complement and overflow, Gray and BCD, De Morgan, universal gates and K-maps. Fast, short questions where a small slip costs you.

LEVEL 2

Blocks & sequential design

Adders, MUX-based logic, decoders, latches versus flip-flops, counters, shift registers, sequence detectors and clock dividers. Expect to draw on the whiteboard or write a few lines of Verilog.

LEVEL 3

Timing & debugging

Setup and hold, fmax, hazards, metastability, inferred latches and "it works in simulation but not on the board". They're checking whether you can find a cause, not recite a fact.

HOW TO ANSWER

Six habits that turn easy questions into marks

01

Check every number you say

After a conversion, add the place values back up. After a two's-complement answer, use the negative MSB weight. A self-check out loud is worth more than speed.

02

Draw before you derive

A truth table, a K-map or a three-line waveform makes your reasoning visible and catches mistakes before the interviewer does.

03

Name the edge case

Overflow, the most negative number, don't-cares, unused counter states, the LFSR lock-up state, overlapping patterns. Mentioning it unprompted signals experience.

04

Talk cost, not just function

How many gates, how many logic levels, how many flip-flops? Ripple versus lookahead, binary versus one-hot: every design answer has a trade-off.

05

Keep setup and hold apart

Setup depends on the clock period; hold doesn't. Slowing the clock fixes setup only. Mixing these up is the most common timing error in fresher rounds.

06

Write Verilog as hardware

Picture the flops and gates before you type. Non-blocking for clocked logic, every output assigned in combinational blocks, and a reset for every state register.

FORMULA SHEET

The digital electronics numbers worth memorising

Most numerical questions in this round reduce to one of these.

BITS NEEDEDn = ⌈log2N⌉ for N values · n bits hold 0 … 2n − 1
TWO'S COMPLEMENT−x = ~x + 1 · range −2n−1 … 2n−1 − 1The MSB carries a weight of −2n−1, which is the fastest way to read a negative value.
SIGNED OVERFLOWV = Cin,MSB ⊕ Cout,MSBEquivalently: both operands share a sign and the result has the other sign.
GRAY CODEg = b ⊕ (b >> 1) · bi = bi+1 ⊕ gi, starting at the MSB
DE MORGAN(AB)' = A' + B' · (A + B)' = A'B' · consensus: AB + A'C + BC = AB + A'C
ADDERSS = A ⊕ B ⊕ Cin · Cout = AB + Cin(A ⊕ B) · CLA: Ci+1 = Gi + PiCi
MULTIPLEXER2n:1 needs n selects, and realises any function of n + 1 variables
HAMMING2p ≥ m + p + 1 check bits for m data bits · one extra bit for SECDED
SETUPtcq + tlogic,max + tsu ≤ T + tskew − tjittertskew = capture clock arrival − launch clock arrival.
HOLDtcq,min + tlogic,min ≥ th + tskew  (T does not appear)
CMOSPdyn = α·C·V2·f · tpd ≈ 0.69·R·C · NMH = VOH − VIH, NML = VIL − VOL
ADC / DACLSB = Vref / 2n · ideal SQNR ≈ 6.02n + 1.76 dB
TRY IT

Number & two's-complement converter

Type any whole number, negative values included, and pick a width. Use it to check your hand conversions.

BINARY (TWO'S COMPLEMENT)–
HEX–
OCTAL–
SAME BITS, READ UNSIGNED–
GRAY CODE OF THE BITS–
BCD OF |VALUE|–

 

COUNTERS AT A GLANCE

Which counter, how many flip-flops

Counter questions are almost guaranteed. Knowing these trade-offs answers most follow-ups before they're asked.

COUNTERFLOPS FOR N STATESSTATES FROM n FLOPSDECODECATCHTYPICAL USE
Ripple (asynchronous)⌈log2N⌉2nn-input gateBits settle one after another, so decoded outputs glitchSlow prescalers, low-power dividers
Synchronous binary⌈log2N⌉2nn-input gateCarry chain sets the speedTimers, general counting
Ring (one-hot)NnNone neededMost flops; needs a valid start patternSequencers, one-hot FSMs
Johnson (twisted ring)N / 22n2-input ANDUnused states unless self-correctingGlitch-free decode, multiphase clocks
Maximal-length LFSR⌈log2(N + 1)⌉2n − 1n-input gateAll-zeros (XOR) state locks upPRBS, BIST, CRC, scramblers
Gray counter⌈log2N⌉2nn-input gateArithmetic needs conversionAsync FIFO pointers, low switching
BROWSE BY TOPIC

50 digital electronics interview questions across 10 topics

A cross-section of what interviewers draw on most. The 581-question ebook goes much deeper on every topic and answers each one.

Number Systems & Codes

Moving between bases and encodings without a calculator.

  • Convert 0.3 to binary. Why does it never terminate?
  • How do you go from octal to hexadecimal without passing through decimal?
  • Why is Gray code used for rotary encoders and FIFO pointers?
  • What is BCD, and why does BCD addition need a +6 correction?
  • What is the excess-3 code, and why is it self-complementing?

Binary Arithmetic

Signed numbers, overflow and fixed point.

  • Why did two's complement win over sign-magnitude and one's complement?
  • How does hardware detect signed overflow after an addition?
  • What happens when you negate the most negative 8-bit number?
  • What is sign extension, and why is it needed when widening a bus?
  • How do you multiply two Q4.4 fixed-point numbers, and what format is the result?

Boolean Algebra & Gates

The algebra under every circuit.

  • State the duality principle and give an example.
  • Build AND, OR and NOT from NOR gates only.
  • Prove the consensus theorem, and explain where it's used.
  • How many distinct Boolean functions of two variables exist?
  • Show that an XOR with one input tied high is an inverter.

K-Maps & Minimisation

From truth table to the fewest gates.

  • Why are K-map rows and columns in Gray order?
  • What makes a prime implicant essential?
  • When would you group the 0s instead of the 1s?
  • How should don't-care cells be used, and what is the risk?
  • When is Quine–McCluskey preferred over a K-map?

Combinational Blocks

Adders, multiplexers, decoders and comparators.

  • Design a full adder from two half adders and an OR gate.
  • Why is a ripple-carry adder slow, and how does carry lookahead help?
  • Implement a 3-variable function with a single 4:1 multiplexer.
  • Why does a priority encoder need a valid output?
  • Build a 4:16 decoder from 2:4 decoders.

Hazards & Combinational Timing

What gate delays do to clean logic.

  • What is the difference between a static-1, a static-0 and a dynamic hazard?
  • Why does adding a redundant term remove a static hazard?
  • When can you safely ignore a glitch?
  • Where must glitches never reach?
  • What sets the propagation delay of a combinational block?

Latches & Flip-Flops

How one bit is stored, and when it changes.

  • Draw an SR latch from NOR gates and explain the forbidden input.
  • What is the race-around condition in a JK flip-flop, and how is it avoided?
  • Convert a D flip-flop into a T flip-flop.
  • How is a master–slave flip-flop built from two latches?
  • When are latches used deliberately in real designs?

Setup, Hold & Metastability

The timing questions that decide the round.

  • Why does a flip-flop need setup and hold time? Explain physically.
  • Which violation can a slower clock fix, and why?
  • How does clock skew help one check and hurt the other?
  • What is metastability, and why can't it be avoided completely?
  • Why are two flip-flops used to synchronise an asynchronous input?

Counters, Shift Registers & FSMs

Sequential design on the whiteboard.

  • Design a synchronous mod-6 counter with D flip-flops.
  • What does a SIPO shift register do, and where is it used?
  • Why does an LFSR with XOR feedback avoid the all-zeros state?
  • Design a Mealy detector for 1101 with overlap.
  • Binary, Gray or one-hot state encoding: how do you choose?

CMOS, Memories & Verilog

Where logic meets silicon and code.

  • Draw a CMOS NAND gate and explain why it's preferred over NOR.
  • What is the difference between static and dynamic power?
  • Compare SRAM and DRAM cells. Why does DRAM need refresh?
  • How do you build a 64K × 16 memory from 16K × 8 chips?
  • Why does an incomplete case in an always @(*) block infer a latch?

This is a sample. The full bank is six times bigger.

581 questions across 27 chapters, every one answered: 20 Verilog exercises with solutions, 25 solved numericals, 30 debugging scenarios, plus memories, data converters, interfacing and low-power design.

See the full question bank
N1 · BASE CONVERSIONBEGINNERConvert (45.625)10 to binary, octal and hexadecimal.Show solution ↓
Integer: 45 = 32 + 8 + 4 + 1          → 101101
Fraction: 0.625 × 2 = 1.25 → 1
          0.25  × 2 = 0.5  → 0
          0.5   × 2 = 1.0  → 1         → .101
Binary: 101101.101
Octal : 101 101 . 101                  → 55.5
Hex   : 0010 1101 . 1010               → 2D.A

Note: group in threes or fours outward from the binary point, padding with zeros on both ends.

N2 · SIGNED OVERFLOWINTERMEDIATEAdd −75 and −60 in 8-bit two's complement. Is the result valid?Show solution ↓
+75 = 0100 1011 → −75 = 1011 0101
+60 = 0011 1100 → −60 = 1100 0100
  1011 0101
+ 1100 0100
= 1 0111 1001  → keep 8 bits: 0111 1001 = +121
Carry into MSB = 0, carry out = 1 → V = 1

Note: the true sum −135 is below −128, so it doesn't fit. Two negatives gave a positive: overflow.

N3 · HAMMING CODEINTERMEDIATEHow many Hamming check bits protect 26 data bits for single-error correction? How many for SECDED?Show solution ↓
Need 2^p ≥ m + p + 1, with m = 26
p = 4: 16 ≥ 31 ✗
p = 5: 32 ≥ 32 ✓  → 5 check bits (31-bit codeword)
SECDED: add one overall parity bit → 6 (32 bits)

Note: 26 data bits is the exact fit for 5 check bits, so a 32-bit SECDED word is a natural size.

N4 · MAXIMUM FREQUENCYINTERMEDIATEtcq = 0.35 ns, longest logic = 2.6 ns, tsu = 0.15 ns. The capture clock arrives 0.2 ns later than the launch clock, and jitter is 0.1 ns. Find fmax.Show solution ↓
T_min = t_cq + t_logic + t_su − t_skew + t_jitter
      = 0.35 + 2.6 + 0.15 − 0.2 + 0.1
      = 3.0 ns
f_max = 1 / 3.0 ns ≈ 333 MHz

Note: a late capture clock helps setup. The same skew makes hold harder, as N5 shows.

N5 · HOLD CHECKINTERMEDIATEtcq,min = 0.12 ns, shortest logic = 0.08 ns, th = 0.10 ns, and the capture clock is 0.15 ns late. Is hold met?Show solution ↓
Arrival  = 0.12 + 0.08       = 0.20 ns
Required = t_h + t_skew = 0.10 + 0.15 = 0.25 ns
Slack    = 0.20 − 0.25       = −0.05 ns → violation

Note: add at least 0.05 ns of delay on the short path, or reduce the skew. The clock period doesn't appear anywhere, so slowing the clock doesn't help.

N6 · RIPPLE COUNTERBEGINNERA 6-bit ripple counter uses flip-flops with tcq = 4 ns, and its outputs feed 8 ns of decode logic. What is the highest safe clock? What is the MSB frequency for a 12 MHz input?Show solution ↓
Worst settle = 6 × 4 ns = 24 ns, plus decode 8 ns = 32 ns
f_max ≈ 1 / 32 ns ≈ 31 MHz
MSB frequency = 12 MHz / 2^6 = 187.5 kHz

Note: a synchronous counter's speed doesn't depend on its width in the same way, which is why ripple counters are rare in fast logic.

N7 · DYNAMIC POWERINTERMEDIATEA block switches 1.5 nF with activity 0.15. Find its dynamic power at 0.9 V and 1.2 GHz, then at 0.8 V and 1.0 GHz.Show solution ↓
P = α · C · V² · f
P1 = 0.15 × 1.5 nF × 0.81 × 1.2 GHz ≈ 219 mW
P2 = 0.15 × 1.5 nF × 0.64 × 1.0 GHz = 144 mW
Saving ≈ 34% for a 17% drop in frequency

Note: voltage is squared, so scaling voltage and frequency together saves far more than frequency alone.

N8 · ADCINTERMEDIATEA 10-bit ADC has a 0–3.3 V range. Find the LSB, the output code for 1.2 V, and the ideal SQNR.Show solution ↓
LSB  = 3.3 V / 1024 ≈ 3.22 mV
Code = floor(1.2 / 3.22 mV) = floor(372.4) = 372 = 0x174
SQNR ≈ 6.02 × 10 + 1.76 ≈ 62.0 dB

Note: each extra bit halves the LSB and adds about 6 dB.

AB \ CD00011110
001m00m10m31m2
010m41m51m70m6
110m121m131m150m14
101m80m90m111m10
Corner quad: B'D'Centre quad: BD
  1. Lay out the map in Gray order. Rows AB and columns CD both run 00, 01, 11, 10, so every pair of neighbours differs in one variable, including across the edges.
  2. Find the corner quad. m0, m2, m8 and m10 look far apart, but the map wraps top to bottom and left to right, so the four corners are adjacent. In all four, B = 0 and D = 0: the term is B'D'.
  3. Find the centre quad. m5, m7, m13 and m15 all have B = 1 and D = 1: BD.
  4. Check coverage. All eight 1s are covered, each group is as large as it can be, and both are essential.
  5. Recognise the result. F = B'D' + BD is true when B and D are equal, which is B XNOR D. A and C don't matter at all.
Why is the corner group the one people miss?

Because the cells aren't visibly next to each other. A K-map is really drawn on a torus: the top row touches the bottom row and the left column touches the right column. Point this out on the whiteboard; it's often exactly what the interviewer is testing.

Does this circuit have a static-1 hazard?

No. A static-1 hazard needs two adjacent 1-cells covered by different groups, so that changing one variable hands the output from one product term to another. Here no 1 in the corner group is adjacent to a 1 in the centre group: moving from one group to the other always means changing both B and D.

How would you build it with NAND gates only?

F = B'D' + BD in two-level NAND–NAND form is ((B'D')' · (BD)')'. That is three NANDs plus two NANDs used as inverters for B' and D': five in total. Recognising it as XNOR is better still: XNOR is an XOR (four NANDs) followed by an inverter, also five, but a single XNOR cell is the cheapest real implementation.

What if m1 were a don't-care?

It doesn't help. m1 touches m0 and m5, but every possible quad that includes m1 also includes a 0 (m3, m4 or m9), so it can't enlarge either group. A don't-care is only used when it makes a group bigger; otherwise it is left as 0. The ebook has a whole chapter of K-map and Quine–McCluskey problems.

Fewest 2-input NAND gates for an XOR?

Four.

Largest unsigned value in 12 bits?

4,095.

Range of an 8-bit two's-complement number?

−128 to +127.

Gray code for binary 1010?

1111.

Flip-flops for a mod-12 counter?

Four.

States in a 4-bit Johnson counter?

Eight (2n).

States in a maximal-length 4-bit LFSR?

Fifteen (2n − 1).

Select lines on a 32:1 MUX?

Five.

2:1 MUXes needed for a 16:1 MUX?

Fifteen.

Consensus term of AB + A'C?

BC.

Which flip-flop toggles when its input is 1?

T (or JK with J = K = 1).

Invalid input to a NOR SR latch?

S = R = 1.

Does a slower clock fix a hold violation?

No. Hold doesn't depend on the period.

fmax if tcq + tlogic + tsu = 4 ns?

250 MHz.

CMOS dynamic power formula?

P = α·C·V2·f.

Why NAND over NOR in CMOS?

NOR stacks the slower PMOS in series.

Hamming check bits for 8 data bits?

Four.

Ideal SQNR of an 8-bit ADC?

About 49.9 dB.

XOR with one input tied to 1?

An inverter.

Blocking or non-blocking in clocked always blocks?

Non-blocking.

COMMON MISTAKES

Where candidates lose marks in a digital round

×

Rushing the arithmetic

A wrong conversion said confidently hurts more than a slow correct one. Check by adding place values back, or by using the negative MSB weight.

×

Confusing carry with overflow

Carry-out flags unsigned overflow. Signed overflow is the XOR of the carries into and out of the MSB.

×

Missing wrap-around groups on a K-map

Corners and opposite edges are neighbours. Missing them gives a correct but non-minimal answer, and interviewers notice.

×

"Slow the clock" for every timing problem

It fixes setup. Hold violations need more delay on the short path or less skew.

×

Ignoring unused and illegal states

Counters and FSMs with spare codes need a way back to the sequence. Say so before you're asked.

×

Writing Verilog like software

Blocking assignments in clocked blocks, missing defaults in combinational blocks, and no reset on state registers all show up as real hardware bugs.

QUICK FAQ

Before you start preparing

Do VLSI interviews really ask digital electronics?

Yes. It is usually the first technical round for RTL design, verification, FPGA, physical design, DFT and embedded-hardware roles, and it is common in online tests for campus drives. Later rounds also assume it: STA builds on setup and hold, RTL on FSMs and counters, and verification on reading waveforms.

Which topics come up most often?

Two's complement and overflow, universal gates, K-maps, MUX-based logic, adders, hazards, latch versus flip-flop, setup and hold, counters, FSM sequence detectors, clock dividers and metastability. Freshers are also often asked to write a small Verilog module.

How deep do I need to know CMOS for a digital round?

Enough to draw a CMOS inverter, NAND and NOR, explain why NAND is preferred, state the dynamic power formula and explain noise margin and propagation delay. Transistor-level sizing and device physics belong to the CMOS round.

Do I need Verilog for a digital electronics interview?

For RTL, verification and FPGA roles, yes: expect to write a counter, an edge detector, a MUX or a simple FSM, and to explain blocking versus non-blocking assignments. For other roles a gate-level or block-diagram answer is usually enough.

What is the fastest way to revise before an interview?

Work through the formula sheet, redraw a K-map, a full adder, a flip-flop timing diagram and a sequence detector from memory, solve a few setup and hold numericals, then answer the rapid-fire round out loud.

Is a latch always a mistake?

No. Latches are used on purpose in clock-gating cells, time-borrowing high-speed designs and some memories. What interviewers dislike is an unintended latch inferred from an incomplete if or case in combinational RTL.

Want to be tested on these live?

Book a 1:1 mock interview with a mentor working in this exact domain.

Book a mock interview