A multiplexer (MUX) is a combinational circuit that selects one of several data inputs and routes it to a single output. The choice is made by select inputs.

A 2-to-1 MUX with data inputs , select , and output :
When , the output is ; when , the output is . The select bit picks the lane.
In general, an -to- MUX needs select bits. A 4-to-1 MUX has 2 select bits; an 8-to-1 has 3. The numbers written inside the MUX block diagram correspond to which input is connected when the select inputs hold that value.
Why it matters
Three common roles:
- Routing. Pick which of several signals goes downstream — bus arbitration, register file outputs, ALU operand selection.
- Function generation. Hard-code the data inputs to constants or simple combinations of variables, and the MUX implements an arbitrary Boolean function. This is what a LUT is, internally.
- Encoding Shannon’s expansion theorem. Any function can be decomposed as , which is exactly a 2-to-1 MUX with as select. The two cofactors and are themselves Boolean functions of the remaining variables — you still have to build them. Larger MUXes implement deeper decompositions: a 4-to-1 MUX with as select takes the four cofactors as data. The MUX itself is “free”; the hardware to produce the data inputs is not.
Examples
For a 2-to-1 MUX with select and inputs :
Composing MUXes builds bigger functions:
A third MUX can use these as data and as select:
That gives 3-input XOR (parity) from three 2-to-1 MUXes — no XOR gates required.

The reverse circuit, taking a single input and routing it to one of outputs based on select bits, is a Demultiplexer.