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 Design→→Barrel 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 Zero → The Number Zero → Counting to Five → Counting to 10 → Counting to 20 → Counting a Set of Objects Up to 20 → Cardinality: The Last Number Counted → Matching Numerals to Quantities → Subitizing Small Quantities → Addition Within 10 → Number Bonds to 10 → Addition Within 20 → Doubles and Near Doubles → Doubles Facts Within 10 → Near Doubles Facts Within 20 → Mental Math Strategies for Addition → Mental Math: Adding and Subtracting Tens → Addition Within 100 → Repeated Addition as Multiplication → Multiplication as Equal Groups → Multiplication: Arrays → Basic Multiplication Facts (0s, 1s, 2s, 5s, 10s) → Multiplication Facts Within 100 → Division as Equal Sharing → Division as Grouping (Measurement Division) → Division: Grouping (Repeated Subtraction) Model → Division: Fair Sharing Model → Division as Equal Sharing → Division as Grouping → Basic Division Facts → Division Facts Within 100 → Multiplication and Division Fact Families → Relationship Between Multiplication and Division → Division Facts as Inverse of Multiplication → Remainders and Quotients in Division → Division Word Problems → Multi-Step Word Problems → Solving Multi-Step Word Problems → Multiplication Word Problems → Division Word Problems → Introduction to Long Division → Factors and Multiples → Prime and Composite Numbers → Equivalent Fractions → Relating Fractions and Decimals → Decimal Place Value → Integers and the Number Line → Comparing and Ordering Integers → Absolute Value → Adding Integers → Subtracting Integers → Multiplying Integers → Introduction to Exponents → Order of Operations → Integer Order of Operations → Variable Expressions → The Distributive Property → Variables and Expressions Review → Introduction to Polynomials → Adding and Subtracting Polynomials → Multiplying Polynomials → Factorial → Permutations → Combinations → Counting Principles: Addition and Multiplication Rules → Introduction to Graph Theory → Propositional Logic Foundations → Logical Equivalences → Boolean Algebra → Boolean Type and Truth Values → Comparison Operators and Boolean Tests → Logical Operators and Boolean Algebra → Boolean Algebra and Fundamental Laws → Logic Gates Fundamentals → Implementing Boolean Functions with Gates → Karnaugh Map Simplification → Combinational Circuit Design → Multiplexers and Demultiplexers

Longest path: 78 steps · 326 total prerequisite topics

Prerequisites (1)

Leads To (4)