Nothing Special   »   [go: up one dir, main page]

Unit5 Encoder Decoder

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 31

Design Procedure

Prepared and Delivered By: Pawandeep Kaur


Design Procedure:
BCD to Excess-3 Code Conversion
How many
Design of
inputs and
Truth Table
outputs

Simplification Design the


with K-map circuit

Prepared and Delivered By: Pawandeep Kaur


Encoder
 An encoder is a combinational circuit that performs the inverse operation of a decoder.
 An encoder has (or fewer) input lines and n output lines.
 The output lines, as an aggregate, generate the binary code corresponding to the input value.
1) 4:2 Encoder
2) 8:3 Encoder (Octal to binary)
3) Decimal to BCD Encoder
4) Hexadecimal to Binary Encoder
5) Special :Priority Encoder (not in curriculum)

Prepared and Delivered By: Pawandeep Kaur


Encoder: Example
Qsn: Design an octal to binary encoder?

Prepared and Delivered By: Pawandeep Kaur


Encoder: Example
Qsn: Design an octal to binary encoder?

Prepared and Delivered By: Pawandeep Kaur


Encoder: Example
Qsn: Design an octal to binary encoder?

Prepared and Delivered By: Pawandeep Kaur


QUICK QUIZ (POLL)
How is an encoder different from a decoder?
a) The output of an encoder is a binary code for 1-of-N input
b) The output of a decoder is a binary code for 1-of-N input
c) The output of an encoder is a binary code for N-of-1 output
d) The output of a decoder is a binary code for N-of-1 output

Prepared and Delivered By: Pawandeep Kaur


QUICK QUIZ (POLL)
How is an encoder different from a decoder?
a) The output of an encoder is a binary code for 1-of-N input
b) The output of a decoder is a binary code for 1-of-N input
c) The output of an encoder is a binary code for N-of-1 output
d) The output of a decoder is a binary code for N-of-1 output

An encoder is a combinational circuit encoding the information of 2n input lines to n output lines, thus producing the
binary equivalent of the input. It performs the opposite operation of a decoder which results in 2 n outputs from n
inputs. Thus, an encoder different from a decoder because of the output of an encoder is a binary code for 1-of-N
input.

Prepared and Delivered By: Pawandeep Kaur


QUICK QUIZ (POLL)
1.How many outputs will a decimal-to-BCD encoder have?
a) 4 3.Can an encoder be a transducer?
b) 8 a) Yes
c) 12 b) No
d) 16 c) May or may not be
2.If we record any music in any recorder, such d) Both are not even related slightly
types of process is called ___________
a) Multiplexing
b) Encoding
c) Decoding
d) Demultiplexing

Prepared and Delivered By: Pawandeep Kaur


QUICK QUIZ (POLL)
1.How many outputs will a decimal-to-BCD encoder have?
a) 4 3.Can an encoder be a transducer?
b) 8 a) Yes
c) 12 b) No
d) 16 c) May or may not be
2.If we record any music in any recorder, such d) Both are not even related slightly
types of process is called ___________
a) Multiplexing
b) Encoding
c) Decoding
d) Demultiplexing
If we record any music in any recorder, it means that we are
giving data to a recorder. So, such process is called encoding.
Getting back the music from the recorded data is known as
decoding.
Prepared and Delivered By: Pawandeep Kaur
Limitations of Encoder
 There is an ambiguity, when all outputs of encoder are equal to zero. Because, it could be the
code corresponding to the inputs, when only least significant input is one or when all inputs
are zero.

 If more than one input is active High, then the encoder produces an output, which may not be
the correct code. For example, if both Y3 and Y6 are ‘1’, then the encoder produces 111 at the
output. This is neither equivalent code corresponding to Y3, when it is ‘1’ nor the equivalent
code corresponding to Y6, when it is ‘1’.

 So, to overcome these difficulties, we should assign priorities to each input of encoder. Then,
the output of encoder will be the binary code corresponding to the active High inputs, which
has higher priority. This encoder is called as priority encoder.

Prepared and Delivered By: Pawandeep Kaur


Priority Encoder
 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.

 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 input and V is equal to 0.
 The other two outputs are not inspected when V equals 0 and are specified as don’t-care
conditions.

Prepared and Delivered By: Pawandeep Kaur


Priority Encoder
Designing of 4X2 Priority Encoder

Prepared and Delivered By: Pawandeep Kaur


Priority Encoder
Designing of 4X2 Priority Encoder

Prepared and Delivered By: Pawandeep Kaur


Priority Encoder
Designing of 4X2 Priority Encoder

Prepared and Delivered By: Pawandeep Kaur


Decoder
What is a Decoder?
 A combinational circuit that has ‘n’ input lines and maximum of  output lines.
 One of these outputs will be active High based on the combination of inputs present, when the
decoder is enabled.
 The outputs of the decoder are min terms of ‘n’ input variables lines when it is enabled

Parallel Decoder
BCD to Decimal
BCD to Seven Segment

Prepared and Delivered By: Pawandeep Kaur


2x4 Decoder

Prepared and Delivered By: Pawandeep Kaur


2x4 Decoder

Prepared and Delivered By: Pawandeep Kaur


2x4 Decoder

Therefore, the outputs of 2 to 4 decoder are nothing but


the min terms of two input variables A1 & A0, when enable,
E is equal to one. If enable, E is zero, then all the outputs of
decoder will be equal to zero.
Prepared and Delivered By: Pawandeep Kaur
3x8 Decoder

Prepared and Delivered By: Pawandeep Kaur


Home assignment 3x8 Decoder
E S2 S1 S0 DO D1 D2 D3 D4 D5 D6 D7
0 X X X
1 0 0 0
1 0 0 1
1
1
1
1
1
1

Prepared and Delivered By: Pawandeep Kaur


3x8 Decoder: Active High
Output is represents with high (logic 1)

Prepared and Delivered By: Pawandeep Kaur


3x8 Decoder: Active Low

Prepared and Delivered By: Pawandeep Kaur


Full Adder Design using 3:8 Decoder

74138 IC 3:8 Decoder

Prepared and Delivered By: Pawandeep Kaur


Full Subtractor Design using 3:8 Decoder

Prepared and Delivered By: Pawandeep Kaur


Function Design using 3:8 Decoder
F1=m(1,2,5,7)
F2=m(0,1,3,6)

Prepared and Delivered By: Pawandeep Kaur


Decoder
Tree 3:8 Decoder using 2:4 Decoder
A2 A1 A0 HIGH OUTPUT
0 0 0 Y0
0 0 1 Y1
0 1 0 Y2
0 1 1 Y3
1 0 0 Y4
1 0 1 Y5
1 1 0 Y6
1 1 1 Y7

Prepared and Delivered By: Pawandeep Kaur


3:8 Decoder using 2:4 Decoder
Question :Design 3:8 decoder using 2:4 Decoder Solution

A2 A1 A0 HIGH OUTPUT
0 0 0 Y0
0 0 1 Y1
0 1 0 Y2
0 1 1 Y3
1 0 0 Y4
1 0 1 Y5
1 1 0 Y6
1 1 1 Y7

Prepared and Delivered By: Pawandeep Kaur


4:16 Decoder

A3 Y0

A2

A1
4:16
Decoder
Y15

A0

EN
Prepared and Delivered By: Pawandeep Kaur
4:16 Decoder using 3:8 Decoder

Prepared and Delivered By: Pawandeep Kaur


4:16 Decoder using 2:4 Decoder

Prepared and Delivered By: Pawandeep Kaur

You might also like