EEE3116_ch03
EEE3116_ch03
Microprocessor Fundamentals
2023/10/10 p.1
Logic Circuits – Combinational vs Sequential
Logic circuits can be categorized into 2 major classes:
Combinational Logic Circuits
2023/10/10 p.2
Logic Circuits – Combinational vs Sequential
Sequential Logic Circuits
consists of Combinational logic circuit and storage
devices
the output is a function of both current inputs and
present state
the inputs can be from external or internal feedback
2023/10/10 p.3
Components of Combinational Circuits
Combinational Circuit
A logic circuit whose output or outputs are determined
Encoder 編碼器
Multiplexer 多路器
De-multiplexer 多路分配器
2023/10/10 p.4
Combinational Circuits - Decoder
Consider the following example:
MSB A
B Basic
Decoder F
C
LSB D
2023/10/10 p.5
Combinational Circuits - Decoder
a logic circuit that converts N-bit binary input code (2N
combinations) into M (= 2N) output lines such that each
line will be activated for only one of the possible
combinations of inputs
only 1-out-of-M output lines I0 Y0
will be active at a time I1
Y1
Y2
: :
: :
: : Decoder
N-bit code : :
: :
: :
IN-1 YM-1
N input line to generate 2n output line
EN
2023/10/10 p.7
74LS138
2023/10/10 p.9
Combinational Circuits - Encoder
a number of input lines, only one of which is activated at
a given time, and produces an N-bit output code,
depending on which input is activated
If there are M input lines,
the number of output line I0 Y0
N >= log2M I1
Y1
Y2
: :
: : N-bit code
: : Encoder
: :
: :
: :
IM-1 YN-1
EN
2023/10/10 p.10
Combinational Circuits - Encoder
a number of input lines, only one of which is activated at
a given time, and produces an N-bit output code,
depending on which input is activated
If there are M input lines,
the number of output line I0 Y0
N >= log2M I1
Y1
Y2
: :
: : N-bit code
: : Encoder
: :
: :
: :
IM-1 YN-1
EN
2023/10/10 p.11
Combinational Circuits - Encoder 8-to-3
Encoder
A0
Example: 8-to-3 Encoder A1
Binary Coded Decimal (BCD) A2
Q0 LSB
A3
Q1
A4
A5 Q2 MSB
A6
A7
2023/10/10 p.12
Combinational Circuits - Multiplexer
also called data selector
behaves like an electronic switch
D0
Data D1
Channels Output
D2
D3
Selection S1
Inputs S0
D0
Data D1
4:1
Channels Y Output
MUX
D2
D3
S1 S0
Selection
Inputs
2023/10/10 p.14
Combinational Circuits – Multiplexer (MUX)
Example:
1 I0
C I1 4:1
Y F
I2 MUX
0 I3
S1 S0
A
B Fig 1
2023/10/10 p.15
Solution:
2023/10/10 p.16
Combinational Circuits – De-Multiplexer (DeMUX)
Connect a single input line to one of the output lines
Reverse the multiplexing process
Y0
One to many circuit
Multiplexed Y1
Input Y2
Y3
Selection S1
Inputs S0
2023/10/10 p.17
Demultiplexer
using an 8 : 1 multiplexer.
2023/10/10 p.20
Ii
I0 =
I1 =
I2 =
I3 =
I4 =
I5 =
I6 =
I7 =
2023/10/10 p.21
F(A, B, C, D) = A’C’ + A’B + BC’D’ + AB’CD’
A=0, C=0 A=1, B=0, C=1, D=0
Input Output
A B C D F Ii
0 0 0 0 1 I0 =
0 0 0 1 1
0 0 1 0 0 I1=
0 0 1 1 0
0 1 0 0 1 I2=
0 1 0 1 1
0 1 1 0 1 I3=
0 1 1 1 1
1 0 0 0 0 I4=
1 0 0 1 0
1 0 1 0 1 I5=
1 0 1 1 0
1 1 0 0 1 I6=
1 1 0 1 0
1 1 1 0 0 I7=
1 1 1 1 0
2023/10/10 p.22
Solution:
I0
I1
I2
I3 8:1 Y F
I4 MUX
I5
I6
I7
S2 S1 S0
A
B
C
2023/10/10 p.23
Applications of Combinational Circuits
Example:
A B C
Low-level
Alarm Indicator
Processing
ALM
Logic
2023/10/10 p.25
Applications of Combinational Circuits
Example:
2023/10/10 p.26
Applications of Combinational Circuits
Implement using the following 3 to 8 decoder
2023/10/10 p.27
Q&A
End-of-Chapter 03
2023/10/10 p.28