What makes a circuit "combinational"?
A combinational circuit is one whose output depends only on its current inputs โ not on any previous history. There's no memory, no clock. Given the same inputs right now, you always get the same output. This makes them predictable and analytically tractable.
Contrast: Sequential circuits (flip-flops, state machines) remember past inputs. We'll cover those in the next course.
Common Combinational Circuits
Adders
Add two or more binary numbers. The half adder adds two bits; the full adder adds two bits plus a carry-in from a previous stage.
Multiplexers (MUX)
Select one of N inputs and route it to a single output using select lines. A 4-to-1 MUX needs 2 select lines.
Decoders
Convert a binary code into a one-hot output. A 2-to-4 decoder takes 2-bit input and activates exactly one of 4 outputs.
Encoders
The inverse of a decoder. Convert a one-hot input into a compact binary code.
Comparators
Compare two binary numbers and produce outputs for A > B, A = B, A < B. Used in CPU branch logic.
ALU Slices
Arithmetic Logic Units combine adders, comparators, and logic circuits. The core of every processor.
Half Adder
The simplest adder adds two single bits (A and B) and produces a Sum and a Carry. No carry-in is supported.
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 |
Notice 1+1 = binary 10 (sum=0, carry=1). That's exactly decimal 2 โ written in two bits.
Full Adder โ Interactive Demo
The full adder adds three bits: A, B, and Carry-In (Cin). Two half adders chained together form one full adder. Toggle the inputs:
โก Full Adder Simulator
Formula: Sum = A โ B โ Cin | Cout = AB + Cin(AโB)
Multiplexer (MUX)
A multiplexer routes one of several input signals to a single output line based on select inputs. A 4-to-1 MUX has 4 data inputs (I0โI3), 2 select lines (S1, S0), and 1 output.
Output = S1'S0'ยทI0 + S1'S0ยทI1 + S1S0'ยทI2 + S1S0ยทI3
๐ 4-to-1 MUX Demo
Decoder
A 2-to-4 decoder takes a 2-bit binary input and activates exactly one of four outputs:
| 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 |
Decoders are everywhere: in memory chips to select a row or column, in CPUs to decode instruction opcodes, and in display drivers to select the right segment of a 7-segment display.
How to Design a Combinational Circuit
- Define the problem โ write out all inputs and desired outputs
- Construct the truth table for all input combinations
- Write the Boolean expression (Sum of Products or Product of Sums)
- Simplify using Boolean algebra or K-maps
- Draw the gate-level circuit from the simplified expression
Logitosaur tip: Always simplify before drawing. A K-map for even a 4-variable function can halve your gate count.