Multiplexer and Demultiplexer Calculator
Calculate multiplexer (MUX) outputs and demultiplexer (DEMUX) output lines online. Choose the circuit size, set input bits and select lines, inspect the selected channel, and generate a truth table. This free digital logic calculator runs in your browser.
1. Multiplexer (MUX) calculator
A multiplexer selects one of several data inputs and forwards its value to one output.
Data inputs
Set each input to 0 or 1. Presets below can fill these values.
MUX result
Select-line values
Selected data input
Boolean expression
2. Demultiplexer (DEMUX) calculator
A demultiplexer routes one data input to the selected output. All unselected outputs remain 0.
Selected output
Output lines
DEMUX Boolean rule
3. Select-line finder
Find the binary select-line value required to address a particular channel in a multiplexer or demultiplexer.
Address result
4. Truth table generator
Generate a compact truth table for the current MUX or DEMUX settings. For a MUX, each row shows the select address, selected data input, and output for the current input pattern. For a DEMUX, each row shows the data input, select address, and all output lines.
Click Generate truth table to display the table.
Multiplexer and demultiplexer formulas
Multiplexer
A multiplexer has \(N\) data inputs, one output, and \(\log_2(N)\) select lines when \(N\) is a power of two. The select value is interpreted as a binary channel index.
For a 2:1 MUX:
Y = D0·S' + D1·S
For a 4:1 MUX:
Y = D0·S1'·S0' + D1·S1'·S0 + D2·S1·S0' + D3·S1·S0
Demultiplexer
A demultiplexer has one data input and \(N\) outputs. The select lines choose which output receives the data. When the input is 0, all outputs are 0.
For a 1:2 DEMUX:
Y0 = D·S'
Y1 = D·S
For larger DEMUX circuits, each output is the data input ANDed with the matching select-line minterm.
Common applications
- Data routing and channel selection in digital systems.
- Sharing a communication or data path between multiple sources.
- Memory address and input selection circuits.
- Implementing Boolean functions using multiplexers.
- Distributing one data stream to a selected destination.
- Learning combinational logic and verifying digital circuit designs.
Frequently asked questions
What is a multiplexer?
A multiplexer (MUX) is a combinational logic circuit that selects one of several data inputs and forwards the selected value to a single output. Select lines determine which input is chosen.
What is a demultiplexer?
A demultiplexer (DEMUX) takes one data input and routes it to one of several outputs. The select lines determine the destination output; the other outputs remain inactive.
How many select lines does an 8:1 MUX need?
An 8:1 multiplexer requires three select lines because 2³ = 8. The three select bits represent a channel index from 0 to 7.
How many select lines does a 16:1 MUX need?
A 16:1 multiplexer requires four select lines because 2⁴ = 16. The select value can address any input from D0 through D15.
What happens when the selected MUX input is 0?
The output is 0. A multiplexer forwards the value of the selected input, whether that value is 0 or 1.
What happens when a DEMUX input is 0?
All outputs are 0, regardless of the select value. When the data input is 1, the selected output becomes 1 and the remaining outputs stay 0.
Can a multiplexer implement a Boolean function?
Yes. By connecting data inputs to constants, variables, or complemented variables, a multiplexer can implement many Boolean functions. The required input connections depend on the function and the select variables.