Hello Readers,
Due to the recent spate of layoffs in late 2008, a high amount of panic and interview preparation frenzy has seeped into the industry. This has triggered a significantly increased number of emails we get every day, mainly asking for pointers for interview preparation, which I have compiled below. This compilation is a list of books and links that will help you kick-start your preparation.
What a digital logic design interview tests
If you are preparing for a digital logic design interview, you might want to brush up on some of the essential concepts and skills that are often tested in this field. Digital logic design is the process of creating and analyzing digital circuits that perform logical operations using binary values. It is the foundation of many applications, such as computer architecture, microprocessors, embedded systems, cryptography and more.
These are the key topics you should know:
- Number systems and conversions: work with binary, decimal, hexadecimal and octal, convert between them, and do addition, subtraction, multiplication and division in each.
- Boolean algebra and logic gates: know the basic laws (De Morgan's laws, distributive, commutative, associative and identity laws) and use AND, OR, NOT, NAND, NOR, XOR and XNOR gates to implement Boolean functions.
- Combinational circuits: design and analyze circuits with no memory, whose outputs depend only on the current inputs: multiplexers, demultiplexers, encoders, decoders, adders, subtractors, comparators and parity generators and checkers.
- Sequential circuits: design and analyze circuits with memory, whose outputs depend on current inputs and previous state: flip-flops (SR, JK, D, T), registers, shift registers, counters, latches and memories (RAM, ROM).
- Finite state machines: model a problem as a finite state machine (FSM) with states and transitions, draw the state diagram and state table, and implement it with flip-flops and logic.
These are the core topics to master. There may be other topics or questions specific to the company or the role you are applying for, so research the role and practice before the interview.
How to use this page
Read the topic list above and be honest about which ones you cannot yet do on a whiteboard without notes. Pick one book from the list below for the gaps, work through the examples in the deep dive, and use the links for extra practice problems. Interviewers care far more about clear reasoning on a small problem than about how many topics you have read about.
Popular topics on this blog
This blog is also a treasure chest of information you might not expect to find on the web. The most useful topic pages for interview preparation are:
- Interview Questions: company-wise and topic-wise questions with answers.
- Digital Logic: gates, puzzles, flip-flops and counters.
- Static Timing Analysis: setup, hold, skew and timing closure.
- Verilog and VHDL: coding examples and guidelines.
- RTL Design, Verification and Low Power Design.
- Books and Resources: more reading lists like this one.
Deep dive: the numbers and details
This part holds worked examples for each topic, then the full book and link list. Skip it if the overview is all you need.
Number systems: a worked conversion
Convert 0xB6 to decimal and to binary. Each hex digit is four bits: B = 1011 and 6 = 0110, so 0xB6 = 1011 0110. In decimal, 11 x 16 + 6 = 182. As an 8-bit two's complement number, the top bit is 1, so the value is 182 - 256 = -74. Interviewers often ask for exactly this last step to see whether you know signed and unsigned readings of the same bits.
Boolean algebra: De Morgan in one line
NOT(A AND B) = NOT A OR NOT B, and NOT(A OR B) = NOT A AND NOT B. A common question is "build an OR gate from NAND gates only": OR(A, B) = NAND(NOT A, NOT B), and each NOT is a NAND with its inputs tied together, so it takes three NAND gates.
Combinational circuits: the full adder
| A | B | Cin | Sum | Cout |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 1 | 0 |
| 0 | 1 | 0 | 1 | 0 |
| 0 | 1 | 1 | 0 | 1 |
| 1 | 0 | 0 | 1 | 0 |
| 1 | 0 | 1 | 0 | 1 |
| 1 | 1 | 0 | 0 | 1 |
| 1 | 1 | 1 | 1 | 1 |
Sum = A XOR B XOR Cin and Cout = AB + Cin(A XOR B). An n-bit ripple-carry adder chains n of these, so its worst-case delay grows linearly with n; carry-lookahead adders cut that to roughly logarithmic growth at the cost of more gates.
Sequential circuits: counter and flip-flop numbers
An n-bit binary counter counts 2^n states, so a mod-10 counter needs 4 flip-flops (2^3 = 8 is too few, 2^4 = 16 is enough). The highest clock frequency of a synchronous counter is set by the flip-flop clock-to-Q delay plus the increment logic plus the setup time: f_max = 1 / (t_clk2q + t_logic + t_setup). With 0.2 ns, 0.6 ns and 0.1 ns (illustrative values), f_max = 1 / 0.9 ns, about 1.1 GHz.
Finite state machines: a sequence detector
A classic question is "detect the sequence 101 on a serial input, with overlap". A Mealy machine needs three states: S0 (nothing seen), S1 (seen 1), S2 (seen 10). From S2, an input of 1 raises the output and moves to S1, because the final 1 can start the next match. A Moore machine for the same job needs four states, because the output is tied to a state rather than to a transition. Be ready to explain this difference and to write the state table.
Books
- Fundamentals of Digital Logic and Microcomputer Design by M. Rafiquzzaman. An essential reference that gives you the fundamental tools to design typical digital systems.
- Digital Logic Circuit Analysis and Design by Nelson, Nagle, Carroll and Irwin. Covers the basics of digital logic circuit analysis and design.
- Verilog HDL (2nd Edition) by Samir Palnitkar. A jump starter: basic digital design paradigms and the Verilog HDL constructs needed to build small digital circuits and run simulations.
- Verilog HDL Synthesis, A Practical Primer by Jayaram Bhasker. Shows not only what hardware results from various Verilog constructs, but how to tailor the Verilog to get the hardware you want.
- Circuit Design with VHDL by Volnei A. Pedroni. Teaches VHDL through complete design examples with programmable logic and laboratory exercises, combining language features with design concepts, circuit diagrams, explained solutions and simulation results.
Links
Several of the original links have moved or closed since 2008. Where the original page is gone, the link now goes to the Internet Archive copy of that exact page.
- VHDL Tutorial: Learn by Example by Weijun Zhang (UC Riverside). Short, complete VHDL examples for gates, combinational blocks, flip-flops, counters and FSMs; still online.
- VHDL Mini-Reference (Auburn University, archived copy). A compact summary of VHDL syntax, with pointers to the VHDL Language Reference Manual.
- Digital Logic at play-hookey.com (archived copy, 2008). Illustrated pages on gates, flip-flops, counters and logic families.
- EE 4743/6743 Digital System Design (Mississippi State University, archived copy). Lecture notes and reading assignments in PDF.
- Principles of Digital Logic Design: From Gates to Microprocessors with VHDL (La Sierra University, archived table of contents). The companion page to the textbook by Enoch Hwang.
- ECE 303: Advanced Digital Logic Design (Northwestern University, archived copy). Course notes, mainly on computer organization.
- VHDL-Online tutorial (archived copy, 2008). A structured VHDL language tutorial.
- Digital Logic Design manual pages (Indiana University C421, archived copy). Manual pages for the tools built for the digital design class.
- ECE 221 Digital Logic Design lecture notes (University of Massachusetts, archived copy). A full undergraduate course outline with notes.
- ELEC 256 Digital Logic Design (University of British Columbia, archived copy). Homework questions, mainly in PDF; good for practice.
- An Introductory VHDL Tutorial (Green Mountain Computing Systems). Introduction and background, then structural, data flow and behavioral descriptions; still online.
- Digital Logic Lessons (Valparaiso University ECE 221, archived copy). Short lessons on core digital logic topics.
Good luck with your preparations!


Yes I agree worldwide there is uncertainty. Up until recently it has been an engineers paradise i.e. they could afford to be selective. Now the tables have turned (once again!) and the employers will fine tune the team.
ReplyDeleteThe question is, "What makes a good engineer?" and do you " Need a Degree to be successful at it?"
I have an interesting article by Jack Ganssle on my site worth a look.
Cheers,
Dale...ps nice site!
Yes. These are tough times.
ReplyDeleteThanks for the link btw. I am sure it is a good read.