Combinational Logic Design
Design and verify the standard combinational building blocks — decoders, multiplexers, encoders, comparators and adders — and reason about propagation delay and glitches.
Two ways in. Work the material, or if you already know this, go straight to the project and prove it.
Where this sits
- Prerequisites
- Number Systems and Boolean Algebra
- Used by tracks
- Digital PCB Designer
How this skill is structured
- 1. Concepts — the ideas stated plainly, with the equations worth memorising.
- 2. Worked example — one real problem solved end to end, numbers included.
- 3. Tool demonstration — do the thing in a real open-source tool.
- 4. Resources — the specific free readings and videos, and what part of each to use.
- 5. Project — built alone, producing something a reviewer can check.
- 6. Competence checklist — what you must be able to do. This is also the audit rubric.
1. Concepts
Read these first. Tick each one when you could explain it to someone else without notes.
2. Worked example
A glitch that resets your processor
ProblemA 3-to-8 decoder drives eight chip selects from an address bus. A colleague reports that occasionally the wrong peripheral responds. The logic is provably correct. What is happening?
- 1The decoder is combinational and correct in steady state: for any settled address, exactly one output asserts.
- 2But the address bus bits do not change simultaneously. If the address goes from 011 to 100, all three bits change, and they arrive skewed by routing and driver differences.
- 3During the transition the decoder may momentarily see 111, 001, 000 or other intermediate codes, and it will faithfully assert the corresponding chip select for a few nanoseconds each.
- 4A chip select is an asynchronous, edge-sensitive control input on most peripherals. A 3 ns pulse can be enough to latch a write.
- 5Quantify: if the bus skew is 2 ns and the decoder's propagation delay is 8 ns, the glitch window is roughly the skew, so glitches of up to about 2 ns can appear on the wrong outputs.
- 6Fix 1 (the correct one): gate the decoder with a qualified strobe. Add an enable input to the decoder driven by a signal that only asserts after the address has settled. The 74HC138 has exactly this — three enable inputs — and this is why.
- 7Fix 2 (synchronous): register the decoder outputs in flip-flops clocked after the address is stable. Glitches on a D input are harmless; only the value at the clock edge matters.
- 8Fix 3 (wrong): adding an RC filter to the chip select. This slows the edge, causes a slow transition through the threshold region, and can make things worse by adding metastability risk.
- 9General rule that falls out: never drive an asynchronous control input directly from unqualified combinational logic on a changing bus.
AnswerDecoding glitches during address transitions. Fix by gating the decoder with a settled strobe (the enable pins exist for this) or by registering the outputs. This is why address decoders in real designs always have an enable.
3. Tool demonstration
Build a 4-bit adder and an address decoder, measure the critical path, and see a real glitch on a simulated waveform.
4. Resources
Free and, wherever possible, openly licensed. The note tells you which part to actually use — do not read them cover to cover.
5. Project — build this on your own
About 3 hours. This is the artifact that proves the skill. Work it without a walkthrough.
Design, simulate and verify a 4-bit arithmetic and logic unit supporting at least four operations, with a full timing analysis and a demonstrated, then eliminated, glitch.
Deliverables
Acceptance criteria — how you know it is good enough
If you want to push further
- Export the design to VHDL or Verilog from Logisim-evolution and read the generated code, comparing it to what you would have written by hand.
- Implement the same ALU as a lookup table in a ROM and compare size, delay and flexibility.
6. Competence checklist
Tick these honestly. If you are auditing this skill, this is your rubric — you should be able to demonstrate every line from the project you just built.