A topic in the Open Knowledge Graph — a free, open map of 15,290 topics and the order to learn them in.

Multiplexers and Demultiplexers

College Depth 77 in the knowledge graph I know this Set as goal
203topics build on this
326prerequisites beneath it
See this on the map →
Combinational Circuit DesignBarrel Shifter and Rotation CircuitsCPU Datapath+2 more
multiplexer demultiplexer data-routing combinational

Core Idea

A multiplexer (MUX) selects one of several input signals and routes it to a single output, controlled by select lines. An n-to-1 MUX has log₂(n) select bits. A demultiplexer (DEMUX) routes a single input to one of several outputs. Multiplexers are universal: any Boolean function can be implemented with a single large enough MUX. In CPU datapaths, MUXes select operands, route results, and switch between different data sources based on control signals.

How It's Best Learned

Draw a 4-to-1 MUX schematic from its truth table, then implement it with basic gates. Practice implementing arbitrary Boolean functions using a MUX's select lines as inputs. Trace MUX use in a simple CPU datapath diagram.

Common Misconceptions

Explainer

From your work with combinational circuit design, you know how to build circuits that compute Boolean functions using gates. A multiplexer (MUX) is a specific combinational circuit that acts as a digitally controlled switch: it has several data inputs, a set of select lines, and one output. The select lines determine which input gets routed to the output. Think of it like a railroad switch — multiple tracks converge, and a control lever picks which one connects through to the main line.

A 2-to-1 MUX is the simplest case: two data inputs (D0 and D1), one select line (S), and one output (Y). When S = 0, the output equals D0; when S = 1, the output equals D1. The Boolean expression is Y = S'·D0 + S·D1, which you can implement directly with two AND gates, one NOT gate, and one OR gate. Scaling up, a 4-to-1 MUX has four data inputs and two select lines, an 8-to-1 MUX has eight inputs and three select lines, and in general an n-to-1 MUX requires log₂(n) select lines. Larger MUXes can be built by cascading smaller ones — two 4-to-1 MUXes feeding into a 2-to-1 MUX create an 8-to-1 MUX.

One of the most powerful properties of multiplexers is their universality: any Boolean function of n variables can be implemented using a single 2n-to-1 MUX by hardwiring the truth table values to the data inputs and using the function's variables as select lines. For example, to implement a 3-variable function, connect the eight rows of its truth table (each either 0 or 1) to the eight data inputs of an 8-to-1 MUX, and use the three variables as select lines. This makes MUXes a practical alternative to sum-of-products implementations, especially when the function is complex or needs to be reconfigurable.

A demultiplexer (DEMUX) performs the inverse operation: it takes a single data input and routes it to one of several outputs based on the select lines. All other outputs remain inactive (typically 0). A DEMUX is structurally identical to a decoder with an enable input — the data input serves as the enable, and the select lines determine which output receives it. In practice, MUXes and DEMUXes often work as pairs: a DEMUX at the sending end distributes data across multiple channels, and a MUX at the receiving end selects which channel to listen to. In CPU datapaths, multiplexers are everywhere — selecting between register values and immediate operands, choosing which ALU result to write back, deciding whether the next program counter comes from an increment or a branch target. Understanding MUXes is essential to reading any datapath diagram.

Practice Questions 5 questions

Prerequisite Chain

Understanding ZeroThe Number ZeroCounting to FiveCounting to 10Counting to 20Counting a Set of Objects Up to 20Cardinality: The Last Number CountedMatching Numerals to QuantitiesSubitizing Small QuantitiesAddition Within 10Number Bonds to 10Addition Within 20Doubles and Near DoublesDoubles Facts Within 10Near Doubles Facts Within 20Mental Math Strategies for AdditionMental Math: Adding and Subtracting TensAddition Within 100Repeated Addition as MultiplicationMultiplication as Equal GroupsMultiplication: ArraysBasic Multiplication Facts (0s, 1s, 2s, 5s, 10s)Multiplication Facts Within 100Division as Equal SharingDivision as Grouping (Measurement Division)Division: Grouping (Repeated Subtraction) ModelDivision: Fair Sharing ModelDivision as Equal SharingDivision as GroupingBasic Division FactsDivision Facts Within 100Multiplication and Division Fact FamiliesRelationship Between Multiplication and DivisionDivision Facts as Inverse of MultiplicationRemainders and Quotients in DivisionDivision Word ProblemsMulti-Step Word ProblemsSolving Multi-Step Word ProblemsMultiplication Word ProblemsDivision Word ProblemsIntroduction to Long DivisionFactors and MultiplesPrime and Composite NumbersEquivalent FractionsRelating Fractions and DecimalsDecimal Place ValueIntegers and the Number LineComparing and Ordering IntegersAbsolute ValueAdding IntegersSubtracting IntegersMultiplying IntegersIntroduction to ExponentsOrder of OperationsInteger Order of OperationsVariable ExpressionsThe Distributive PropertyVariables and Expressions ReviewIntroduction to PolynomialsAdding and Subtracting PolynomialsMultiplying PolynomialsFactorialPermutationsCombinationsCounting Principles: Addition and Multiplication RulesIntroduction to Graph TheoryPropositional Logic FoundationsLogical EquivalencesBoolean AlgebraBoolean Type and Truth ValuesComparison Operators and Boolean TestsLogical Operators and Boolean AlgebraBoolean Algebra and Fundamental LawsLogic Gates FundamentalsImplementing Boolean Functions with GatesKarnaugh Map SimplificationCombinational Circuit DesignMultiplexers and Demultiplexers

Longest path: 78 steps · 326 total prerequisite topics

Prerequisites (1)

Leads To (4)