AI Glossary / Graphs and symbolic AI / Beginner
Multiplexer
Definition
A multiplexer, often shortened to mux, selects one of several input signals and passes the selected signal to an output. Control inputs determine the selection. In a digital logic setting, it acts like a conditional choice between data values. It is a basic computing component rather than an AI model, although AI hardware and software systems depend on many forms of data selection.
What it means
The simplest digital multiplexer has two data inputs, one selection input, and one output. With a stated convention, selection value 0 chooses the first data input and selection value 1 chooses the second. The output is the chosen input's value, which can itself be either 0 or 1.
The selection input and the data inputs therefore play different roles. A selection value of 1 does not mean that the output must be 1. It means that a particular source is connected logically to the output. Real devices can add enable controls or other behavior, so their exact truth tables matter.
How it works
For an ideal two-input digital mux, let the data inputs be A and B and the selection bit be S. Under the convention S = 0 selects A, the Boolean expression is Y = (NOT S AND A) OR (S AND B). Only the selected branch contributes to the output.
Larger multiplexers use more selection bits to identify an input. A fully decoded mux with four data inputs needs two selection bits; eight inputs need three. A multibit mux selects whole words using coordinated bit channels. Physical circuits also have propagation delay and electrical requirements, which the ideal Boolean equation does not describe.
Three practical examples
- A processor datapath can select which of two data sources supplies a register's next value.
- A digital design exercise can use a mux to express an if-then-else operation and compare its truth table with a gate implementation.
- A hardware test setup can select between a normal signal source and a test pattern, provided the design handles the selection and timing requirements explicitly.
Think of it this way
Think of a railway switch choosing which incoming track connects to a single outgoing track. The switch position chooses the source; it does not create the contents arriving from that source. The analogy is limited because digital muxes operate on signal values and timing, and analog multiplexers involve additional electrical behavior rather than moving physical vehicles.
Worked example
Take an invented two-input mux with A = 1 and B = 0. If S = 0, then NOT S = 1. The Boolean expression gives (1 AND 1) OR (0 AND 0) = 1, so Y = 1. If S changes to 1, the expression gives (0 AND 1) OR (1 AND 0) = 0, so Y = 0.
Now consider a four-input mux with inputs D0 = 0, D1 = 1, D2 = 1, and D3 = 0. Define selection bits S1S0 as the ordinary binary index. Selection 10 means index 2, so the output is D2 = 1. Selection 11 means index 3, so the output is D3 = 0.
These are ideal steady-state calculations. They do not describe the brief behavior while physical signals change, and they assume no additional enable control. A real chip's truth table may specify a forced output when disabled, so omitting that input could lead to an incorrect prediction.
Illustrative case study
In a fictional electronics workshop, a team builds a classroom display that switches between two four-bit patterns. The diagram labels four mux channels, but the team initially assumes that each channel has an independent selection input. Their chosen component instead uses one common select signal for all four channels.
The team corrects the design explanation: it selects one complete four-bit pattern at a time. It also checks the component's strobe behavior so an inactive state is represented correctly in the demonstration. The case illustrates reading a device's actual interface rather than treating every mux as identical.
Common misconceptions and mistakes
A mux does not average its inputs, concatenate them, or automatically choose the “best” value. The control logic supplies a selection. A conventional combinational mux also does not remember a previous value merely because that value appeared at its output; storage requires another mechanism.
Distinguish a multiplexer from a demultiplexer, which directs an input toward a selected output. Also distinguish this digital selector from broader communications multiplexing, where multiple streams share a medium according to an agreed scheme. Related names do not make all of these devices or processes interchangeable.
Business use
Understanding multiplexers helps non-specialists read system diagrams and ask useful questions about shared processing resources. A design may appear to handle several sources while actually selecting only one at a time. That affects throughput assumptions and the surrounding control logic.
For hardware projects, review source selection, signal width, enable behavior, and timing in the context of the complete circuit. For software analogies, make clear whether a component selects a value, routes a stream, or schedules access over time. A single “mux” label should not conceal materially different behavior in a product specification.
People also ask
Does a select bit of 1 force the output high?
No. In the stated convention it selects input B, and the output follows B's value.
Can a mux select an entire data word?
Yes. Coordinated channels can select corresponding bits of a multibit source using common control inputs.
Is a multiplexer a learning algorithm?
No. A basic mux follows a selection rule. A larger AI system might generate the selection signal, but that does not turn the mux itself into a learner.
Check your understanding
With A = 0 and B = 1, what are the outputs for S = 0 and S = 1 in the ideal two-input example?
Answer: S = 0 selects A and gives 0. S = 1 selects B and gives 1. If both data inputs were 0, the output would be 0 for either selection.
Related terms
- Boolean logic
- logic gate
- conditional expression
- demultiplexer
- datapath
- selector
- combinational circuit
- propagation delay
- control signal
Learn next
Next, construct all eight combinations of A, B, and S for the two-input mux. Check that changing the unselected input never changes the ideal output. Then add an enable control with an explicitly defined disabled output and explain why the original three-input truth table is no longer sufficient.
More in Graphs and symbolic AI
- Multibody planning - Multibody planning is planning for several physically separate bodies, such as a fleet of robots, whose actions must be coordinated to achieve an overall...
- Multieffector planning - Multieffector planning is planning for a decision-making system with several effectors that can act, sometimes concurrently, on its environment.
- Multiple inheritance - Multiple inheritance means that a class or category has more than one parent from which it inherits applicable characteristics.
- Multiplicative binary search - Multiplicative binary search is a binary-search variant that searches keys stored in the level-order layout of an implicit binary search tree.
- Multivariate Gaussian - A multivariate Gaussian, also called a multivariate normal distribution, is a probability distribution for a vector of numerical variables considered jointly.
- Mutation - In evolutionary computation, mutation is an operator that changes a candidate solution to create a variant for evaluation.
Sources
Texas Instruments, SNx4HC157 data sheet, overview and device behavior: https://www.ti.com/lit/ds/symlink/sn74hc157.pdf . The manufacturer describes four two-source channels sharing selection and strobe controls, including the forced-low strobe behavior. The Boolean examples are original idealized calculations; no physical circuit or timing benchmark was run.
Previous: Multiple treatments Next: Multiplication Rule