Encoders in DD PDF
Encoders in DD PDF
Encoders are combinational circuits that convert binary information from multiple input lines into
a smaller number of output lines. They take 2n input lines and produce an n-bit output code.
Essentially, encoders perform the opposite function of decoders. For simplicity, only one input
line is active at any given time, and the output is an n-bit code that corresponds to the active
input line.
(2n input lines and n output lines, if input lines are 4, output lines will be 2 and if input lines are 8,
output lines will be 3 and so on..)
4 to 2 line Encoder:
In 4 to 2 line encoder, there are total of four inputs, i.e., Y0, Y1, Y2, and Y3, and two outputs,
i.e., A0 and A1. In 4-input lines, one input-line is set to true at a time to get the respective binary
code in the output side. Below are the block diagram and the truth table of the 4 to 2 line
encoder.
Truth Table:
Y3 Y2 Y1 Y0 A1 A0
0 0 0 1 0 0
0 0 1 0 0 1
0 1 0 0 1 0
1 0 0 0 1 1
(To remember the table, fill the output column with the combinations 00,01,10,11) and for
outputs fill 1’s at the diagonals from the right side.) Green represents output and other color
represents input.
The logical circuit of the above expressions is given below: (OR gate will be used as the
expressions have the ‘+’ sign)
8 to 3 line Encoder:
The 8 to 3-line Encoder is also known as Octal to Binary Encoder. In 8 to 3 line encoder, there is
a total of eight inputs, i.e., Y0, Y1, Y2, Y3, Y4, Y5, Y6, and Y7 and three outputs, i.e., A0, A1,
and A2. In 8-input lines, one input-line is set to true at a time to get the respective binary code in
the output side. Below are the block diagram and the truth table of the 8 to 3 line encoder.
Block Diagram:
Truth Table:
Y7,y6,y5,y4,y3,y2,y1,y0 are inputs and a2,a1,a0 are inputs. Diagonals are filled with 1’s starting
from y0.
The logical expression of the term A0, A1, and A2 are as follows:
The Octal to Binary Encoder is also known as 10 to 4 line Encoder. In 10 to 4 line encoder, there
are total of ten inputs, i.e., Y0, Y1, Y2, Y3, Y4, Y5, Y6, Y7, Y8, and Y9 and four outputs, i.e., A0,
A1, A2, and A3. In 10-input lines, one input-line is set to true at a time to get the respective BCD
code in the output side. The block diagram and the truth table of the decimal to BCD encoder
are given below.
Block Diagram:
Truth Table:
The logical expression of the term A0, A1, A2, and A3 is as follows:
A3 = Y9 + Y8
A2 = Y7 + Y6 + Y5 +Y4
A1 = Y7 + Y6 + Y3 +Y2
A0 = Y9 + Y7 +Y5 +Y3 + Y1
Priority Encoders:
A priority encoder is a type of encoder circuit that includes a prioritization function. When
multiple inputs are active simultaneously, the priority encoder outputs the binary code
corresponding to the highest-priority active input. The priority is typically assigned based on the
input lines, with the highest-numbered input having the highest priority.
In this priority encoder, there are total of 4 inputs, i.e., Y0, Y1, Y2, and Y3, and two outputs, i.e.,
A0 and A1. The Y3 has high and Y0 has low priority inputs. When more than one input is '1' at
the same time, the output will be the (binary) code corresponding to the higher priority input.
Truth Table: