EECE 303 - Digital Electronics
Decoders and Encoders
Week 6
Jawad M. Rubayat Dhrubo
Lecturer
Dept. of EECE
Decoders
A decoder is a digital circuit that detects the presence of a specified
combination of bits (code) on its inputs and indicates the presence of that
code by a specified output level.
In its general form, a decoder has n input lines to handle n bits and from
one to 2n output lines to indicate the presence of one or more n-bit
combinations.
The decoders presented here are called n-to-m-line decoders, where
m ≤ 2𝑛 . Their purpose is to generate the 2𝑛 (or fewer) minterms of n
input variables. The name decoder is also used in conjunction with other
code converters, such as a BCD-to-seven-segment decoder
Decoders
A particular application of this decoder is
binary-to-octal conversion
Decoders
A decoder with enable input can function as a Demultiplexer
Decoders
The output whose value is equal
to 0 represents the minterm
selected by inputs A and B
The decoder is enabled when E is equal to 0 (i.e., active-low enable).
Decoders
Decoders
Encoders
• An encoder is a combinational logic circuit that essentially
performs a “reverse” decoder function.
• An encoder accepts an active level on one of its inputs
representing a digit, such as a decimal or octal digit, and
converts it to a coded output, such as BCD or binary.
• Encoders can also be devised to encode various symbols and
alphabetic characters. The process of converting from familiar
symbols or numbers to a coded format is called encoding.
Encoders
The Decimal-to-BCD Encoder
Encoders
Priority Encoders
• A priority encoder is an encoder 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.
• The input having the highest priority will take precedence.
Priority Encoders
• The truth table of a 4-input priority encoder is
given here.
• 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 1 when
one or more inputs are equal to 1.
• If all inputs are 0, there is no valid V is equal to 0.
Note that whereas X’s in output columns represents don’t care conditions, the X’s in the input columns
are useful for representing a truth table as condensed form.
Instead of listing all 16 minterms of four variables. the truth table uses an X to represent either 1 or 0 For
example.
XI00 represent the two mintems 0100 and 1100.
Priority Encoders
Priority Encoders