0% found this document useful (0 votes)
11 views8 pages

Understanding Digital Encoders in Logic

An Encoder is a combinational circuit that converts 2^n input lines into an n-bit binary code, with various types including 4 to 2, Octal to Binary, Decimal to BCD, and Priority Encoders. Each type has specific input-output configurations and logical expressions for encoding. Priority Encoders address potential ambiguities by assigning priority to inputs, ensuring the output corresponds to the highest priority active input.

Uploaded by

Purnendu Bhowmik
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views8 pages

Understanding Digital Encoders in Logic

An Encoder is a combinational circuit that converts 2^n input lines into an n-bit binary code, with various types including 4 to 2, Octal to Binary, Decimal to BCD, and Priority Encoders. Each type has specific input-output configurations and logical expressions for encoding. Priority Encoders address potential ambiguities by assigning priority to inputs, ensuring the output corresponds to the highest priority active input.

Uploaded by

Purnendu Bhowmik
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Encoder

An Encoder is a combinational circuit that performs the reverse operation of a Decoder. It


has a maximum of 2^n input lines and ‘n’ output lines, hence it encodes the information
from 2^n inputs into an n-bit code. It will produce a binary code equivalent to the input,
which is active High. Therefore, the encoder encodes 2^n input lines with ‘n’ bits.

Types of Encoders

There are different types of Encoders which are mentioned below.

• 4 to 2 Encoder

• Octal to Binary Encoder (8 to 3 Encoder)

• Decimal to BCD Encoder

• Priority Encoder

4 to 2 Encoder
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’ to get the respective binary code at the
output. The figure below shows the logic symbol of the 4 to 2 encoder.
The Truth table of 4 to 2 encoders is as follows.

Logical expressions for A1 and A0:

A1 = Y3 + Y2
A0 = Y3 + Y1

Octal to Binary Encoder (8 to 3 Encoder)

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 value and three outputs
generate corresponding binary code. The figure below shows the logic symbol of octal to
the binary encoder.
The truth table for the 8 to 3 encoder is as follows.

Logical expression for A2, A1, and A0.

A2 = Y7 + Y6 + Y5 + Y4
A1 = Y7 + Y6 + Y3 + Y2
A0 = Y7 + Y5 + Y3 + Y1
Decimal to BCD Encoder
The decimal-to-binary encoder usually consists of 10 input lines and 4 output lines. Each
input line corresponds to 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. The figure below shows the logic symbol of
the decimal to BCD encoder :
The truth table:

Logical expression for A3, A2, A1, and A0.

A3 = Y9 + Y8
A2 = Y7 + Y6 + Y5 +Y4
A1 = Y7 + Y6 + Y3 +Y2
A0 = Y9 + Y7 +Y5 +Y3 + Y1
There are some errors that usually happen in Encoders are mentioned below.

• There is an ambiguity, when all outputs of the 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.

So, to overcome these difficulties, we should assign priorities to each input of the encoder.
Then, the output of the encoder will be the code corresponding to the active high inputs,
which have higher priority.
Priority Encoder

A 4 to 2 priority encoder has 4 inputs: Y3, Y2, Y1 & Y0, and 2 outputs: A1 & A0. Here, the
input, Y3 has the highest priority, whereas the input, Y0 has the lowest priority. In this
case, even if more than one input is ‘1’ at the same time, the output will be the (binary)
code corresponding to the input, which is having higher priority. The truth table for the
priority encoder is as follows.

The logical expression for A1 is shown below.


The Logical Expression for A0 is shown below.

You might also like