Skip to main content

Welcome to a Grasp lesson

Create a free account to keep studying and create your own study path.

Lesson 7

From 2:1 to 4:1: Scaling Multiplexers

Recommended resources

Hello! In our last lesson, we focused on analyzing existing combinational circuits by constructing their truth tables. We saw how to break down a complex logic diagram into manageable steps to understand its complete behavior.

Today, we're flipping the script from analysis to design. We'll build our first essential combinational logic block: the multiplexer, often called a MUX. You'll learn what a multiplexer does, how to design a basic 2-to-1 MUX from scratch, and then, importantly, how to scale that design to create a larger 4-to-1 MUX. This concept of hierarchical design—building bigger components from smaller, proven ones—is a cornerstone of modern digital engineering.

By the end of this lesson, you will be able to design a 2:1 multiplexer and explain how to construct a 4:1 multiplexer using smaller MUXes as building blocks.

1. What is a Multiplexer?

A multiplexer is a digital component that functions like a selector switch. It has multiple data input lines, a set of "select" lines, and a single output line. The binary value on the select lines determines which one of the data inputs is routed, or "connected," to the output.

This makes them incredibly useful for any application where you need to choose between different data sources. For example, a single communication channel might need to transmit data from several different sensors; a multiplexer could be used to select which sensor's data is sent at any given time.


2. Designing a 2-to-1 Multiplexer

Let's start with the simplest form: a 2-to-1 multiplexer (2:1 MUX). As its name implies, it has:

  • Two data inputs (let's call them and )
  • One output ()
  • One select line () to choose between the two inputs.

Since we have two inputs to choose from, a single select bit is sufficient. The rule is simple:

  • If , the output should be equal to the input .
  • If , the output should be equal to the input .

From Behavior to Logic Equation

Just as we did when analyzing circuits, we can start by defining this behavior in a truth table. This table, often called a characteristic table, summarizes the function of the MUX.

S Y
0
1

From this table, we can derive a Boolean expression for the output . This process should feel familiar from Module 1, where you learned to derive expressions from truth tables (sum-of-products).

  • For the first case (), we want the output to be . The term that is true only when is . So, this part of the expression is .
  • For the second case (), we want the output to be . The term that is true only when is . So, this part is .

Since the output should be one or the other, we combine these terms with an OR gate:

This is the logic equation for a 2:1 multiplexer.

Gate-Level Implementation

With this equation, we can now draw the circuit diagram using basic gates. We will need:

  • One NOT gate (to invert )
  • Two AND gates (to create the product terms)
  • One OR gate (to sum the terms)

The following video segment walks through the truth table, logic expression, and resulting circuit diagram for the 2:1 MUX.

Multiplexer Explained | Implementation of Boolean function using Multiplexer

Please watch this segment from the video "Multiplexer Explained" by ALL ABOUT ELECTRONICS. It provides a clear visualization of the 2:1 MUX.

Focus on the explanation of the 2-to-1 MUX, covering its block diagram, simplified truth table, Boolean expression, and the final gate-level circuit. This will solidify the design process we just discussed.


3. Scaling Up: The 4-to-1 Multiplexer

Now, what if we need to select from four data inputs ()? For this, we need a 4-to-1 MUX.

First, how many select lines do we need? The relationship between the number of data inputs, , and the number of select lines, , is given by . For , we need select lines. Let's call them and . The 2-bit number formed by will select one of the four inputs:

Selected Input
0 0
0 1
1 0
1 1

We could derive a large Boolean expression for this, but a more elegant and scalable approach is to build the 4:1 MUX from the 2:1 MUXs we just designed. This is a common practice in digital design called hierarchical design.

Building a MUX Tree

To select one out of four, we can perform the selection in two stages.

  1. First Stage: Use two 2:1 MUXs to select one out of two inputs each.
    • One MUX takes inputs and .
    • A second MUX takes inputs and .
    • We can use the least significant select bit, , to control both of these MUXs.
  2. Second Stage: Use a third 2:1 MUX to select between the outputs of the first two MUXs.
    • The output of the first MUX (either or ) becomes the first input to our final MUX.
    • The output of the second MUX (either or ) becomes the second input.
    • We use the most significant select bit, , to make the final choice.

This creates a "tree" structure. The following image shows this construction clearly.

4x1 MUX from 2x1 MUXs Block Diagram
A 4:1 MUX can be built from three 2:1 MUXs. The first stage consists of two MUXs controlled by select line S0, which narrow four inputs down to two. The second stage uses a final MUX controlled by S1 to select the final output.

To better understand the logic and how to determine the number of MUXes required, the next video provides an excellent explanation.

MUX Tree Basic | 4X1 MUX using 2X1 MUX | Easy Explanation

Watch this video from Neso Academy, which explains the concept of a "MUX Tree" and walks through the design of a 4:1 MUX using 2:1 MUXs.

First, pay attention to the method for calculating the number of smaller MUXes needed. For a 4:1 MUX, the calculation is 4/2=2, then 2/2=1. Adding the results (2+1) tells us we need three 2:1 MUXs. Next, focus on how the select lines are connected. The video clearly explains why S0 is connected to the first stage and S1 to the second by analyzing the 4:1 MUX truth table. This is a crucial detail for making the circuit work correctly.

This hierarchical method is powerful. You could use the same principle to build an 8:1 MUX from 4:1 and 2:1 MUXs (or entirely from 2:1 MUXs), a 16:1 MUX from 4:1 MUXs, and so on. This scalability is a key reason why multiplexers are such fundamental components in digital systems.


Conclusion

In this lesson, we transitioned from analyzing circuits to designing them. We designed one of the most common combinational logic blocks, the multiplexer, from its behavioral description all the way to a gate-level circuit.

Here are the key takeaways:

  • A multiplexer (MUX) acts as a digital switch, selecting one of its data inputs to pass to a single output.
  • The selection is controlled by select lines, where .
  • A 2:1 MUX can be designed with the Boolean expression .
  • Larger MUXes, like a 4:1 MUX, can be designed hierarchically by combining smaller MUXes in a tree structure. This is a more scalable and modular approach than deriving a single, complex logic equation.

In our next lesson, we will explore another fundamental building block: the decoder. A decoder performs a function that can be seen as the inverse of a multiplexer's role, activating one of many outputs based on a binary input code.