Overview
A multiplexer (MUX) is a combinational circuit that selects one of several input data lines and routes it to a single output, based on a binary select signal. A 2-to-1 MUX selects between 2 inputs using 1 select bit; a 4-to-1 MUX selects among 4 inputs using 2 select bits; an 8-to-1 MUX needs 3 select bits for 8 inputs.
The multiplexer acts like a digital switch or rotary selector — whichever input is "selected" by the control bits appears at the output. Multiplexers are one of the most versatile components in digital design: they implement boolean functions, build bus architectures, route data in processors, and reduce pin count in communication systems.
The simulator includes a MUX component (2-to-1 with select) that you can connect to inputs and observe how the select line switches between data sources in real time.
How It Works
A 2-to-1 MUX equation: Y = A·S' + B·S. When S=0: Y=A. When S=1: Y=B.
Implementation uses two AND gates (one for each data input × its select), an inverter for S', and an OR gate to combine the two AND outputs.
For a 4-to-1 MUX with inputs D0–D3 and select bits S1, S0: Y = D0·S1'·S0' + D1·S1'·S0 + D2·S1·S0' + D3·S1·S0
This is a sum-of-products expression — each term enables exactly one input for exactly one select combination. Note that a MUX can implement any boolean function: simply connect the function's truth table values to the data inputs D0–D3 and the function's input variables to the select lines.
Real-World Applications
MUXes select which device drives a shared data bus in each clock cycle, enabling multiple sources to share bandwidth.
A 2^N-to-1 MUX can implement any N-variable boolean function by connecting truth table output values to data inputs.
FPGA interconnect uses trees of MUXes to route signals between configurable logic blocks on the chip.
In communication systems, a MUX alternates between data streams, sending multiple signals over one channel in a time-shared manner.
In CPUs, MUXes select between forwarded data and register file data in the execute stage, resolving data hazards without stalls.
Try It in the Interactive Simulator
Build Multiplexer circuits in real time — drag gates, connect wires, toggle inputs, and see outputs update instantly.
Frequently Asked Questions
- What is a multiplexer (MUX)?
A multiplexer selects one of N input data lines and routes it to the output, controlled by binary select bits. A 2^N-to-1 MUX requires N select bits.
- What is the boolean expression for a 2-to-1 MUX?
Y = A·S' + B·S. When the select S=0, output Y equals input A. When S=1, Y equals input B.
- How is a MUX different from a decoder?
A decoder selects one of N outputs based on a binary code. A MUX selects one of N inputs and routes it to one output. A decoder has no data input; a MUX's select code controls which data source reaches the output.
- Can a MUX implement boolean functions?
Yes. A 2^N-to-1 MUX can implement any N-variable function: connect the function's output values (0 or 1) to the MUX data inputs in order, and connect the function's input variables to the select lines.
- What is the IC number for a multiplexer?
Common MUX ICs: 74HC151 (8-to-1 MUX), 74HC153 (dual 4-to-1 MUX), 74HC157 (quad 2-to-1 MUX).