0% found this document useful (0 votes)
6 views34 pages

Unit2 - Combinational Circuits Part 2

The document discusses decoders and encoders, explaining their functions and providing examples of different types such as 2 to 4 line, 3 to 8 line, and 4 to 16 line decoders, as well as 4 to 2 and 8 to 3 encoders. It highlights the ambiguities in simple encoders and introduces the concept of priority encoders, which resolve these issues by prioritizing active inputs. Additionally, it mentions code converters like BCD to Excess-3 and Binary to Gray code converters.
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)
6 views34 pages

Unit2 - Combinational Circuits Part 2

The document discusses decoders and encoders, explaining their functions and providing examples of different types such as 2 to 4 line, 3 to 8 line, and 4 to 16 line decoders, as well as 4 to 2 and 8 to 3 encoders. It highlights the ambiguities in simple encoders and introduces the concept of priority encoders, which resolve these issues by prioritizing active inputs. Additionally, it mentions code converters like BCD to Excess-3 and Binary to Gray code converters.
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
You are on page 1/ 34

Decoders,Encoders And Priority

Encoders Code Converters


Decoder
• The combinational circuit that change the binary information into
2N output lines is known as Decoders. The binary information is
passed in the form of N input lines. The output lines define the 2N-bit
code for the binary information. In simple words,
the Decoder performs the reverse operation of the Encoder. At a
time, only one input line is activated for simplicity. The produced
2N-bit output code is equivalent to the binary information.
2 to 4 line decoder
• In the 2 to 4 line decoder, there is a total of three inputs, i.e., A0, and
A1 and E and four outputs, i.e., Y0, Y1, Y2, and Y3. For each combination
of inputs, when the enable 'E' is set to 1, one of these four outputs will
be 1. The block diagram and the truth table of the 2 to 4 line decoder
are given below
• Y3=E.A1.A0
Y2=E.A1.A0'
Y1=E.A1'.A0
Y0=E.A1'.A0'
3 to 8 line decoder:
• The 3 to 8 line decoder is also known as Binary to Octal Decoder. In a
3 to 8 line decoder, there is a total of eight outputs, i.e., Y 0, Y1, Y2, Y3,
Y4, Y5, Y6, and Y7 and three outputs, i.e., A0, A1, and A2. This circuit has
an enable input 'E'. Just like 2 to 4 line decoder, when enable 'E' is set
to 1, one of these four outputs will be 1. The block diagram and the
truth table of the 3 to 8 line encoder are given below.
4 to 16 line Decoder
• In the 4 to 16 line decoder, there is a total of 16 outputs,
i.e., Y0, Y1, Y2,……, Y16 and four inputs, i.e., A0, A1, A2, and
A3. The 3 to 16 line decoder can be constructed using either
2 to 4 decoder or 3 to 8 decoder. There is the following
formula used to find the required number of lower-order
decoders.
Encoder
• An Encoder is a combinational circuit that performs the
reverse operation of Decoder.It has 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.
4 : 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’ in order to get the respective binary code at
the output. The figure below shows the logic symbol of 4 to 2
encoder
• A1 = Y3 + Y2
• A0 = Y3 + Y1
8 : 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.
AMBIGUITY IN ENCODER

There are two ambiguities associated with the design of a simple encoder:
⚫ 1. Only one input can be active at any given time. If two inputs are
active simultaneously, the output produces an undefined combination

for example,
If D3 and D6 are 1 simultaneously, the output of the encoder will be
111.To avoid this we go for priority encoder

⚫ 2. An output with all 0's can be generated when all the


inputs are 0's,or when D0 is equal to 1.
Priority encoder
Apriority encoder is an enccder circuit that includes the
priority function. The operation of the priority encoder is such
that if two or more inputs are equal to 1 at the same time, then
the input having the highest priority will take precedence.

In addition to the two outputs x and y ,


the circuit has a third output designated
by V ; this is a valid bit indicator that is
set to one when one or more inputs are
equal to one. If all th e inputs are 0 there
is no valid input hence V is equal to 0.
Implement full subtractor using Demultiplexer
Code Converters
• BCD to Excess-3 code converter
• Binary to Gray code converter
Binary to gray code

You might also like