SLIDESMANIA.COM
SLIDESMANIA.COM
What is Encoder?
• Combinational circuit
• Performs the reverse operation of
Decoder
• Maximum of 2𝑛 input lines and 𝑛
output lines
ENCODER
2
𝑛
INPUTS
𝑛
OUTPUTS
SLIDESMANIA.COM
Generates an output based on the
highest prioritized input
Binary Priority
Converts one of 2𝑛
inputs into an
𝑛 bit output
SLIDESMANIA.COM
4 – 2 Encoder
4 inputs: 𝒀𝟑, 𝒀𝟐, 𝒀𝟏, 𝒀𝟎
2 outputs: 𝑨𝟏, 𝑨𝟎
4 - 2
ENCODER
𝒀𝟑
𝒀𝟏
𝑨𝟏
𝒀𝟎
𝒀𝟐
𝑨𝟎
Block diagram
SLIDESMANIA.COM
4 – 2 Encoder
4 inputs: 𝒀𝟑, 𝒀𝟐, 𝒀𝟏, 𝒀𝟎
2 outputs: 𝑨𝟏, 𝑨𝟎
4 - 2
ENCODER
0
1
0
0
0
1
Block diagram
SLIDESMANIA.COM
INPUTS OUTPUTS
𝑌3 𝑌2 𝑌1 𝑌0 𝐴1 𝐴0
0 0 0 1 0 0
0 0 1 0 0 1
0 1 0 0 1 0
1 0 0 0 1 1
4 – 2 Encoder Truth Table
SLIDESMANIA.COM
INPUTS OUTPUTS
𝑌3 𝑌2 𝑌1 𝑌0 𝐴1 𝐴0
0 0 0 1 0 0
0 0 1 0 0 1
0 1 0 0 1 0
1 0 0 0 1 1
4 – 2 Encoder Truth Table
𝐴1 = 𝑌3 + 𝑌2
SLIDESMANIA.COM
INPUTS OUTPUTS
𝑌3 𝑌2 𝑌1 𝑌0 𝐴1 𝐴0
0 0 0 1 0 0
0 0 1 0 0 1
0 1 0 0 1 0
1 0 0 0 1 1
4 – 2 Encoder Truth Table
𝐴0 = 𝑌3 + 𝑌1
SLIDESMANIA.COM
Boolean functions
𝐴1 = 𝑌3 + 𝑌2
𝐴0 = 𝑌3 + 𝑌1
Circuit diagram
SLIDESMANIA.COM
8 – 3 Encoder
8 inputs:
𝒀𝟕, 𝒀𝟔, 𝒀𝟓, 𝒀𝟒, 𝒀𝟑, 𝒀𝟐, 𝒀𝟏,
𝒀𝟎
3 outputs: 𝑨𝟐, 𝑨𝟏, 𝑨𝟎
𝒀𝟕
𝒀𝟓
𝑨𝟐
𝒀𝟒
𝒀𝟔
𝑨𝟏
Block diagram
𝒀𝟑
𝒀𝟐
𝒀𝟏
𝒀𝟎
4 - 2
ENCODER
𝑨𝟎
8 - 3
ENCODER
SLIDESMANIA.COM
8 – 3 Encoder
8 inputs:
𝒀𝟕, 𝒀𝟔, 𝒀𝟓, 𝒀𝟒, 𝒀𝟑, 𝒀𝟐, 𝒀𝟏,
𝒀𝟎
3 outputs: 𝑨𝟐, 𝑨𝟏, 𝑨𝟎
0
0
0
0
0
0
Block diagram
0
0
1
0
4 - 2
ENCODER
1
8 - 3
ENCODER
SLIDESMANIA.COM
8 – 3 Encoder Truth Table
INPUTS OUTPUTS
𝑌7 𝑌6 𝑌5 𝑌4 𝑌3 𝑌2 𝑌1 𝑌0 𝐴3 𝐴2 𝐴0
0 0 0 0 0 0 0 1 0 0 0
0 0 0 0 0 0 1 0 0 0 1
0 0 0 0 0 1 0 0 0 1 0
0 0 0 0 1 0 0 0 0 1 1
0 0 0 1 0 0 0 0 1 0 0
0 0 1 0 0 0 0 0 1 0 1
0 1 0 0 0 0 0 0 1 1 0
1 0 0 0 0 0 0 0 1 1 1
SLIDESMANIA.COM
Boolean functions
𝐴2 = 𝑌7 + 𝑌6 + 𝑌5 + 𝑌4
𝐴1 = 𝑌7 + 𝑌6 + 𝑌3 + 𝑌2
Circuit diagram
SLIDESMANIA.COM
Drawbacks of Encoder
• When all outputs of encoder are equal to zero.
• If more than one input is active High, then the
encoder produces an output, which may not be the
correct code.
SLIDESMANIA.COM
SLIDESMANIA.COM
4 – 2 Priority Encoder Truth Table
INPUTS OUTPUTS
Y3 Y2 Y1 Y0 A1 A0 V
0 0 0 0 0 0 0
0 0 0 1 0 0 1
0 0 1 X 1 0 1
0 1 X X 0 1 1
1 X X X 1 1 1
X equals “dont care”, that is it can be at a logic “0”
level or at a logic “1” level
SLIDESMANIA.COM
4 – 3 Priority Encoder
INPUTS OUTPUTS
Y3 Y2 Y1 Y0 A1 A0 V
0 0 0 0 0 0 0
0 0 0 1 0 0 1
0 0 1 X 1 0 1
0 1 X X 0 1 1
1 X X X 1 1 1
Lowest priority
Highest priority
To check the
output is valid or
not
SLIDESMANIA.COM
4 variable K-maps
Boolean functions
A1 = Y3 + Y2
A0 = Y3 + Y2’Y1
Boolean function of output, V V = Y3 + Y2 + Y1 + Y0
SLIDESMANIA.COM
SLIDESMANIA.COM
Reference:
https://www.tutorialspoint.com/digital_circuits/digital_circuits_encoders.htm
https://www.geeksforgeeks.org/encoder-in-digital-logic/
https://www.electronics-tutorials.ws/combination/comb_4.html
https://www.electronics-tutorials.ws/combination/comb_4.html
Digital design by Morris Mano and Michael D.Ciletti

Encoder