1. Axioms of Combinational Logic
A combinational circuit is a digital system where output at any instant depends solely on the current combination of inputs — no memory of past states, no internal storage elements. Unlike sequential circuits (flip-flops, registers), combinational circuits have no feedback paths that create state.
Mathematically, a combinational circuit with n inputs and m outputs is a physical implementation of m Boolean functions of n variables. There are 22n possible Boolean functions for n inputs — for just 4 inputs, that's 65,536 possible behaviors.
Design Methodology
- Problem Statement: Define inputs, outputs, and functional behavior precisely.
- Truth Table: Enumerate all 2n input combinations with desired outputs.
- Simplification: Apply K-Maps or Boolean algebra to minimize gate count.
- Realization: Map to NAND/NOR standard cells for silicon implementation.
- Verification: Simulate all input combinations; check for hazards.
2. Binary Arithmetic Units: Adders
Half Adder
The simplest addition circuit: takes two 1-bit inputs and produces a Sum and Carry. It cannot handle a carry-in from a previous stage, making it suitable only for the least significant bit position.
Carry (C) = A · B
| A | B | Sum (S) | Carry (Cout) |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 0 |
| 1 | 0 | 1 | 0 |
| 1 | 1 | 0 | 1 |
Full Adder
The cornerstone of all multi-bit addition. A Full Adder accepts three inputs: A, B, and a Carry-in (Cin), producing Sum and Carry-out. It can be built from two Half Adders and an OR gate.
Carry (Cout) = A·B + B·Cin + A·Cin
| A | B | Cin | Sum (S) | 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 |
Ripple Carry Adder (RCA)
Chain N Full Adders in series, connecting Cout of each stage to Cin of the next. Simple to design but the carry must "ripple" from LSB to MSB — total delay scales as O(N). For a 64-bit adder, that's 64 Full Adder delays on the critical path, making it too slow for gigahertz operation.
3. Carry Look-Ahead Architecture (CLA)
The CLA eliminates the serial carry ripple by computing all carries simultaneously in parallel. It defines two auxiliary signals for each bit position i:
- Generate (Gi) = Ai · Bi: Carry is definitely produced at this stage.
- Propagate (Pi) = Ai ⊕ Bi: Carry is passed through if Cin is 1.
Expanding recursively: C2 = G1 + P1G0 + P1P0C0. All carries can be computed in just 2–3 gate delays regardless of word width. Modern x86/ARM processors use 64-bit CLA with block-level hierarchy (groups of 4 CLAs feeding a Group CLA) to achieve adder delays of under 1 ns.
4. Subtractors & 2's Complement Logic
A Full Subtractor computes A − B − Borrowin, producing a Difference and Borrowout:
Borrowout = A'·B + (A⊕B)'·Bin
In practice, hardware designers never build separate subtractors. Instead, modern ALUs perform subtraction by adding the 2's complement of the subtrahend: A − B = A + (B' + 1). This reuses the same adder hardware with just an XOR inversion stage and carrying in a '1'. A single N-bit adder with a "subtract mode" control performs both addition and subtraction — saving millions of transistors.
BCD Adder
When adding BCD-encoded decimals, the result must stay in range 0000–1001. If the 4-bit sum exceeds 9 (or produces a carry), add 6 (0110) as a correction factor to skip the invalid hex digits (A–F). BCD adders are used in calculators and financial ASICs requiring exact decimal representation.
5. Multiplexers (MUX) — Data Selectors
A multiplexer connects one of 2n data inputs to a single output based on n selection lines. It is the fundamental data-routing element in digital systems.
| S1 | S0 | Output Y | Active Input |
|---|---|---|---|
| 0 | 0 | D0 | D0 → Y |
| 0 | 1 | D1 | D1 → Y |
| 1 | 0 | D2 | D2 → Y |
| 1 | 1 | D3 | D3 → Y |
The Boolean expression for a 4-to-1 MUX: Y = S1'·S0'·D0 + S1'·S0·D1 + S1·S0'·D2 + S1·S0·D3
Cascading MUXes
A 16-to-1 MUX can be built from four 4-to-1 MUXes (first level) and one 4-to-1 MUX (second level). This tree structure reduces interconnect complexity and is easier to time than a single flat MUX implementation.
6. Demultiplexers (DEMUX)
A DEMUX performs the inverse of MUX: one input is routed to one of 2n outputs based on selection lines. Also called a Data Distributor. The unselected outputs remain at logic 0.
If the single data input is held constant at logic 1, the DEMUX behaves identically to a Decoder — activating exactly one output line. This dual use makes DEMUX/decoder cells interchangeable in many MSI designs.
Applications: Time-division multiplexing demultiplexing, memory bank selection, serial-to-parallel conversion, output port expansion in microcontrollers.
7. Decoders — Addressing & Translation
An N-to-2N decoder takes an N-bit binary input and activates exactly one of 2N output lines. The activated output corresponds to the binary number at the input. All other outputs remain LOW.
| A1 | A0 | Y0 | Y1 | Y2 | Y3 |
|---|---|---|---|---|---|
| 0 | 0 | 1 | 0 | 0 | 0 |
| 0 | 1 | 0 | 1 | 0 | 0 |
| 1 | 0 | 0 | 0 | 1 | 0 |
| 1 | 1 | 0 | 0 | 0 | 1 |
Memory Chip Select
A 10-to-1024 decoder enables individual rows in a DRAM memory array. The 10-bit row address activates exactly one of 1024 word lines. This is the fundamental addressing mechanism in every RAM chip — the decoder translates your binary address into a physical row/column activation.
Seven-Segment Decoder
A specialized decoder converting 4-bit BCD input to 7 output segments (a–g) controlling an LED display. Each output requires a separate K-Map simplification, yielding 7 distinct combinational logic functions. This is a classic examination problem in digital design courses and real hardware in every embedded display.
8. Encoders & Priority Encoders
An encoder is the inverse of a decoder: 2N inputs → N-bit binary output. It assumes only one input is active at a time. If multiple inputs are simultaneously active, the output is undefined — which is why the Priority Encoder was invented.
| D3 | D2 | D1 | D0 | A1 | A0 | Valid |
|---|---|---|---|---|---|---|
| 1 | X | X | X | 1 | 1 | 1 |
| 0 | 1 | X | X | 1 | 0 | 1 |
| 0 | 0 | 1 | X | 0 | 1 | 1 |
| 0 | 0 | 0 | 1 | 0 | 0 | 1 |
| 0 | 0 | 0 | 0 | X | X | 0 |
X = Don't Care (can be 0 or 1). The priority encoder outputs the binary code of the highest-priority active input (highest bit index), along with a Valid flag indicating any input is active.
9. Magnitude Comparators
A magnitude comparator determines the relationship between two N-bit binary numbers A and B, producing three outputs: A>B, A=B, A<B. For a 1-bit comparator:
- A = B:
A XNOR B(true when bits are identical) - A > B:
A AND NOT B - A < B:
NOT A AND B
For N-bit comparison, start from the MSB and work down. The MSB difference determines the result for most significant pairs; only if MSBs are equal do we check lower bits. This hierarchical comparison is how high-speed comparators are built in silicon.
Applications: Branch prediction (conditional jumps in CPUs compare register values), cache tag matching, priority arbitration in bus controllers, sorting hardware in network switches.
10. Code Converters
Binary to Grey Code
The MSB of Grey code equals the MSB of binary. Each subsequent Grey bit = current binary bit XOR previous binary bit: Gi = Bi ⊕ Bi+1. No simplification needed — this is an exact formula implementable with XOR gates only.
Grey Code to Binary
Inverse conversion: MSB of binary = MSB of Grey. Each subsequent binary bit = current Grey bit XOR previous binary bit: Bi = Gi ⊕ Bi+1. Note this is sequential in nature — each bit depends on the previous, creating a propagation chain.
BCD to Excess-3
Add 3 (binary 0011) to each BCD nibble. Since BCD digits range 0–9 (0000–1001), adding 0011 gives 0011–1100 (Excess-3 range). This is a pure combinational addition, implementable with a 4-bit adder with one input hard-wired to 0011.
11. Timing Hazards & Glitch Analysis
When input signals transition, they travel through different paths with different propagation delays. If a gate receives inputs that should logically produce a stable output but haven't all arrived yet, it may briefly output an incorrect value — called a glitch or hazard.
Static-1 Hazard
The output should remain at 1 during a transition but briefly drops to 0. Occurs when switching between adjacent minterms that share a K-Map group but the covering term was eliminated during minimization. Fix: add the consensus term — the prime implicant that covers both adjacent minterms, even if logically redundant.
Static-0 Hazard
Output should remain at 0 but briefly rises to 1. Fix in the dual (POS) form — add redundant product terms to cover all K-Map transitions.
12. Advanced Engineering FAQ
What is the difference between a Decoder and a Demultiplexer?
Logically similar but functionally distinct. A decoder takes N inputs and activates one of 2N outputs — it translates a binary code. A DEMUX takes 1 data signal and routes it to one of 2N outputs — it distributes data. Setting the data input of a DEMUX to constant 1 makes it functionally identical to a decoder.
Why does Grey Code matter in combinational circuits?
Standard binary transitions like 011→100 flip 3 bits simultaneously. In physical gates, these bits don't switch at exactly the same instant — the brief intermediate states (010, 110, etc.) appear as transient wrong values. Grey Code (010→110) flips only 1 bit per transition, eliminating these spurious intermediate states. Critical in shaft encoders and FSM state encoding.
What are "Don't Care" conditions and how do they help?
Don't Care (d or X) input combinations are those that either can never occur (invalid codes) or whose output doesn't matter. In K-Map minimization, we freely choose d conditions as 0 or 1 to create larger groupings, reducing the number of gates required. More gates = more power, more area, more propagation delay.
How does a MUX implement any Boolean function?
For an N-variable function, use a 2N−1-to-1 MUX with N−1 variables on the selection lines. For each of the 2N−1 combinations of the selection variables, the corresponding data input is connected to the N-th variable, its complement, 0, or 1 — determined by the truth table. This is called Shannon expansion (or Shannon decomposition).
What is a Critical Path in combinational design?
The longest delay path from any input to any output, determining the maximum operating frequency when placed between register stages. Timing closure in chip design means ensuring all combinational paths complete within the clock period minus setup time. Static Timing Analysis (STA) tools like PrimeTime enumerate millions of paths to find violations.
Combinational Circuit Simulator — 3 Tools
4-to-1 MUX · Full Adder · 2-to-4 Decoder
Toggle data inputs D0–D3 and selection lines S1, S0. The selected input is routed to output Y.
Toggle A, B, and Cin to see the Full Adder compute Sum and Carry with step-by-step logic.
Toggle address bits A1 and A0. Exactly one output Y0–Y3 goes HIGH, corresponding to the binary address.