You are on page 1of 10

ENCODERS

LEC # 26
Encoder
Encoders are logic circuits which change a set of signals into a code
using a certain logic.
Encoders are just like translators, they translate data from one code
(decimal) to another code (binary).
Encoding techniques are widely used to translate human language
characters to the codes that machines understand.

Decimal to Binary Encoder


Decimal to Binary Encoder.
10-to-4-line Encoder/ Dec-to-Binary
Encoder is set of combinational logics
that convert Decimal codes to binary
codes.
That is used in calculators, keyboards,
Numb-pad locks etc.
BCD output
Decimal input
00
1011
0
7
Decimal
5 to
BCD
3 Encoder
0 Logical circuit of Decimal to Binary Encoder
Decimal to BCD priority Encoder
This type of encoder performs the same basic encoding function as
previously discussed.
It has the additional flexibility that it can be used in applications that
require priority detection.
The encoder will produce a BCD output corresponding to the highest
order decimal digit input that is active and will ignore any other lower
order active inputs.
Example: If 3 and 6 inputs are both active, the BCD output is 0110
(which represents decimal 6).
The additional facility provided
in the priority encoder is that
when two more lines say D4
and D8 are activated
simultaneously, the BCD
output will be available
corresponding to the line
which has higher number i.e.
the output will be available
corresponding to D8 line.
Parity Generator and Checker.
In some digital systems the data or information in the form of the
binary bits is sent from one block or the system to the other block or
the system.
In the transmission of the data, error may occur due to change of
data bit (0 by 1 or vice versa). This change may be due to component
malfunctions or the electrical noise.
This problem is removed by adding one additional bit in the data to
be transmitted. This extra bit is known as parity bit.
The parity bit detects the single error in the transmission.
Parity is the number of 1s in the given data or word. If the number of
1s in the given data is even then parity is called as even parity; if on
the other hand the number of 1s in the given data is odd then the
parity is called as an odd parity.
This parity generator gives output P (parity bit) as logic 1 if the
number of 1s in the four bit input data is even; and P is logic 0 if the
number of 1s in the four bit input data is odd.

Parity Generator

If data is 0011 then Parity generated is 1 (Even Parity), and if data is


0010 then Parity generated is 0 (Odd Parity).
The parity bit P generated by the parity generator is sent along with
the data and at the receiver end data as well as the parity bit is
checked by the parity checker.

At the receiver, the received data


and parity bit are tested. If the
output P2 of the checker is 0,
then no error is there in the Parity Checker
received data. If on the other
hand output P2 is 1, then there is
an error in the received data.
Example: Data transmitted is
0011 then Parity generated is 1
and at checker side P2 will be 0
which shows data is error free.

You might also like