How to Implement a Boolean Function Using a 4:1 Multiplexer

Learn how to implement a three-variable Boolean function using a 4:1 multiplexer. Explore K-Map analysis, select line assignment, MUX inputs, and a solved circuit example.

Kalana Sandeep10 min read
4:1 Multiplexer Boolean function implementation using Karnaugh map with data inputs I0 to I3

A multiplexer is a digital circuit that selects one of several input signals and forwards the selected signal to a single output. Besides its role in data selection, a multiplexer can also be used to implement Boolean functions.

This makes a 4:1 multiplexer particularly useful in digital logic design. With four data inputs and two select lines, it can implement suitable Boolean functions by assigning the correct values or variables to its input terminals.

In this guide, we will work through a three-variable Boolean function and use a Karnaugh map to understand how its values determine the four MUX data inputs.

Consider the function:

F(A,B,C) = Σm(1,2,6,7)

We will implement this function using a 4:1 multiplexer, with A and B as the select lines.

By the end, you should understand how to choose select variables, determine I0–I3, and verify the final implementation.

1. What Is a 4:1 Multiplexer?

A 4:1 multiplexer, commonly written as 4:1 MUX, is a combinational circuit (much like a full adder circuit) with four data inputs, two select inputs, and one output.

The four data inputs are:

  • I0
  • I1
  • I2
  • I3

The two select inputs are:

  • S1
  • S0

The output is:

  • Y

The select inputs determine which data input is connected to the output.

For example, when S1 = 0 and S0 = 1, the multiplexer selects I1.

A 4:1 MUX can therefore select one of four input signals using just two select bits.

4:1 Multiplexer block diagram showing data inputs I0-I3, select lines S1 and S0, and output Y

Figure 1: 4:1 Multiplexer block diagram featuring four data inputs, two select lines, and one output.

2. 4:1 Multiplexer Truth Table

The selection operation is defined by the following truth table:

S1S0Selected InputOutput
00I0I0
01I1I1
10I2I2
11I3I3

The output can also be represented using a Boolean expression:

Y = I0S1'S0' + I1S1'S0 + I2S1S0' + I3S1S0

Each product term represents one possible select-line combination.

For example:

  • When S1 = 0 and S0 = 0, the first term selects I0.
  • When S1 = 0 and S0 = 1, the second term selects I1.
  • When S1 = 1 and S0 = 0, the third term selects I2.
  • When S1 = 1 and S0 = 1, the fourth term selects I3.

This expression is the starting point for understanding how a MUX implements a Boolean function.

4:1 Multiplexer selection truth table showing input routing for each select line combination

Figure 2: 4:1 MUX functional truth table and Sum-of-Products selection equation.

3. Understanding Boolean Function Implementation Using a MUX

A multiplexer can implement a Boolean function by assigning some of its variables to the select inputs and connecting the remaining variables, their complements, or constant logic values to the data inputs.

For a three-variable Boolean function:

F(A,B,C)

we can choose two variables as select lines and use the remaining variable to determine the data inputs.

In this example, we will use:

S1 = A

S0 = B

The remaining variable is C.

The four MUX data inputs will be determined by examining the function for each possible combination of A and B.

This is where the Karnaugh map becomes useful.

4. Worked Example: Implement a Boolean Function Using a 4:1 MUX

Consider:

F(A,B,C) = Σm(1,2,6,7)

Our goal is to implement this function using one 4:1 multiplexer.

Step 1: Write the truth table

The minterm notation tells us that the function equals 1 for minterms 1, 2, 6 and 7. (See our guide on converting a truth table to a Karnaugh map).

Using variable order A, B, C:

ABCMintermF
000m00
001m11
010m21
011m30
100m40
101m50
110m61
111m71

Step 2: Construct the three-variable K-Map

Use C as the row variable and AB as the column variables.

The column order must be Gray-code order:

00, 01, 11, 10

The resulting K-Map is:

C \ AB00011110
00110
11010
Three-variable Karnaugh map for F(A,B,C) = ∑m(1,2,6,7) showing valid groups and column-wise MUX assignments

Figure 3: Three-variable K-Map for F = ∑m(1,2,6,7) showing the minimal SOP groups and column-by-column select mapping.

The K-Map confirms that the simplified SOP expression based on grouping rules is:

F = A'B'C + BC' + AB

However, we do not need to use this expression directly to connect the MUX.

Instead, we will examine the function for each combination of the select variables A and B.

Step 3: Choose the select lines

We have already chosen:

S1 = A

S0 = B

Therefore, the four select combinations are:

ABSelected MUX Input
00I0
01I1
10I2
11I3

Each combination determines which data input reaches the output.

Now we need to find the correct value for each data input.

Step 4: Determine I0

When:

A = 0, B = 0

Look at the truth table:

CF
00
11

The output follows the value of C.

Therefore:

I0 = C

Step 5: Determine I1

When:

A = 0, B = 1

The truth table gives:

CF
01
10

The output is the complement of C.

Therefore:

I1 = C'

Step 6: Determine I2

When:

A = 1, B = 0

The truth table gives:

CF
00
10

The output is always 0, regardless of C.

Therefore:

I2 = 0

Step 7: Determine I3

When:

A = 1, B = 1

The truth table gives:

CF
01
11

The output is always 1.

Therefore:

I3 = 1

5. Final MUX Input Assignment

We have now determined all four data inputs.

Select LinesData InputRequired Connection
AB = 00I0C
AB = 01I1C'
AB = 10I2Logic 0
AB = 11I3Logic 1

The final connections are:

  • S1 = A
  • S0 = B
  • I0 = C
  • I1 = C'
  • I2 = 0
  • I3 = 1
4:1 MUX data input assignments for I0, I1, I2, and I3 based on select inputs AB

Figure 4: Data input assignments for I0–I3 distinguishing direct variable, complemented variable, Logic 0, and Logic 1.

6. Final 4:1 MUX Logic Circuit

The final circuit requires one 4:1 multiplexer.

Connect the inputs as follows:

  • A to S1.
  • B to S0.
  • C to I0.
  • C through an inverter to I1.
  • Logic 0 to I2.
  • Logic 1 to I3.

The MUX output is F.

Complete 4:1 MUX implementation circuit schematic for F(A,B,C) = ∑m(1,2,6,7)

Figure 5: Complete hardware implementation of F(A,B,C) using a single 4:1 MUX and one inverter.

The output of the multiplexer now implements:

F(A,B,C) = Σm(1,2,6,7)

7. Verify the MUX Implementation

It is useful to verify the result using the original truth table.

ABCSelected InputMUX Output
000I0 = C = 00
001I0 = C = 11
010I1 = C' = 11
011I1 = C' = 00
100I2 = 00
101I2 = 00
110I3 = 11
111I3 = 11

Compare these results with the original Boolean function:

F(A,B,C) = Σm(1,2,6,7)

All eight combinations match.

Therefore, the 4:1 MUX implementation is correct.

8. Why Use a Karnaugh Map When Implementing a MUX?

A Karnaugh map helps visualize how a Boolean function behaves for different combinations of its input variables.

When implementing a function using a multiplexer, the K-Map can help with:

  • Understanding the function's output pattern.
  • Choosing suitable select variables.
  • Identifying the required data input functions.
  • Checking the simplified Boolean expression.
  • Verifying the final circuit.

However, remember that a K-Map is not always required to implement a Boolean function using a MUX. A truth table can also be used to determine the data input connections.

Using both methods gives a useful way to understand the relationship between Boolean functions and multiplexer circuits.

9. Common Mistakes in 4:1 MUX Implementation

1. Reversing the select line order

Always check which variable is assigned to S1 and which is assigned to S0.

In this example, S1 = A and S0 = B.

2. Confusing I1 and I2

For a standard 4:1 MUX, the input assignments follow:

00 → I0

01 → I1

10 → I2

11 → I3

3. Forgetting the complemented variable

If the function follows C' for a particular select combination, the corresponding input must receive the complemented signal.

4. Assuming every data input must be a variable

A data input can also be connected to logic 0 or logic 1 when the output is constant for that select combination.

5. Using the wrong variable order in the truth table

The minterm numbering in this example uses A, B, C. Maintain this order throughout the calculation.

6. Not verifying all input combinations

Check all eight rows for a three-variable function to ensure the MUX output matches the original function.

10. Frequently Asked Questions

What is a 4:1 multiplexer?

A 4:1 multiplexer is a combinational circuit with four data inputs, two select inputs, and one output. The select inputs determine which data input reaches the output.

Can a 4:1 MUX implement a three-variable Boolean function?

Yes. Two variables can be used as select lines, while the remaining variable, its complement, or constant logic values can be connected to the four data inputs.

How many select lines are required for a 4:1 MUX?

Two select lines are required because 2² = 4 possible input selections are available.

Why can the data inputs be 0 or 1?

For some select-line combinations, the Boolean function may produce a constant output regardless of the remaining variable. In those cases, the appropriate MUX data input can be connected directly to logic 0 or logic 1.

Is a Karnaugh map necessary for MUX implementation?

No. A truth table can be used directly to determine the MUX data inputs. A K-Map is an additional tool for visualizing and simplifying the Boolean function.

Can a 4:1 MUX implement a function with more than three variables?

Yes, depending on the function and available external logic. A four-variable function can use two variables as select inputs, with the remaining two-variable functions connected to the data inputs.

11. Practise Boolean Function Simplification

Understanding multiplexer implementation becomes easier when you are comfortable with Boolean functions and Karnaugh maps.

Try entering different Boolean functions into the Karnaugh Map Solver on this website. Compare the simplified expressions with your own K-Map calculations, then use those results to explore possible multiplexer implementations.

Conclusion

A 4:1 multiplexer can implement a three-variable Boolean function by using two variables as select lines and assigning the remaining variable or constant values to its data inputs.

For the example:

F(A,B,C) = Σm(1,2,6,7)

the final connections are:

  • S1 = A
  • S0 = B
  • I0 = C
  • I1 = C'
  • I2 = 0
  • I3 = 1

The key to solving these problems is understanding how each select-line combination determines the corresponding data input.

Once this relationship becomes clear, implementing Boolean functions using multiplexers becomes a systematic process rather than a guessing exercise.