Electrical
Multiplexer
N-input, 1-output digital selector controlled by select lines
A multiplexer (mux) selects one of N inputs to pass to a single output, controlled by log2(N) select lines. A 4-to-1 mux uses 2 select lines; an 8-to-1 uses 3. Demultiplexers reverse the operation. Combinational logic built from AND-OR or pass transistors. Found everywhere in digital design: bus arbitration, input selection in ALUs, time-division multiplexing in communications, and programmable logic. Analog multiplexers route analog signals using transmission-gate switches.
- FunctionSelect 1 of N inputs to output
- Select lineslog2(N) — 2 lines for 4-to-1
- Common sizes2:1, 4:1, 8:1, 16:1
- ReverseDemultiplexer (1 input, N outputs)
- Analog muxTransmission-gate switches
- ApplicationsALUs, buses, communications, FPGAs
Interactive visualization
Press play, or step through manually. The visualization is yours to drive — try it before reading on.
Watch the 60-second explainer
A condensed visual walkthrough — narrated, captioned, under a minute.
Why multiplexers matter
- Data selection. Choose among data sources in CPUs and FPGAs.
- Bus sharing. Multiple devices on a common channel.
- Communications. Time-division multiplexing on shared links.
- Sensor arrays. One ADC reads many sensors via analog mux.
- Display drivers. Scanning rows or columns sequentially.
- Logic implementation. Any function expressible as mux of inputs.
- Test access. Boundary scan and ATPG use multiplexed paths.
Common misconceptions
- Mux equals decoder. Decoder activates one output; mux routes one input.
- Select lines optional. N inputs need log2(N) select lines.
- Same as switch. Mux is combinational logic; switches can be mechanical or analog.
- Output always one input. Glitches during select transitions can show neither.
- Analog and digital interchangeable. Analog mux has finite on-resistance and bandwidth.
- One-hot select required. Standard mux uses binary-encoded select lines.
Frequently asked questions
What is a multiplexer?
A combinational digital circuit that routes one of several input signals to a single output. Selection is determined by binary select lines: an N-to-1 mux needs log2(N) select lines. Equivalently, a digital data selector. Demultiplexers do the reverse — one input routed to one of several outputs. Both are foundational in digital design.
How is a 4-to-1 mux built?
Four AND gates each receive one data input and a unique combination of the two select-line states (or their inverses). Exactly one AND gate has all inputs high based on the select code; its data input passes through. An OR gate combines the four AND outputs. Modern implementation uses pass transistors or transmission gates for less area and lower delay.
Where are multiplexers used in CPUs?
Many places. Selecting between ALU operations. Choosing register file outputs to feed ALU. Routing memory or I/O data to data bus. Selecting next-instruction PC source (sequential, branch, jump, exception). Pipeline forwarding selects whether to use register or forwarded value. Effectively, every conditional data routing is a mux.
What is time-division multiplexing?
Sharing a single channel by allocating time slots to different signals. T1 telephony combines 24 voice channels at 64 kbps each into a 1.544 Mbps stream by sampling each channel in turn. Receivers demultiplex by phase-locked timing. Ethernet, USB, and PCIe all use variants. Distinct from frequency-division multiplexing (separate frequencies) and code-division (orthogonal codes).
How does an analog mux differ?
Analog multiplexers route analog signals (continuous voltages) rather than digital levels. Built from CMOS transmission gates: pass transistor pair (NMOS and PMOS) with on-resistance of tens to hundreds of ohms. Bandwidth, on-resistance, and crosstalk specifications matter. Used to share an ADC among multiple sensors or route audio signals. Examples include ADG704, MAX4051.
What is bus arbitration?
Multiple devices need to drive a shared bus, but only one can drive at a time. A multiplexer (or tri-state buffers) routes the chosen master to the bus. Arbitration logic decides priority each cycle. Common in older microprocessor systems with shared buses. Modern designs more often use point-to-point links and crossbar switches (an array of muxes).
What is a demultiplexer?
Reverse of a mux. Takes one input and select lines, routing the input to one of N outputs. A 1-to-4 demux with two select lines drives one of four output lines based on the select code; others stay inactive. Used to route a serial data stream to multiple destinations or distribute a clock to selected modules.