MKT2802
Logic Circuits
Department of Mechatronics Engineering
Fall : 2024
4/10/2024 1
Design Procedure for Combinational Circuits
The design of a combinational circuit involves the following steps:
– Specification: How the circuit operates is clearly expressed
– Formulation: Derivation of the truth table or the Boolean equations that
define the relationship between inputs and outputs
– Optimization: Algebraic or K-map optimization of the truth table and draw
the corresponding logic diagram
– Technology Mapping: Tranform the logic diagram to a new diagram using
the available implementation technology
– Verification: Verify the correctness of the final design
4/10/2024 2
Multiplexers
Multiplexers, or muxes, are used to choose between resources
A real-life example: in the old days before networking, several computers
could share one printer through the use of a switch.
4/10/2024 3
Multiplexers
4/10/2024 4
Multiplexers
MUX
4/10/2024 5
Example Uses of Multiplexers
4/10/2024 6
Multiplexer Structure
Switch circuit equivalent
Multiplexer is unidirectional
4/10/2024 7
2x1 Multiplexer
A 2x1 Mux has 2 input lines (D0 & D1) , one select input (S), and one
output line (OUT).
4/10/2024 8
2x1 Multiplexer with Enable
Multiplexers offered by integrated circuit manufacturers most often
have an active low enable input.
4/10/2024 9
2x1 Multiplexer by Three State Buffer
The output of a three-state buffer reflects the input logic level or is isolated from
the input depending on the logic level of the selection signal. A 2-to-1 multiplexer
can thus be implemented by connecting the outputs of two three-state buffers
whose selection signals are complementary, as shown in Figure.
4/10/2024 10
4x1 Multiplexer
A 4x1 Mux has 4 input lines (D0 – D3 ) , a 2-channel select input (S), and one
output line (Y).
4/10/2024 11
4x1 Multiplexer with Enable
A 4x1 Mux has 4 input lines (D0 – D3 ) , a 2-channel select input (S), one
enable input and one output line (Y).
4/10/2024 12
4x1 Multiplexer with Enable
A 4x1 Mux has 4 input lines (D0 – D3 ) , a 2-channel select input (S), one
enable input and one output line (Y).
4/10/2024 13
8x1 Multiplexer with Enable
A 8x1 Mux has 8 input lines (D0 – D7 ) , a 3-channel select input (S), one
enable input and one output line (Y).
4/10/2024 14
8x1 Multiplexer with Enable
4/10/2024 15
Quad 2X1 Mux
Given two 4-bit numbers A and B, design a multiplexer that selects one of these 2
numbers based on some select signal S. Obviously, the output (Y) is a 4-bit number.
A3
A3 I0 Y3
B3 MUX Y A2
I1 Y2
S A1
Y1
A2 I0
A0
Y0
B2 MUX Y
I1 B3
S
A3
B2
A2
A1 I0 A1
B1 MUX Y B1 Y3
I1 A0
S B0
Y
MUX Y2
1
B3 Y0
A0 I0 B2
B0 MUX Y B1
I1 S E
S B0
S E
4/10/2024
S 16
Combinational Circuit Implementation using Muxes
Problem Statement:
Given a function of n-variables, show how to use a MUX to implement this function.
This can be accomplished in one of 2 ways:
Using a Mux with n-select inputs
Using a Mux with n-1 select inputs
Method 1: Using a Mux with n-select inputs
n variables need to be connected to n select inputs. For a MUX with n select inputs,
the output Y is given by:
alternatively
The MUX output expression is a SUM of minterms expression for all minterms (mi)
which have their corresponding inputs (Di) equal to 1.
Thus, it is possible to implement any function of n-variables using a MUX with n-
select inputs by proper assignment of the input values (Di ∈{0 , 1}).
Y(Sn-1 ….. S1S0) = Σ(minterms)
4/10/2024 17
Combinational Circuit Implementation using Muxes
Method 1: Using a Mux with n-select inputs
Example: Implement the function F(x, y) = ∑(0, 1, 3) by assigning 2-variable of the
function as select variable?
Since number of variables n = 2, this requires a Mux with 2 select inputs, i.e.
An 4x1 Mux
F(x, y) = ∑(0, 1, 3)
x y F I0
1
0 0 1 1 I1
MUX Y F
0 1 1 0 I2
1 0 0 1 I3
S1 S0
1 1 1
x y
4/10/2024 18
Combinational Circuit Implementation using Muxes
Method 1: Using a Mux with n-select inputs
Example: Implement the function F (A, B, C) = Σ(1, 3, 5, 6) by assigning 3-variable
of the function as select variable?
Since number of variables n = 3, this requires a Mux with 3 select inputs, i.e.
an 8x1 Mux
F (A,B,C) = Σ(1,3,5,6)
4/10/2024 19
Combinational Circuit Implementation using Muxes
Method 2: Using a Mux with (n-1) select inputs
Any n-variable logic function can be implemented using a Mux with only (n-1) select
inputs (e.g 4-to-1 mux to implement any 3 variable function)
This can be accomplished as follows:
Express function in canonical sum-of-minterms form.
Choose n-1 variables to be connected to the mux select lines.
Construct the truth table of the function, but grouping the n-1 select input variables
together (e.g. by making the n-1 select variables as most significant inputs).
The values of Di (mux input line) will be 0, or 1, or nth variable or complement of nth
variable of value of function F, as will be clarified by the following example.
4/10/2024 20
Combinational Circuit Implementation using Muxes
Method 2: Using a Mux with (n-1) select inputs
Example: Implement the function F(x, y, z) = ∑(1, 2, 6, 7) by assigning A and B as
the select input for a 4x1 mux.
x and y are applied to the select line, that is
x ⇒ S1, y ⇒ S0
x y z F
0 0 0 0 z I0
0 0 1 1 F=z z I1 F
MUX Y
0 1 0 1 0 I2
0 1 1 0 F=z 1 I3
S1 S0
1 0 0 0
F=0 x y
1 0 1 0
1 1 0 1
F=1
1 1 1 1
4/10/2024 21
Combinational Circuit Implementation using Muxes
Method 2: Using a Mux with (n-1) select inputs
Example: Implement the function F(A,B,C,D)=Σ(1,3,4,11,12,13,14,15) by assigning
A, B and C as the select input for a 8x1 mux.
A, B and C are applied to the select line, that is
A ⇒ S2 , B ⇒ S1, C ⇒ S0
A B C D F
0 0 0 0 0 D I0
0 0 0 1 1 F=D
0 0 1 0 0
D I1
F=D I2
0 0 1 1 1 D
0 1 0 0 1
F=D 0 I3
0 1 0 1 0
MUX Y F
0 1 1 0 0
F=0
0 I4
0 1 1 1 0
1 0 0 0 0
D I5
1 0 0 1 0 F=0 1 I6
1 0 1 0 0
1 0 1 1 1 F=D 1 I7
1 1 0 0 1 S2 S1 S0
F=1
1 1 0 1 1
1 1 1 0 1
1 1 1 1 1
F=1 A B C
4/10/2024 22
Combinational Circuit Implementation using Muxes
Example: Design a 8x1 mux by using two 4x1 muxes and one 2x1 mux
I0 I0
I1 I1
MUX Y
I2 I2
I3 I3
S1 S0 I0
I1 MUX Y Y
I0 S
I4
I5 I1
MUX Y
I6 I2
I7 I3
S1 S0
1 0 0
S2 S1 S0
4/10/2024 23
Multiplexer IC
74151 IC is a high speed 8-input digital multiplexer
4/10/2024 24
Multiplexer IC
74151 IC is a high speed 8-input digital multiplexer
4/10/2024 25
Multiplexer IC
74153 IC is a dual 1x4 line data selector or multiplexer
4/10/2024 26
Multiplexer IC
74153 IC is a dual 1x4 line data selector or multiplexer
4/10/2024 27
Demultiplexers
A demultiplexer (DMUX) is a logic circuit that
switches a data input toward one of the
outputs depending on the selection code.
The demultiplexer is a combinational
logic circuit that performs the reverse
operation of multiplexer (Several output
lines, one input line).
4/10/2024 28
1x2 Demultiplexer
The 1 x 2 demultiplexer is characterized by
the following equations:
Three state buffer
implementation
4/10/2024 29
1x4 Demultiplexer
The 1 x 4 demultiplexer is characterized by the following equations:
4/10/2024 30
1x8 Demultiplexer
The 1 x 8 demultiplexer is characterized by the following equations:
4/10/2024 31
1x8 Demultiplexer
4/10/2024 32
Demultiplexer Application
The circuit above illustrates how to provide digitally controlled adjustable/variable
op-amp gain using a demultiplexer. The voltage gain of the inverting operational
amplifier is dependent upon the ratio between the input resistor, RIN and its
feedback resistor, Rƒ as determined in the Op-amp tutorials.
The digitally controlled analogue switches of the demultiplexer select an input
resistor to vary the value of Rin. The combination of these resistors will determine
the overall voltage gain of the amplifier, (Av). Then the voltage gain of the
inverting operational amplifier can be adjusted digitally simply by selecting the
appropriate input resistor combination.
4/10/2024 33
Demux IC
74138 can used as DeMUX and decoder
4/10/2024 34
Demux IC
74138 can used as DeMUX and decoder
4/10/2024 35
Demux IC
74139 can used as DeMUX and decoder
4/10/2024 36
Demux IC
74139 can used as DeMUX and decoder
4/10/2024 37
Any Comment or Question???
4/10/2024 38