The Wayback Machine - https://web.archive.org/web/20241109200907/https://www.geeksforgeeks.org/multiplexers-in-digital-logic/
Open In App

Multiplexers in Digital Logic

Last Updated : 27 Sep, 2024
Summarize
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

In this article we will go through the multiplexer, we will first define what is a multiplexer then we will go through its types which are 2×1 and 4×1, then we will go through the Implementation of the 2×1 mux and higher mux with lower order mux, At last we will conclude our article with some applications, advantages and some FAQs.

What Are Multiplexers?

A multiplexer is a combinational circuit that has many data inputs and a single output, depending on control or select inputs. For N input lines, log2(N) selection lines are required, or equivalently, for [Tex] 2^n [/Tex] input lines, n selection lines are needed. Multiplexers are also known as “N-to-1 selectors,” parallel-to-serial converters, many-to-one circuits, and universal logic circuits. They are mainly used to increase the amount of data that can be sent over a network within a certain amount of time and bandwidth .

Multiplexer

Multiplexer

Multiplexers allow the selection of one output from multiple inputs. For more digital logic concepts, the GATE CS Self-Paced Course is an excellent resource.

Types of Mux

The Mux can be of different types based on input but in this article we will go through two major types of mux which are

  • 2×1 Mux
  • 4×1 Mux

2×1 Multiplexer

The 2×1 is a fundamental circuit which is also known 2-to-1 multiplexer that are used to choose one signal from two inputs and transmits it to the output. The 2×1 mux has two input lines, one output line, and a single selection line. It has various applications in digital systems such as in microprocessor it is used to select between two different data sources or between two different instructions.

Block Diagram of 2:1 Multiplexer with Truth Table

Given Below is the Block Diagram and Truth Table of 2:1 Mux. In this Block Diagram where I0 and I1 are the input lines ,Y is the output line and S0 is a single select line.

2-1-Multiplexer

Block Diagram of 2:1 Multiplexer with Truth Table

The output of the 2×1 Mux will depend on the selection line S0,

  • When S is 0(low), the I0 is selected
  • when S0 is 1(High), I1 is selected

Logical Expression of 2×1 Mux

Using the Truth Table ,the Logical Expression for Mux can be determined as

[Tex] Y=\overline{S_0}.I_0+S_0.I_1 [/Tex]

Circuit Diagram of 2×1 Multiplexers

Using truth table the circuit diagram can be given as


Circuit Diagram of 2x1 Mux

Circuit Diagram of 2×1 Mux


4×1 Multiplexer

The 4×1 Multiplexer which is also known as the 4-to-1 multiplexer. It is a multiplexer that has 4 inputs and a single output. The Output is selected as one of the 4 inputs which is based on the selection inputs. The number of the Selection lines will depend on the number of the input which is determined by the equation [Tex] log_2n [/Tex] ,In 4×1 Mux the selection lines can be determined as [Tex] log_4=2 [/Tex] ,slo two selections are needed.

Block Diagram of 4×1 Multiplexer

In the Given Block Diagram I0, I1, I2, and I3 are the 4 inputs and Y is the Single output which is based on Select lines S0 and S1.

4:1 Multiplexer




The output of the multiplexer is determined by the binary value of the selection lines

  • When S1S0=00, the input I0 is selected.
  • When S1S0=01, the input I1 is selected.
  • When S1S0=10, the input I2 is selected.
  • When S1S0=11, the input I3 is selected.

Truth Table of 4×1 Multiplexer

Given Below is the Truth Table of 4×1 Multiplexer

 Truth Table 4:1 Multiplexer


Circuit Diagram of 4×1 Multiplexers

Using truth table the circuit diagram can be given as

Circuit Diagram of 4:1 Multiplexers




Multiplexer can act as universal combinational circuit. All the standard logic gates can be implemented with multiplexers.

Implementation of Different Gates with 2:1 Mux

Given below are the Implementation of Different gate using 2:1 Mux

Implementation of NOT gate using 2 : 1 Mux

The Not gate from 2:1 Mux can be obtained by

  • Connect the input signal to one of the data input lines(I0).
  • Then connect a line (0 or 1) to the other data input line(I1)
  • Connect the same input line Select line S0 which is connected to D0.

Given Below is the Diagram for the Logical Representation of NOT gate using 2 : 1 Mux

 Implementation of NOT gate using 2 : 1 Mux

Implementation of AND gate using 2 : 1 Mux

The And gate from 2:1 Mux can be obtained by

  • Connect the input Y to I1.
  • Connect the input X to the selection line S0.
  • Connect a line(0) to I0.

Given Below is the Diagram for the Logical Representation of AND gate using 2 : 1 Mux

Implementation of AND gate using 2 : 1 Mux

For further more on the Implementation of AND gate using 2 : 1 Mux

Implementation of OR gate using 2 : 1 Mux

The OR gate from 2:1 Mux can be obtained by

  • Connect input X to the selection line S0.
  • Connect input Y to I1.
  • Connect Line(1) to I1.


Given Below is the Diagram for the Logical Representation of OR gate using 2 : 1 Mux

Implementation of OR gate using 2 : 1 Mux


Implementation of NAND, NOR, XOR and XNOR gates requires two 2:1 Mux. First multiplexer will act as NOT gate which will provide complemented input to the second multiplexer.

Implementation of NAND gate using 2 : 1 Mux

The NAND gate from 2:1 Mux can be obtained by

  • In first mux take inputs and 1 and 0 and y as selection line.
  • In Second MUX the Output from mux is connected to I1.
  • line(1) is given to the I0.
  • x is given as selection line for the second Mux.


Given Below is the Diagram for the Logical Representation of NAND gate using 2 : 1 Mux

Implementation of NAND gate using 2 : 1 Mux


For further more on the Implementation of NAND gate using 2 : 1 Mux

Implementation of NOR gate using 2 : 1 Mux

The Nor gate from 2:1 Mux can be obtained by

  • In first mux take inputs and 1 and 0 and y as selection line.
  • In Second MUX the Output from mux is connected to I0.
  • line(0) is given to the I1.
  • x is given as selection line for the second Mux.


Given Below is the Diagram for the Logical Representation of NOR gate using 2 : 1 Mux

Implementation of NOR gate using 2 : 1 Mux


For further more on the Implementation of NOR gate using 2 : 1 Mux

Implementation of EX-OR gate using 2 : 1 Mux

The Nor gate from 2:1 Mux can be obtained by

  • In first mux take inputs and 1 and 0 and y as selection line.
  • In Second MUX the Output from mux is connected to I1.
  • y is given to the I0.
  • x is given as selection line for the second Mux.


Given Below is the Diagram for the Logical Representation of EX-OR gate using 2 : 1 Mux

Implementation of EX-OR gate using 2 : 1 Mux

Implementation of EX-NOR gate using 2 : 1 Mux

Given Below is the Diagram for the Logical Representation of EX-OR gate using 2 : 1 Mux


The Nor gate from 2:1 Mux can be obtained by

  • In first mux take inputs and 1 and 0 and y as selection line.
  • In Second MUX the Output from mux is connected to I0.
  • y is given to the I1.
  • x is given as selection line for the second Mux.

Implementation of EX-NOR gate using 2 : 1 Mux

Implementation of Higher Order MUX using Lower Order MUX

Given Below are the Implementation of Higher Order MUX Using Lower Order MUX

4 : 1 MUX using 2 : 1 MUX

Three 2: 1 MUX are required to implement 4 : 1 MUX.

 4 : 1 MUX using 2 : 1 MUX

4 : 1 MUX using 2 : 1 MUX

Similarly,

While an 8:1 MUX requires seven (7) 2:1 MUX, a 16:1 MUX requires fifteen (15) 2:1 MUX, and a 64:1 MUX requires sixty-three (63) 2:1 MUX. Hence, we can draw the conclusion that an [Tex] 2^n:1 [/Tex] MUX requires sixty-three (63) 2:1 MUX. Hence, we can draw the conclusion that an 2 n :1 MUX requires (2n−1)2:1 MUX (2 n −1)2:1 MUX.

16 : 1 MUX using 4 : 1 MUX

Given Below is the logical Diagram of 16:1 Mux Using 4:1 Mux

16 : 1 MUX using 4 : 1 MUX


In general, to implement B : 1 MUX using A : 1 MUX , one formula is used to implement the same.
B / A = K1,
K1/ A = K2,
K2/ A = K3

K N-1 / A = K N = 1 (till we obtain 1 count of MUX).

And then add all the numbers of MUXes = K1 + K2 + K3 + …. + K N .
To implement 64 : 1 MUX using 4 : 1 MUX
Using the above formula, we can obtain the same.
64 / 4 = 16
16 / 4 = 4
4 / 4 = 1 (till we obtain 1 count of MUX)
Hence, total number of 4 : 1 MUX are required to implement 64 : 1 MUX = 16 + 4 + 1 = 21.

f ( A, B, C) = [Tex] \sum [/Tex] ( 1, 2, 3, 5, 6 ) with don’t care (7)

using A and B as the select lines for 4 : 1 MUX,

AB as select: Expanding the minterms to its boolean form and will see its 0 or 1 value in Cth place so that they can be placed in that manner.

AB as select





AC as select : Expanding the minterms to its Boolean form and will see its 0 or 1 value in Bth place so that they can be place in that manner.


AC as select




BC as select : Expanding the minterms to its boolean form and will see its 0 or 1 value in A th place so that they can be place in that manner.


Advantages of MUX

  • Efficiency : The Mux has good efficiency in routing multiple input signals to a single out signal based on control signals.
  • Optimization : The Mux helps to conserve resources such as wires, pins and integrated circuit (IC).
  • Different Implementation: The Mux can be used to implement different digital logic functions such AND,OR etc.
  • Flexibility: Mux can be easily configure according to the requirements and accommodate different data sources, enhancing system versatility.

Disadvantages of MUX

  • Limited number of data sources: The number of input that can be taken by a multiplexer is restricted by the number of control lines, which can cause limitations in certain applications.
  • Delay: Multiplexers can have some delay in the signal path, which can have impact on the performance of the circuit.
  • Complex control rationale: The control logic for multiplexers can be complex, particularly for bigger multiplexers with an large number of inputs.
  • Power utilization: Multiplexers can consume more power compared with other simple l ogic gate , particularly when they have a large number of inputs.

Applications of MUX

  • Data Routing : The Mux is used for data routing in the digital system where they select one of the several data lines and re-route it the output.
  • Data Selection : The Mux is used for data selection where they select data source according to the select lines.
  • Analog-to-Digital Conversion : The Mux are used in ADC to select different analog input channels.
  • Address Decoding : The Mux are used in Microprocessors or memory for address decoding.
  • Logic Function Implementation : Mux can be used to implement various logic functions.

Conclusion

In this Article we have gone through the MUX, we have seen Different Types of Mux which are 2×1 and 4×1 Mux, we have gone through the implementation of the 2×1 mux and higher mux with lower order mux. Also we have gone through its Advantages, Disadvantages and Applications in brief.

Frequently Asked Questions on Multiplexers in Digital Logic – FAQs

Why is the control logic for multiplexers is considered complex?

The Mux can be complex especially for larger multiplexers because of the control signals which select inputs based on the application requirements.

What are the different types of multiplexer architectures?

Mux architectures are changed on factors such as the total number of inputs, the number of select lines and the logic used for input selection.

How do multiplexers are used digital signal processing (DSP) applications?

In DSP applications, multiplexers are used for signal routing, selection, and processing.



Previous Article
Next Article

Similar Reads

Implementing 32:1 Multiplexer using 8:1 Multiplexers
A multiplexer is a digital combinational circuit that selects one out of several input lines and directs it to a single output line, hence often alternatively called a data selector. The selection of a particular input line out of several choices takes place on the basis of the selector lines. A multiplexer, in general, has n input lines, log2n sel
3 min read
Difference between Programmable Logic Array and Programming Array Logic
Programmable Logic Array (PLA) and Programming Array Logic (PAL) are the categories of programming logic devices. In PLA or Programmable Logic Array, there are massive functions can be implemented. Whereas in PAL or Programmable Array Logic, there is finite functions can be implemented. The distinction between PLA and PAL is that, PAL have programm
5 min read
Consensus Theorem in Digital Logic
Prerequisite - Properties of Boolean algebra, Minimization of Boolean Functions Redundancy theorem is used as a Boolean algebra trick in Digital Electronics. It is also known as Consensus Theorem: AB + A'C + BC = AB + A'C The consensus or resolvent of the terms AB and A'C is BC. It is the conjunction of all the unique literals of the terms, excludi
3 min read
Variable Entrant Map (VEM) in Digital Logic
Prerequisite - Karnaugh Map (K-map) K-map is the best manual technique to solve Boolean equations, but it becomes difficult to manage when number of variables exceed 5 or 6. So, a technique called Variable Entrant Map (VEM) is used to increase the effective size of k-map. It allows a smaller map to handle large number of variables. This is done by
3 min read
Static Hazards in Digital Logic
A hazard, if exists, in a digital circuit causes a temporary fluctuation in the output of the circuit. In other words, a hazard in a digital circuit is a temporary disturbance in the ideal operation of the circuit which if given some time, gets resolved itself. These disturbances or fluctuations occur when different paths from the input to output h
4 min read
Ring Counter in Digital Logic
A ring counter is a typical application of the Shift register. The ring counter is almost the same as the shift counter. The only change is that the output of the last flip-flop is connected to the input of the first flip-flop in the case of the ring counter but in the case of the shift register it is taken as output. Except for this, all the other
3 min read
Self Dual functions in Digital Logic
A function is said to be Self dual if and only if its dual is equivalent to the given function, i.e., if a given function is f(X, Y, Z) = (XY + YZ + ZX) then its dual is, fd(X, Y, Z) = (X + Y).(Y + Z).(Z + X) (fd = dual of the given function) = (XY + YZ + ZX), it is equivalent to the given function. So function is self dual. In a dual function: AND
2 min read
Adders and Subtractors in Digital Logic
Subtraction of two binary numbers can be accomplished by adding 2's complement of the subtrahend to the minuend and disregarding the final carry if any. If the MSB bit in the result of addition is a '0'. then the result of addition is the correct answer. If the MSB bit is a '1'. , this implies that the answer has a negative sign. The true magnitude
4 min read
Array Multiplier in Digital Logic
An array multiplier is a digital combinational circuit used for multiplying two binary numbers by employing an array of full adders and half adders. This array is used for the nearly simultaneous addition of the various product terms involved. To form the various product terms, an array of AND gates is used before the Adder array. Checking the bits
3 min read
Serial Binary Adder in Digital Logic
Serial binary adder is a combinational logic circuit that performs the addition of two binary numbers in serial form. Serial binary adder performs bit by bit addition. Two shift registers are used to store the binary numbers that are to be added. A single full adder is used to add one pair of bits at a time along with the carry. The carry output fr
2 min read
Non-binary Counter in Digital Logic
A counter is a circuit that counts the number of occurrences of an input. The circuit consists of flip-flops which along with combinational elements are used for generation of control signals. If M = Total number of states, and n = Total number of flip-flop Then, M <= 2n If M = 2n ; Binary counter and M < 2n ; Non-binary counter Block Diagram
2 min read
Logic Synthesis in Digital Electronics
The process of resolving into component parts or analyzing, interpreting, translating, optimizing (rearranging or rewriting to improve efficiency), and mapping RTL (Register Transfer Level) code into a particular and indicated cell library. Programmed production of logic components in a specific digital circuit which may involve various kinds of co
5 min read
List of “Difference Between” Digital Logic and Design Topics
Digital Logic and Design are the main part of ultramodern electronic systems which enable the structure of complex circuits that power our world of digital and technology. This is a system in computers that uses simple values to produce I/ O operations. These distinctions include sense gates, circuit designs, and design approaches, and They have a
4 min read
Wired Logic in Digital Electronics
Wired logic is a type of digital logic where some logic operations are carried out by directly coupling the outputs of a single or several logic gates. This approach is determined by the electrical properties of the gates involved. A logic gate that uses just passive components like diodes and resistors to implement boolean algebra is known as a wi
4 min read
What is Digital Logic ?
Modern computing system consists of complex system and technologies. These technologies are built upon some fundamental simple logics known as digital logic. By using digital logic gates we can develop complex logical circuit for various purposes like data storing, data manipulation or simply data representation. What is Digital Logic?One of the mo
2 min read
Ripple Counter in Digital Logic
Counters play a crucial role in digital logic circuits, enabling tasks such as clock frequency division and sequencing. This article explores the concept of ripple counters, a type of asynchronous counter, their operation, advantages, and disadvantages in digital logic design. What is a Counter?Counter is basically used to count the number of clock
5 min read
Counters in Digital Logic
A Counter is a device which stores (and sometimes displays) the number of times a particular event or process has occurred, often in relationship to a clock signal. Counters are used in digital electronics for counting purpose, they can count specific event happening in the circuit. For example, in UP counter a counter increases count for every ris
4 min read
Binary Decoder in Digital Logic
A binary decoder is a digital circuit that converts a binary code into a set of outputs. The binary code represents the position of the desired output and is used to select the specific output that is active. Binary decoders are the inverse of encoders and are commonly used in digital systems to convert a serial code into a parallel set of outputs.
7 min read
Digital Logic and Design - GATE CSE Previous Year Questions
Solving GATE Previous Year's Questions (PYQs) not only clears the concepts but also helps to gain flexibility, speed, accuracy, and understanding of the level of questions generally asked in the GATE exam, and that eventually helps you to gain good marks in the examination. Previous Year Questions help a candidate practice and revise for GATE, whic
4 min read
Digital Logic Design - Quiz Questions
Digital Logic Design is an important part in the field of Electrical and Electronics Engineering. Mastering this subject requires not only good theory knowledge but also learning practical applications. This Digital Logic Design Quiz is designed to test your fundamental understanding of Digital Logic Design. The quiz covers a wide range of topics r
15+ min read
Latches in Digital Logic
Latch is a digital circuit which converts its output according to its inputs instantly. To implement latches, we use different logic gates. In this article, we will see the definition of latches, latch types like SR, gated SR, D, gated D, JK and T with its truth table and diagrams and advantages and disadvantages of latch. Table of Content What are
7 min read
Encoders and Decoders in Digital Logic
Binary code of N digits can be used to store 2N distinct elements of coded information. This is what encoders and decoders are used for. Encoders convert 2N lines of input into a code of N bits and Decoders decode the N bits into 2N lines. 1. Encoders - An encoder is a combinational circuit that converts binary information in the form of a 2N input
4 min read
Half Subtractor in Digital Logic
A half subtractor is a digital logic circuit that performs binary subtraction of two single-bit binary numbers. It has two inputs, A and B, and two outputs, DIFFERENCE and BORROW. The DIFFERENCE output is the difference between the two input bits, while the BORROW output indicates whether borrowing was necessary during the subtraction. The half sub
3 min read
n-bit Johnson Counter in Digital Logic
Prerequisite - Counters  Johnson counter also known as creeping counter, is an example of synchronous counter. In Johnson counter, the complemented output of last flip flop is connected to input of first flip flop and to implement n-bit Johnson counter we require n flip-flop. It is one of the most important type of shift register counter. It is for
5 min read
BCD Adder in Digital Logic
BCD stands for binary coded decimal. It is used to perform the addition of BCD numbers. A BCD digit can have any of ten possible four-bit representations. Suppose, we have two 4-bit numbers A and B. The value of A and B can vary from 0(0000 in binary) to 9(1001 in binary) because we are considering decimal numbers.  The output will vary from 0 to 1
8 min read
Full Adder in Digital Logic
Full Adder is the adder that adds three inputs and produces two outputs. The first two inputs are A and B and the third input is an input carry as C-IN. The output carry is designated as C-OUT and the normal output is designated as S which is SUM. The C-OUT is also known as the majority 1's detector, whose output goes high when more than one input
5 min read
Universal Shift Register in Digital logic
A Universal shift register is a register which has both the right shift and left shift with parallel load capabilities. Universal shift registers are used as memory elements in computers. A Unidirectional shift register is capable of shifting in only one direction. A bidirectional shift register is capable of shifting in both the directions. The Un
4 min read
Functional Completeness in Digital Logic
Functional Completeness is a crucial concept in digital logic design. A set of logical operators is functionally complete if it can be used to express any Boolean function. This means that any logical operation, regardless of complexity, can be constructed using only operators from a functionally complete set. Table of Content Functional Completene
6 min read
Half Adder in Digital Logic
A half adder is a digital logic circuit that performs binary addition of two single-bit binary numbers. It has two inputs, A and B, and two outputs, SUM and CARRY. The SUM output is the least significant bit (LSB) of the result, while the CARRY output is the most significant bit (MSB) of the result, indicating whether there was a carry-over from th
4 min read
Shift Registers in Digital Logic
Pre-Requisite: Flip-Flops Flip flops can be used to store a single bit of binary data (1 or 0). However, in order to store multiple bits of data, we need multiple flip-flops. N flip flops are to be connected in order to store n bits of data. A Register is a device that is used to store such information. It is a group of flip-flops connected in seri
8 min read
Article Tags :
three90RightbarBannerImg