Uploaded by NEELAM HAROON

Decoder and Encoder

advertisement
NAME: FAISAL HAROON
CLASS: BSSE 1ST YEAR
ROLL NO: 14
COURSE: COMPUTER LOGIC DESIGN AND ORGANIZATION
TOPIC: DECODER AND ENCODER
TRUTH TABLE OF DECODER:
E
0
1
1
1
1
1
1
1
1
S0
X
0
0
0
0
1
1
1
1
S1
X
0
0
1
1
0
0
1
1
S3
X
0
1
0
1
0
1
0
1
D0
0
1
0
0
0
0
0
0
0
D1
0
0
1
0
0
0
0
0
0
D2
0
0
0
1
0
0
0
0
0
D3
0
0
0
0
1
0
0
0
0
D4
0
0
0
0
0
1
0
0
0
D5
0
0
0
0
0
0
1
0
0
D6
0
0
0
0
0
0
0
1
0
D7
0
0
0
0
0
0
0
0
1
CONCLUSION OF DECODER:
Decoders are simply a collection of logic gates which
are arranged or managed in a definite way so as to breakdown any combination
of inputs to a set of terms that are all set to '0' apart from one term. Therefore
when one input changes, two output terms will change. Note that these terms
are "minterms", remembering that minterms use a variable once, and once
only. A Decoder is a combinational circuit that changes a code into a set of
signals. It is called Decoder because it does the reverse of Encoding. It takes ‘n’
input lines and yield 2n output lines. One of these outputs will be active High
based on the combination of inputs present, when the decoder is enabled. A
decoder typically has an additional input called Enable. Output is only generated
when the Enable input has value one; otherwise, all outputs are zero.
TRUTH TABLE OF ENCODER:
Y7
0
0
0
0
0
0
0
1
y6
0
0
0
0
0
0
1
0
Y5
0
0
0
0
0
1
0
0
y4
0
0
0
0
1
0
0
0
Y3
0
0
0
1
0
0
0
0
Y2
0
0
1
0
0
0
0
0
Y1
0
1
0
0
0
0
0
0
Y0
1
0
0
0
0
0
0
0
A2
0
0
0
0
1
1
1
1
A1
0
0
1
1
0
0
1
1
A0
0
1
0
1
0
1
0
1
CONCLUSION OF ENCODER:
An Encoder is a combinational circuit that performs the
reverse operation of Decoder. It has maximum of 2n input lines and ‘n’ output
lines. It will produce a binary code equivalent to the input, which is active High.
Therefore, the encoder encodes 2n input lines with ‘n’ bits. It is optional to
represent the enable signal in encoders. An Encoder is a sensing device that
provides feedback. Encoders convert motion to an electrical signal that can be
read by some type of control device in a motion control system, such as counter
or PLC. It is used to define direction, location, speed or count. Encoders are
sensors designed to keep locate and positioning of the movement of a
mechanical part, usually for the purposes of feedback control of user input. It
can connect to another encoder interface, it converts raw data from encoder
into a useful position variable, sent to your computer.
Download