Encoding
An Encoder is a combinational circuit that performs
the reverse operation of Decoder.
Circuits that perform encoding are called encoders
An encoder has 2n (or fewer) input lines and n output
lines which generate the binary code corresponding to
the input values
It will produce a binary code equivalent to the input,
which is active High.
Chapter 4 1
Encoder Example
A decimal-to-BCD encoder
• Inputs: 10 bits corresponding to decimal
digits 0 through 9, (D0, …, D9)
• Outputs: 4 bits with BCD codes
• Function: If input bit Di is a 1, then the
output (A3, A2, A1, A0) is the BCD code for i,
The truth table could be formed, but
alternatively, the equations for each of the
four outputs can be obtained directly.
Chapter 4 2
Example
The 4 to 2 Encoder consists of four inputs Y3, Y2, Y1 &
Y0 and two outputs A1 & A0.
At any time, only one of these 4 inputs can be ‘1’ in
order to get the respective binary code at the output.
Chapter 4 3
A1 = Y3 + Y2
A0 = Y3 + Y1
Chapter 4 4
A1 = Y3 + Y2
A0 = Y3 + Y1
Chapter 4 5
Example ( 8 x 3 Encoder: Octal to Binary)
The 8 to 3 Encoder or octal to Binary encoder consists of
8 inputs (Y7 to Y0) and .
3 outputs : A2, A1 & A0
Each input line corresponds to each octal digit and three
outputs generate corresponding binary code.
Chapter 4 6
Chapter 4 7
Chapter 4 8
Chapter 4 9
Decimal to BCD Encoder
The decimal to binary encoder usually consists
of 10 input lines and 4 output lines.
Each input line corresponds to the each decimal
digit and 4 outputs correspond to the BCD
code.
This encoder accepts the decoded decimal data as an
input and encodes it to the BCD output which is
available on the output lines.
Chapter 4 10
Chapter 4 11
Chapter 4 12
Chapter 4 13