Digital FAQ 1748016790
Digital FAQ 1748016790
Ideal For:
VLSI — Embedded Systems — Core Electronics Interviews
Edition: 2025
Based on Real Interview Experiences from Top Companies
Contact Information:
Name:Kittu K Patel
Email: [email protected]
Phone: +91 9016531681
If you have any doubts, feel free to reach out. I’m here to help!
Digital Electronics Interview Guide i
Contents
• NAND is a combination of AND + NOT: Output is LOW only when all inputs are
HIGH.
• NOR is a combination of OR + NOT: Output is HIGH only when all inputs are
LOW.
In practical implementation, NAND gates are more commonly used due to better transistor-
level efficiency in CMOS design.
Q3. Prove that DeMorgan’s Theorems hold true for three variables.
Asked in: ON Semiconductor
Answer:
DeMorgan’s Theorems:
A·B·C =A+B+C
A+B+C =A·B·C
Verified using a truth table of all 8 combinations of (A, B, C). The results on both sides
of the equations are the same for every combination.
Q4. What is the Boolean expression for the following logic circuit? (Text-
based description)
Asked in: NXP Semiconductors
Answer:
Assuming a circuit has two AND gates with inputs A, B and C, D respectively, both
outputs going into an OR gate:
Y = (A · B) + (C · D)
Digital Electronics Interview Guide 2
Q5. Why NAND gate is considered more efficient than NOR gate in VLSI?
Asked in: AMD, GlobalFoundries
Answer:
NAND gates require fewer transistors than NOR gates for CMOS implementation. Pull-
down networks in NAND are faster than pull-up networks in NOR. This makes NAND
preferable in critical path design.
F = AB + AB = A(B + B) = A(1) = A
Dual = A · (A + B)
A + AB = A and A(A + B) = A
Proof:
A + AB = A(1 + B) = A · 1 = A
A(A + B) = AA + AB = A + AB = A
• Minterm: A product (AND) term where each variable appears once. E.g., for A,
B: AB
• Maxterm: A sum (OR) term where each variable appears once. E.g., A + B
A + AB = A(1 + B) = A · 1 = A
Q15. How do you express the logic function of a 3-input majority gate?
Asked in: Cadence, Intel
Answer:
A 3-input majority gate outputs 1 when two or more inputs are 1.
Expression:
F = AB + BC + AC
Q16. Design a logic circuit that outputs 1 only when an odd number of
inputs are high (3-input case).
Asked in: MathWorks, TCS
Answer:
Use 3-input XOR:
Y =A⊕B⊕C
Digital Electronics Interview Guide 4
Q19. Prove: AB + C = A + B · C
Asked in: Wipro, Mindtree
Answer:
This is incorrect as written. Using DeMorgan:
AB + C = AB · C = (A + B) · C
• Associative: A + (B + C) = (A + B) + C, A · (B · C) = (A · B) · C
• OR: A + B = A · B
Circuit can be constructed accordingly.
Q27. How can you detect a stuck-at-0 fault using a simple logic gate?
Asked in: Cadence, Marvell
Answer:
Apply logic 1 to the input. If output remains 0, it confirms a stuck-at-0 fault. Use XOR
to compare expected vs observed outputs.
Input Output
0 1
1 0
Digital Electronics Interview Guide 6
Q30. Which logic gate has the property of output being false only when
all inputs are true?
Asked in: Honeywell, Vedanta
Answer:
NAND Gate — Truth table shows that it outputs 0 only when all inputs are 1.
Digital Electronics Interview Guide 7
Q33. Design a 2-to-4 line decoder with truth table and logic diagram.
Asked in: LT, Texas Instruments
Answer:
A1 A0 D0 D1 D2 D3
0 0 1 0 0 0
0 1 0 1 0 0
1 0 0 0 1 0
1 1 0 0 0 1
Y = S1 · S0 · I0 + S1 · S0 · I1 + S1 · S0 · I2 + S1 · S0 · I3
Q37. Design a half adder with logic diagram and truth table.
Asked in: Synopsys, Samsung
Answer:
• Sum = A XOR B
• Carry = A AND B
A B Sum Carry
0 0 0 0
0 1 1 0
1 0 1 0
1 1 0 1
A > B = A1 B1 +(A1 ⊙B1 )·A0 B0 A < B = A1 B1 +(A1 ⊙B1 )·A0 B0 A = B = (A1 ⊙B1 )·(A0 ⊙B0 )
• Switching networks
Q48. What is a look-ahead carry adder? How is it better than ripple carry
adder?
Asked in: Qualcomm, Broadcom
Answer:
It computes carries in advance using propagate and generate functions, reducing propa-
gation delay.
Ripple Carry Adder: O(n) delay, Look-Ahead Carry: O(log n) delay.
Q56. What is a universal gate? Why are NAND and NOR universal?
Asked in: MediaTek, Synopsys
Answer:
Universal gates can implement all basic logic functions (AND, OR, NOT).
NAND and NOR can form any logic gate, making them universal.
• Demultiplexer: Routes a single input to one of many output lines using select
inputs.
• Key difference: Decoder has no data input, only enable. Demux has data input.
• A > B: A1 B1 + A0 B0 · A1 ⊕ B1
• A < B: A1 B1 + A0 B0 · A1 ⊕ B1
• A = B: A1 ⊕ B1 · A0 ⊕ B0
• Key use: Resolves multiple active signals in systems like interrupt handling.
Gi = Ai · Bi (Generate), Pi = Ai + Bi (P ropagate)
• Resolution: Use redundant logic and analyze with timing diagrams and K-maps.
Digital Electronics Interview Guide 15
Q71. Explain how a 4-bit binary to Gray code converter can be designed
using logic gates. Derive the logic expressions and draw the truth table.
Asked in: Broadcom, Texas Instruments
Answer:
• Gray Code: Only one bit changes between two successive numbers.
• Logic Design:
G3 = B3
G2 = B3 ⊕ B2
G1 = B2 ⊕ B1
G0 = B1 ⊕ B0
where B3 B2 B1 B0 is binary input and G3 G2 G1 G0 is Gray output.
• Design each XOR operation using logic gates.
Q73. Design a combinational logic system that outputs ’1’ if a 4-bit input
represents a prime number, else outputs ’0’. Include logic expression and
minimization strategy.
Asked in: Nvidia, STMicroelectronics
Answer:
• Valid 4-bit primes: 2, 3, 5, 7, 11, 13
• Inputs: A3 A2 A1 A0 , minterms = 2,3,5,7,11,13
• Use SOP form and K-map simplification to derive final expression
Q74. What are the limitations of a multiplexer when used for implement-
ing combinational functions? Propose a method to overcome them using
additional logic blocks.
Asked in: Texas Instruments, Google Hardware
Answer:
Digital Electronics Interview Guide 16
• Limitations:
• Solution:
Q75. A vending machine accepts only 1 and 2 rupee coins and issues a
product when the total reaches 5 rupees. Design a combinational logic circuit
that signals when to dispense the product.
Asked in: ARM, Samsung
Answer:
Q76. How can a full adder be implemented using only two half-adders and
one OR gate? Derive equations and explain its circuit design.
Asked in: Analog Devices, NXP Semiconductors
Answer:
• Half-Adder 1: Inputs: A, B → S1 = A ⊕ B, C1 = A · B
• OR Gate: Cout = C1 + C2
• Addressed using:
– Hazard analysis
– Gate balancing
– Using faster gates
Digital Electronics Interview Guide 17
Q78. Compare and contrast PLA and PAL in terms of structure, flexibility,
and implementation complexity.
Asked in: ON Semiconductor, TI
Parameter PLA PAL
Structure Programmable AND and OR Fixed AND, Programmable OR
Answer: Flexibility More flexible Less flexible
Complexity More complex, customizable Faster, simpler
Speed Slightly slower Faster due to fixed logic
Q79. Describe the design and logic behind a seven-segment display de-
coder. Show truth table for BCD to 7-segment.
Asked in: Honeywell, Marvell Technology
Answer:
Q80. You are given a combinational logic block with unknown function.
Explain how to reverse engineer the logic function using truth table generation
and Boolean simplification.
Asked in: Synopsys, Cadence Design Systems
Answer:
Q81. How do you implement a 5-input majority function using only 2-input
logic gates? Provide truth table and derive optimized Boolean equation.
Asked in: Intel, GlobalFoundries
Answer:
• Total inputs = A, B, C, D, E
• Derive SOP, simplify using K-map, and implement with AND, OR, and NOT gates.
• Comparator outputs: A = B, A ¿ B, A ¡ B
Q84. Construct a logic circuit that detects a parity error in a 5-bit input
using even and odd parity logic.
Asked in: Cisco, Altera
Answer:
Q85. You are asked to design a 3-bit binary to Excess-3 code converter.
Provide circuit diagram and logic expressions.
Asked in: Texas Instruments, Wipro VLSI
Answer:
• Excess-3 = Binary + 3
Y1 = I3 + I2 , Y0 = I3 + I2 I1
Q87. What is a look-ahead carry adder? Explain its advantage over ripple
carry adder with logic and delay comparison.
Asked in: AMD, Microchip Technology
Answer:
• Ripple carry has linear delay; Look-ahead carry uses generate and propagate logic
• Carry generation: Gi = Ai · Bi , Pi = Ai ⊕ Bi
Q88. Design a circuit that detects whether the 4-bit binary input is divis-
ible by 3. Derive expression using Boolean algebra or state table.
Asked in: Qualcomm, Nvidia
Answer:
• Map all 4-bit inputs (0 to 15)
Q102. Design a D flip-flop using NAND gates only. Show truth table,
circuit diagram and explain working.
Asked in: AMD, Cadence
Answer: A D flip-flop can be built by modifying an SR latch. A D flip-flop eliminates
the invalid state by ensuring only one input. The D input is connected to one NAND
gate, and its complement to another. On clock edge, the gated SR latch stores the D
value.
Q108. Design a sequence detector for the pattern “1011” using Mealy and
Moore machines. Provide state diagrams.
Asked in: Qualcomm, Marvell
Answer: Moore: Output depends on state; Mealy: depends on input and state. Define
states for partial matches, transition accordingly, and output when sequence is detected.
Q109. What is the difference between hold time and setup time? Explain
using waveform.
Asked in: Analog Devices, AMD
Answer: Setup time: Data must be stable before clock edge. Hold time: Must remain
stable after clock. Violations lead to metastability.
Q111. Design a shift register that performs left, right and parallel load
operations. Include control logic.
Asked in: Microsemi, Texas Instruments
Answer: Use multiplexers at input of each flip-flop. Control signals determine mode.
Left shift: feed from next; Right shift: feed from previous; Load: take external input.
Q112. What is the role of clock skew in sequential circuits? How does it
affect performance and correctness?
Asked in: Synopsys, Intel
Answer: Clock skew: Difference in arrival time of clock at flip-flops. Positive skew may
help hold violations but hurt setup. Managed using clock trees and buffers.
Q114. How do ring counters differ from Johnson counters? Compare with
state diagrams.
Asked in: Marvell, Infineon
Answer: Ring: Feedback from last to first, only one ‘1’ circulates. Johnson: Comple-
mented MSB to LSB, double the states. Ring has n states, Johnson has 2n.
Q115. Create a state table and diagram for a traffic light controller with
three states: Red, Yellow, Green.
Digital Electronics Interview Guide 23
Q116. Explain the function of enable signal in flip-flops and how it affects
data storage.
Asked in: Cypress, Qualcomm
Answer: Enable controls when input data is sampled. Acts like a gate. When disabled,
no change in output regardless of input.
Q120. Explain the concept of finite state machine (FSM). How does it
apply to sequential circuit design?
Asked in: Marvell, Synopsys
Answer: FSM models system behavior with states, transitions, inputs and outputs.
Helps break down complex logic into manageable steps.
Q131. Design a 4-bit universal shift register and explain its working modes
(hold, shift left, shift right, parallel load) using logic diagram and control ta-
ble.
Asked in: Intel, Texas Instruments
Answer: A 4-bit universal shift register is a combination of four D flip-flops with ad-
ditional multiplexers at the input of each flip-flop. The multiplexer selects among four
operations:
- Hold (00): Current value is fed back to the D input.
- Shift Left (01): Each flip-flop receives the output from the right neighbor.
- Shift Right (10): Each flip-flop receives the output from the left neighbor.
-Parallel Load (11): Input data is directly loaded into flip-flops.
Each mode is selected using control inputs S1 and S0. The outputs are updated on the
clock edge.
Q134. What are the advantages and disadvantages of using a Mealy ma-
chine over a Moore machine in sequential logic?
Asked in: Synopsys, Marvell
Answer: Advantages of Mealy - Requires fewer states, making state machine simpler.
- Faster response to input changes as outputs can change without waiting for a state
transition.
Disadvantages: - Output glitches possible due to direct input dependency. - Harder to
Digital Electronics Interview Guide 25
test and debug due to tighter input-output coupling. In contrast, Moore outputs are
more stable but may require more states.
Q137. Design a circuit that divides a 100 MHz clock to 1 MHz using flip-
flops. How many flip-flops are needed and why?
Asked in: Intel, Nvidia
Answer:
To divide 100 MHz to 1 MHz: 100 MHz
1 MHz
= 100, so a divide-by-100 circuit is needed.
- Use a 7-bit counter (since 27 = 128 > 100). - Count from 0 to 99 (mod-100). On
count 99, reset the counter and toggle the output flip-flop. This design provides a precise
1 MHz clock from 100 MHz input using digital logic.
Q138. What is the importance of setup and hold time violations in se-
quential circuits? How are these analyzed in timing verification?
Asked in: Cadence, Synopsys
Answer: Setup time: Data must be stable before the clock edge. Hold time: Data must
remain stable after the clock edge. Violations: - Setup violation can cause incorrect data
to be latched.
- Hold violation causes metastability. Analyzed using Static Timing Analysis (STA).
Tools like PrimeTime report paths where timing constraints are violated. Designers re-
solve them by adjusting logic delays or clock skew.
Mitigation Techniques:
• Asynchronous FIFO with Gray code: Used in data transfer across clock do-
mains.
Q152. Draw and explain the Mealy and Moore state machines. Which one
is preferred and why?
Asked in: AMD, Synopsys
Answer:
Moore Machine: Mealy Machine:
Q154. Explain the function and importance of setup and hold times in
sequential circuits.
Asked in: Intel, ARM
Answer:
• Setup Time: Minimum time input should be stable before the clock edge.
• Hold Time: Minimum time input should remain stable after the clock edge.
• S0: Start
Q156. What are hazards in sequential logic? Explain static and dynamic
hazards.
Asked in: Lattice Semiconductor
Answer:
Q157. Why are Gray codes preferred in asynchronous counters and data
transfer?
Asked in: Western Digital, Seagate
Answer:
• Only one bit changes between consecutive values — prevents glitches.
• Ideal for clock domain crossing and rotary encoders.
Q159. Design a universal shift register and explain its operation modes.
Asked in: Google Hardware, Marvell
Answer:
• Modes: Shift left, Shift right, Parallel load, No change
• 4x1 MUX used for each flip-flop input to select mode
Diagram: Use 4 D flip-flops connected through MUX logic
Q160. Explain Clock Gating and how it helps in low-power VLSI design.
Asked in: MediaTek, Apple
Answer:
• Disables clock to inactive modules to reduce switching power
• Saves dynamic power
• Implemented using AND gates with enable signals
Diagram:
Clock
AND Gated Clock
Enable
• Serial-in, Parallel-out (SIPO): Bits are input serially, but all outputs are avail-
able simultaneously.
• Parallel-in, Serial-out (PISO): Multiple bits are input simultaneously, but the
output is serial.
Digital Electronics Interview Guide 30
• Parallel-in, Parallel-out (PIPO): Multiple bits are input and output simulta-
neously.
• Synchronous Counter: All flip-flops in the counter are triggered by the same
clock signal, which ensures that all flip-flops change state simultaneously.
occur. The diagram helps visualize the operation of a sequential circuit and is essential
in designing both Moore and Mealy state machines.
—
• For each combination of state and input, determine the next state and the corre-
sponding output.
• Fill the state table with this information, including current state, input, next state,
and output.
the input conditions. It avoids the invalid state problem present in the SR flip-flop. The
primary difference is that a D flip-flop stores the value of the data input, while a JK
flip-flop has a more complex behavior based on the J and K inputs.
—
45÷2 = 22 remainder 122÷2 = 11 remainder 011÷2 = 5 remainder 15÷2 = 2 remainder 12÷2 = 1 rem
Now, reading the remainders from bottom to top, we get the binary equivalent:
4510 = 1011012
1 × 23 + 1 × 22 + 0 × 21 + 1 × 20 = 8 + 4 + 0 + 1 = 13
A+B =A·B
A+A=1
A NAND B = A · B
A NOR B = A + B
A · B + C = A · B · C = (A + B) · C
A+A·B =A
A B A NAND B
0 0 1
0 1 1
1 0 1
1 1 0
—
Digital Electronics Interview Guide 41
A+A·B+A·C =A
A · B + C = A · B · C = (A + B) · C
(A ⊕ B) ⊕ C
A+A·B+B =A+B
A+B =A·B
A+B+C =A·B·C
A+A·B =A
A·B+A·B =A
236. What is the Boolean expression for the AND of three vari-
ables A, B, and C?
Answer: The Boolean expression for the AND of three variables is:
A·B·C
—
Digital Electronics Interview Guide 43
A+B+C
238. What is the truth table for the AND operation with three
variables?
Answer: The truth table for the AND operation with three variables is as follows:
A B C A·B·C
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 0
1 0 0 0
1 0 1 0
1 1 0 0
1 1 1 1
—
A+A·B+C =A+C
A+B+C
—
Digital Electronics Interview Guide 44
241. What is the truth table for the AND operation with four
variables?
Answer: The truth table for the AND operation with four variables is as follows:
A B C D A·B·C ·D
0 0 0 0 0
0 0 0 1 0
0 0 1 0 0
0 0 1 1 0
0 1 0 0 0
0 1 0 1 0
0 1 1 0 0
0 1 1 1 0
1 0 0 0 0
1 0 0 1 0
1 0 1 0 0
1 0 1 1 0
1 1 0 0 0
1 1 0 1 0
1 1 1 0 0
1 1 1 1 1
—
A·B·C
243. What is the truth table for the NOR operation with four
variables?
Answer: The truth table for the NOR operation with four variables is as follows:
245. What is the Boolean expression for the XOR operation with
three variables A, B, and C?
Answer: The Boolean expression for the XOR operation with three variables is:
A ⊕ B ⊕ C = (A ⊕ B) ⊕ C
—
Digital Electronics Interview Guide 46
246. What is the truth table for the XNOR operation with three
variables?
Answer: The truth table for the XNOR operation with three variables is as follows:
A B C A⊙B⊙C
0 0 0 1
0 0 1 0
0 1 0 0
0 1 1 1
1 0 0 0
1 0 1 0
1 1 1 1
1 1 0 0
—
A·A+B =0+B =B
—
’s a concise and polished continuation of your documentation in LaTeX format:
“‘latex
A·A+B =0+B =B
A+A·B =A
A · A + B = A · (A · B) = 0 · B = 0
—
Digital Electronics Interview Guide 47
A · B + A · B = A · (B + B) = A · 1 = A
A·B+A·B =A⊕B
(A + B) · (A + C) = A · A + A · C + B · A + B · C
A+A·C +B·C
A + A · (B + C) = A
—
Digital Electronics Interview Guide 48
1101
1001
The Hamming distance is 1, as only the second bit differs.
—
378 = 3 × 81 + 7 × 80 = 24 + 7 = 3110
—
Digital Electronics Interview Guide 52
75 ÷ 8 = 9 remainder = 3
9 ÷ 8 = 1 remainder = 1
1 ÷ 8 = 0 remainder = 1
Reading the remainders from bottom to top, we get:
7510 = 1138
510 = 1012
1⊕0=1
0⊕1=1
Thus, the Gray code of 510 is 1112 .
—
510 = 01012
10102 + 1 = 10112
1012 = 58 , 0112 = 38
9 = 1001, F = 1111
1011012
+0010112
10000002
The sum is 10000002 , which is a 7-bit result with the leftmost 1 being the carry-out.
—
303. Subtract 101012 from 110112 using 1’s and 2’s complement.
Answer: To subtract 101012 from 110112 using 2’s complement: 1. Find the 2’s com-
plement of 101012 .
Given number: 101012
1’s complement: 010102
Add 1:
010102 + 1 = 010112
Thus, the 2’s complement of 101012 is 010112 .
2. Now, add this to 110112 .
Thus, the result is 1011102 , which is 46 in decimal.
—
306. Convert the decimal number −38 to its binary form using
2’s complement.
Answer: To convert a negative decimal number to binary using 2’s complement: 1.
Convert the positive value to binary. 2. Find the 1’s complement. 3. Add 1.
Digital Electronics Interview Guide 59
0110012 + 1 = 0110102
311. How do you represent the number −37 in 8-bit 2’s comple-
ment?
Answer: To represent −37 in 8-bit 2’s complement: 1. Convert the positive value 3710
to binary:
3710 = 001001012
2. Find the 1’s complement:
110110102
3. Add 1:
110110102 + 1 = 110110112
Thus, −37 in 8-bit 2’s complement is 110110112 .
—
312. Convert the decimal number −19 to binary using 2’s com-
plement.
Answer: To convert −19 to binary using 2’s complement: 1. Convert the positive value
1910 to binary:
1910 = 100112
2. Find the 1’s complement:
011002
3. Add 1:
011002 + 1 = 011012
Thus, −19 in 2’s complement is 111011012 (for 8-bit representation).
—
Output = (A · B) · (C · D)
—
Digital Electronics Interview Guide 61
Output = (A + B) + (C + D)
—
S = A ⊕ B ⊕ Cin
This can be implemented using XOR gates, which can be realized using NAND gates.
2. The Carry output (Cout ) can be expressed as:
A + AB + A′ B = A(1 + B) + A′ B
2. Since 1 + B = 1, we have:
A + A′ B
3. The simplified Boolean expression is:
A + A′ B
S =A⊕B
Digital Electronics Interview Guide 62
C =A·B
Output = (A ↓ B) ↓ C
—
Output = (A ↓ B) ↓ (A ↓ B)
—
X =A⊕B⊕C
This can be implemented using NAND gates, following the steps for the 2-input XOR
gate.
—
Digital Electronics Interview Guide 63
Output = (A ↓ B) ↓ (A ↓ B)
—