Professional Documents
Culture Documents
Reddaiah 457
Reddaiah 457
DEMULTIPLEXER
MINI PROJECT
Submitted to
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY ANANTAPUR
in partial fulfillment of requirements for the award of the Degree of
BACHELOR OF TECHNOLOGY
In
ELECTRONICS AND COMMUNICATION ENGINEERING
submitted by
RACHAGORLA REDDAIAH
20001A0457
ANDHRA PRADESH-INDIA
2021- 2022
CERTIFICATE
This is to certify that the project report
DEMULTIPLEXER
a record of mini-project work done and
submitted by
RACHAGORLA REDDAIAH
20001A0457
TABLE OF CONTENTS
Chapter Page
Description
No. No.
1 INTRODUCTION
1.1 An introduction to demultiplexer 6
1.2 What is demultiplexer? 6-7
1.3 Types of demultiplexer 7
2 PROJECT DETAILS
2.1 1-to-2 Demultiplexer 8-10
2.2 1-to-4 Demultiplexer 10-13
2.3 1-to-8 Demultiplexer 13-16
2.4 1-to-16 Demultiplexer 16-19
2.5 Which IC works as an Demultiplexer? 20
2.6 Behavioral code for 1-to-4 Demultiplexer 20-21
3 IMPLEMENTATION
3.1 Software Implementation (code) 22-31
4 ADVANTAGES & DISADVANTAGES 32
5 APPLICATIONS 33
6 CONCLUSION 34
REFERENCES 34
3
DEMULTIPLEXER
LIST OF FIGURES
4
DEMULTIPLEXER
ACKNOWLEDGEMENT
5
DEMULTIPLEXER
CHAPTER 1
INTRODUCTION
A Demultiplexer is also called Demux or data distributor and its operation is quite opposite
to a multiplexer because it is an inverse to the multiplexer. The multiplexer is a many-to-
one circuit whereas the Demultiplexer is a one-to-many circuit. By using Demultiplexer,
the transmission of data can be done through one single input to a number of output data
lines.
Generally, Demultiplexers are used in decoder circuits and Boolean function generators.
There are different I/O configurations De-multiplexers are available in the single ICs form.
In addition, there is a cascading facility for two or above two DEMUX circuits for
producing several output de-multiplexers. This article discusses an overview of a
demultiplexer and its working.
6
DEMULTIPLEXER
A Demux is a 1-to-n device, whereas the Mux is an n-to-1 device. The demultiplexer block
diagram is shown below which includes a single input line, ’m’ select lines, and ‘n’ output
lines. Here ‘m’ select lines are mainly used to generate 2m output lines. For instance, a 1-
4 Demux needs 2 select lines for controlling the 4 o/p lines. In order to choose a particular
output, a set of select lines need to use for controlling the specific output line which is
connected to the input.
• 1-to-2 Demultiplexer
• 1-to-4 Demultiplexer
• 1 to 8 Demultiplexer
• 1-to-16 Demultiplexer
7
DEMULTIPLEXER
CHAPTER-2
PROJECT DETAILS
In the above diagram, the input to output lines can be connected through two methods, so
a single select signal is simply sufficient to perform the operation of demultiplexing.
Once the select input is 0 or LOW, then it will be supplied to ‘X0’ & if it is 1 is HIGH or
1, then the input will be supplied to X1. The 1-to-2 demultiplexer truth table is shown
below, where the input is connected to X0 & X1 based on the select input value ‘S’.
8
DEMULTIPLEXER
For the outputs X0, X1, select input ‘S’, data input ‘D’, the Boolean expression is;
From the above 1-2 Demux truth table, the Boolean algebra Expressions can be derived but
its logic diagram can be designed through 2-AND gates & 1- NOT gates. Once the select
line is zero, then the primary AND gate is enabled whereas the next AND gate are disabled.
9
DEMULTIPLEXER
After that, the input data can be supplied toward the o/p line ‘X0’. Likewise, once the select
line is 1, then the secondary AND gate will be enabled while the primary AND gate is
disabled, so data can be supplied toward the output line ‘X1’.
10
DEMULTIPLEXER
From the below truth table, we can conclude that once both the select inputs are 0 & 1, the
data input can be connected to output X0. Similarly, once selection lines S0 & S1 are 0 &
1, then data input can be connected to X1 output.
11
DEMULTIPLEXER
Likewise, the remaining outputs will be connected toward the input for the other two select
lines combinations. So, the Boolean expression for the outputs can be derived by using the
above truth table.
• X0 = S1’ S0’ D
• X1 = S1’ S0 D
• X2 = S1 S0’ D
• X3 = S1 S0 D
In the above expression, the input data is ‘D’, output lines are X0, X1, X2 & X3 and select
lines are S0 & S1. By using the above Boolean expressions, the implementation of a 1-4 Demux
can be done with 4 AND gates & 2 NOT gates.
12
DEMULTIPLEXER
By using the above Boolean expressions, the implementation of a 1-4 Demux can be done
with 4 AND gates & 2 NOT gates. The two select lines like S0 & S1 will allow a specific
AND logic gate at a time. In addition, there is a Strobe input or an Enable pin which works
as a universal enable input which means when the enable bit is high then the outputs are
active. So based on the combination of the select inputs, input data can be transmitted using
the selected gate toward the associated output.
2.3 1 to 8 Demultiplexer
The 1-8 demultiplexer block diagram is shown below which includes one input ‘D’, 3-
select inputs like S0, S1 & S2 & 8 outputs like X0, X1, X2¸ X3, X4¸ X5¸ X6 & X7. This
type of Demux is also called 3-8 Demux because of the 3 select input lines & 8 output lines.
13
DEMULTIPLEXER
It transmits one input line toward one of the eight output lines based on the select inputs
combinations like input ‘D’ is connected to one of the outputs from X0 to X7 depending
on the S0, S1 & S2 select lines. The truth table of 1 to 8 Demux is shown below.
Based on the above-mentioned truth table, for all the outputs, the Boolean expression can
be written like the following
14
DEMULTIPLEXER
• X1 = S2’ S1’ S0 D
• X2 = S2’ S1 S0’ D
• X3 = S2’ S1 S0 D
• X4 = S2 S1’ S0’ D
• X5 = S2 S1’ S0 D
• X6 = S2 S1 S0’ D
• X7 = S2 S1 S0 D
From the above Boolean equations, a 1 to 8 demultiplexer logic diagram can be designed
through 8 four-input AND logic gates & 3 NOT logic gates as shown in the following logic
diagram.
15
DEMULTIPLEXER
One AND gate can be activated through different select lines combinations in a specified
time so that input data will come out at the equivalent output.
2.4 1 to 16 Demultiplexer
The 1-16 demultiplexer block diagram is shown below which includes one data input bit
‘D’, four control bits S0 to S3 & 16 output bits from Xo to X15. This type of DEMUX is
used to transmit a single input line to one of the output lines from X0 to X15 based on the
four select lines.
16
DEMULTIPLEXER
From the above tabular form, the Boolean expressions can be formed like the following.
17
DEMULTIPLEXER
• X0= S0′.S1′.S2′.S3′ D
• X1= S0′.S1′.S2′.S3 D
• X2=.S0′.S1′.S2.S3′ D
• X3= S0′.S1′.S2.S3 D
• X4= S0′.S1.S2′.S3′ D
• X5= S0′.S1.S2′.S3 D
• X6= S0′.S1.S2.S3′ D
• X7= S0′.S1.S2.S3 D
• X8 = S0.S1′.S2′.S3′ D
• X9 = S0.S1′.S2′.S3
• X10 = S0.S1′.S2.S3′ D
• X11= S0.S1′.S2.S3 D
• X12 = S0.S1.S2′.S3′ D
• X13= S0.S1.S2′.S3 D
• X14= S0.S1.S2.S3′ D
• X15= S0.S1.S2′.S3 D
18
DEMULTIPLEXER
From the above Boolean equations, a 1 to 16 demultiplexer logic diagram can be designed
through 16 AND logic gates & 4 NOT logic gates as shown in the following logic diagram.
Here, one AND logic gate can be enabled through various select lines combinations within
a particular time so that input data will appear at the output.
19
DEMULTIPLEXER
Here we are going to work with 1-to-4 demultiplexer. A 1-to-4 demultiplexer consists of
one input data line,four outputs, andtwo control lines to make selections.
The below diagram shows the circuit of the 1-to-4 demultiplexer. Here a1 and a0 are control
or select lines y0, y1, y2, y3 are outputs, and Din is the data line.
20
DEMULTIPLEXER
The values of a1a0 determine which of the outputs are set to the value of Din. When Din=0, all
the outputs are set to 0, including the one selected by the valuation of a1a0. When Din=1, the
valuation of a1a0 sets the appropriate output (anyone from y0, y1, y2, y3) to 1.
Now that we have thoroughly understood the concepts of the demultiplexer, let’s dive directly
into the Verilog code for the demultiplexer.
21
DEMULTIPLEXER
CHAPTER-3
IMPLEMENTATION
1. case statements
2. assignment statements
3. if-else statements
Here we will be elaborating on the first two. Along the way, we would also emphasize some
common design errors.
22
DEMULTIPLEXER
The reg data object holds its value from one procedural assignment statement to the next and
means it holds its value over simulation data cycles.
Another style of declaration in the port list is to declare the port size and port direction after
the module declaration.
[3:0] here signifies that the output is of 4 bits. Next up, since its behavioral modeling style,
here comes the always statement.
always @(Y, A) begin
Using the always statement, a procedural statement in Verilog, we will run the program
sequentially. (Y, A) is known as the sensitivity list or the trigger list. The sensitivity list includes
all input signals used by the always block. It controls when the statements in the always block
are to be evaluated. @ is a part of the syntax, used before the sensitivity list. In Verilog, begin
embarks and end concludes any block which contains more than one statement in it.
Note that the always statement always @(Y, A) could be written as always @ *. * would mean
that the code itself has to decide on the input signals of the sensitivity list.
case (A)
The case statement in Verilog is analogous to switch-case in C language. First, let us see the
general format to write a case statement in Verilog.
23
DEMULTIPLEXER
case (<expression>)
case_item1 : <single statement>
case_item2 : <single statement>
case_item3 : begin
<multiple statements>
end
default : <statement>
endcase
If the expression corresponds to any of the case_item, then those design statements are
executed. Otherwise, the default case is executed. So, now we can write
case (A)
2'b00 : begin
Y[0] = din; Y[3:1] = 0;
end
2'b01 : begin
Y[1] = din; Y[0] = 0;
end
2'b10 : begin
Y[2] = din; Y[1:0] = 0;
end
2'b11 : begin
Y[3] = din; Y[2:0] = 0;
end
endcase
As we see here in the first case, 2'b00 represents the case when the input A is 2'b00. These
cases indicate that, according to the value of A, one of the four statements is selected. The
colon then marks the end of a case item and starts the action that must happen in that particular
case. The terms begin and end are part of the Verilog syntax if you are writing more than one
statement in that block. After this, those statements are mentioned, such as the output port Y[0]
should be attached to the din, Y[3:0] to 0, and so on, according to the truth table.
This modeling is based on the behavior of the circuit; hence it is called behavioral modeling.
Observe that we are not specifying the structure of the circuit, we are only creating the logic of
the circuit which can implement that hardware.
24
DEMULTIPLEXER
We also set up the size and type of the port, which can only be either input, outputs, or inout.
Then we assign the output as the logical and operation of the select lines and data line. assign
is a keyword in which the expression or the signal on the right-hand side is evaluated and
assigned to the expression on the left side.
A[0] means that we are addressing the zeroth bit of the multi-bit bus, similar goes for Y[1], we
are accessing the first bit of Y vector. & stands for and operation, ~ is for not operation.
We give all the possible conditions as per our truth table of the demultiplexer.
This is also behavioral modeling as we are not identifying the circuitry, we are only assigning
the outputs to bitwise and of data and select lines.
endmodule
25
DEMULTIPLEXER
This marks the end of the module. You may view the complete code here.
Here is the Hardware schematic which you may develop using Xilinx for demultiplexer.
26
DEMULTIPLEXER
27
DEMULTIPLEXER
CHAPTER-4
ADVANTAGES & DISADVANTAGES
Advantages & Disadvantages
• The efficiency of the communication system can be improved with the help of the
Multiplexer & Demultiplexer combination
• A demultiplexer separates back the mutual signals into streams.
• Its function is quite opposite to multiplexer
• It can be used as a decoder in the security systems
• The combination of Mux & Demux is used for the transmission of Audio or Video
signals.
28
DEMULTIPLEXER
CHAPTER-5
APPLICATIONS
29
DEMULTIPLEXER
CHAPTER-6
CONCLUSION
A DEMULTIPLEXER (DEMUX) basically reverses the multiplexing function.
It takes data from one line and distributes them to a given number of output
lines. For this reason, the demultiplexers is also known as a data distributor.A
multiplexer takes several inputs and transmits one of them to the output.A
demultiplexer(DEMUX) performs the reverse operation ; it takes a single input
and distributes it over several outputs.
REFERENCE:
30