Combinational Circuits
By : Ali Mustafa
Multiplexer
• Also called Data selector
• A digital circuit which selects one of the n data inputs and route it to the single output.
• Select lines (n) and Input lines are (2n)
Multiplexer
• E is enable input
– Useful for cascading
– Its a active low terminal
– It will perform the required operation when it is low
• Multiplexer acts like a multiple way switch
• The output get connected to only one of the n data inputs at given instant of time
Necessity of Multiplexer
• In most of the digital circuits, data is available on more than 1 line
• It is essential to route this data over a single line
• It reduces the number of wires,complexity,cost
Classification of Multiplexer
2:1 multiplexer
4:1 multiplexer
8:1 multiplexer
16:1 multiplexer
2 : 1 Multiplexer
• Data inputs are 2 (D0,D1)
• Select input is 1 (S) Enable S Output
0 X
1 0 D0
1 1 D1
ES’D0
ESD1
AND
AND
OR
S S’ D1 D0
AND
E
OUTPUT
S’D0
SD1
4 : 1 Multiplexer
• Data inputs are 4 (I0 - I3)
• Select input are 2 (S1 , S2)
8 : 1 Multiplexer
• Data inputs are 8 (D0 – D7)
• Select input are 3 (S1 , S2 ,S3)
• Make Truth Table
– S1’S2’S3’D0 - S1S2S3D7
8:1 MUX Output
D0
D7
E
S1 S2 S3
16 : 1 Multiplexer
Home Task
Cascading of Multiplexers
• Obtain 8:1 MUX using 4:1 MUXES
4:1 MUX
Output
D0
D3
S1 S2
4:1 MUX
E
D4
D7
Cascading of Multiplexers
• Obtain 16:1 MUX using 8:1 MUXES
• Obtain 4:1 MUX using 2:1 MUXES
Home Task
• Obtain 16:1 MUX using 4:1 MUXES
multiplexer demultiplexer 4x4 switch
control control
Making Connections
• Direct point-to-point connections between gates– Wires we've seen so far
• Route one of many inputs to a single output --- multiplexer
• Route a single input to one of many outputs --- demultiplexer
NAND Gate Implementation of Muxes
• 2:1 mux
• 4:1 mux
CA B
0
1
2
3
4
5
6
7
1
0
1
0
0
0
1
1S2
8:1 MUX
S1 S0
F
Multiplexers as General-purpose Logic
• 2n:1 multiplexer implements any function of n variables– With the variables used as control inputs and
– Data inputs tied to 0 or 1
– In essence, a lookup table
• Example:– F(A,B,C) = m0 + m2 + m6 + m7
= A'B'C' + A'BC' + ABC' + ABC= A'B'(C') + A'B(C') + AB'(0) + AB(1)
A B C F
0 0 0 1
0 0 1 0
0 1 0 1
0 1 1 0
1 0 0 0
1 0 1 0
1 1 0 1
1 1 1 1
C'
C'
0
1 A B
S1 S0
F0
1
2
3
4:1 MUX
C'
C'
0
1
F
CA B
0
1
2
3
4
5
6
7
1
0
1
0
0
0
1
1S2
8:1 MUX
S1 S0
Multiplexers as General-purpose Logic
• 2n-1:1 mux can implement any function of n variables
– With n-1 variables used as control inputs and
– Data inputs tied to the last variable or its complement
• Example:
– F(A,B,C) = m0 + m2 + m6 + m7= A'B'C' + A'BC' + ABC' + ABC= A'B'(C') + A'B(C') + AB'(0) + AB(1)
Example• Implement the following expression using 8:1
MUX
F (a,b,c) = m (0,2,4,6)
8:1MUX
0
2
4
6
Logic 1
Logic 0a b c
Output
Self Task
• Implement the following expression using 8:1 MUX
–F (a,b,c) = m (1,3,4,6)
–F (a,b,c) = m (1,3,4,6) + d (2)
Decrementation in MUX
D0 D1 D2 D3 D4 D5 D6 D7
a’ 0 1 2 3 4 5 6 7
a 8 9 10 11 12 13 14 15
D0 D1 D2 D3
a’ 0 1 2 3
a 4 5 6 7
a’ a 1 0
a’ 1 0 a a’ 0 1 a
8 Inputs reduces to 4.
8:1 – 4:1
16 Inputs reduces to 8.
16:1 – 8:1
Example• Implement the logic function using 4:1 MUX
F (a,b,c) = ∑m (1,3,4,6)
8:1MUX
0
2
4
6
Logic 0abc
Output
Logic 1D0 D1 D2 D3
a’ 0 1 2 3
a 4 5 6 7
a a’ a a’
4:1MUX
bc
Output
a a’
Solve This
• F(a,b,c) = m0 + m2 + m6 + m7 using 4:1 MUX
• F (a,b,c,d) = ∑m (2,4,5,7,10,14) using 8:1 MUX
• F (a,b,c,d,e) = ∑m (2,4,5,7,10,14,15,17,25,26,30,31)
using 16:1 MUX