Combinational Logic
Multiplexers, decoders, and adders
Individual logic gates are like letters of the alphabet. They're useful, but the real power comes when you combine them into words and sentences. Combinational circuits combine gates into building blocks that do genuinely useful things: selecting data, decoding addresses, adding numbers.
These circuits have one key property: the output depends only on the current inputs. No memory, no history. Change the inputs and the output updates immediately.
Interactive Multiplexer & Adder
Switch between the MUX and Adder views. Toggle inputs to see data flow through the circuits:
Multiplexers: Data Selectors
A multiplexer (MUX) selects one of several data inputs and passes it to the output. A 4:1 MUX has 4 data inputs (D0–D3), 2 select bits (S1, S0), and 1 output. The select bits choose which input gets through:
- S1=0, S0=0 → output = D0
- S1=0, S0=1 → output = D1
- S1=1, S0=0 → output = D2
- S1=1, S0=1 → output = D3
MUXes are fundamental in FPGAs. The routing fabric uses thousands of them to connect logic blocks together.
Adders: Binary Arithmetic
A binary adder adds two numbers bit by bit, just like long addition by hand. A full adder takes two input bits plus a carry-in and produces a sum bit and a carry-out. Chain four full adders together and you get a 4-bit ripple-carry adder where the carry "ripples" from the least significant bit to the most significant bit.
Why This Matters for FPGA Design
- Routing fabric - FPGAs use MUXes extensively to connect logic blocks through the programmable routing network
- DSP slices - dedicated adder and multiplier hardware in FPGAs is built from the same principles
- Address decoding - decoders select which memory or peripheral responds to a given address
- ALU design - arithmetic logic units combine adders, MUXes, and other combinational blocks
Frequently Asked Questions
What is a multiplexer?
A multiplexer (MUX) is a data selector. It has multiple data inputs, one or more select inputs, and one output. The select inputs choose which data input gets passed to the output. A 4:1 MUX, for example, has 4 data inputs and 2 select bits, and the select bits pick one of the 4 inputs to send to the output. MUXes are everywhere in digital design, from routing data to implementing logic functions.
What is combinational logic?
Combinational logic circuits produce outputs that depend only on the current inputs and have no memory. Given the same inputs, you always get the same outputs. Examples include adders, multiplexers, decoders, and comparators. This is in contrast to sequential logic, which has memory elements and whose outputs depend on both current inputs and past state.
How does a binary adder work?
A binary adder adds two binary numbers bit by bit, from right to left, just like you add decimal numbers by hand. A half adder adds two single bits. A full adder adds two bits plus a carry-in from the previous position. Chain multiple full adders together and you get a ripple-carry adder that can add multi-bit numbers. This is the basic arithmetic unit inside every processor and FPGA.
Quick Check
Test your understanding of the key concepts from this lesson.





