0% found this document useful (0 votes)
17 views6 pages

Lecture 10

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views6 pages

Lecture 10

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

Future university Digital system II lecture Notes

Lecture No (6)
Encoder
An encoder is a combinational logic circuit that essentially performs a ―reverse‖ of decoder
functions. An encoder accepts an active level on one of its inputs, representing digit, such as a
decimal or octal digits, 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.
Most decoders accept an input code and produce a HIGH (or a LOW) at one and only one
output line. In other worlds, a decoder identifies, recognizes, or detects a particular code.
The opposite of this decoding process is called encoding and is performed by a logic
circuit called an encoder. An encoder has a number of input lines, only one of which input is
activated at a given time and produces an N-bit output code, depending on which input is
activated.
General encoder diagram

General encoder diagram


An encoder is basically multi inputs and multi outputs digital logic circuit, which
has as many inputs as the number of character to be encoded and as many outputs as the
number of bits in encoded form of characters.
Future university Digital system II lecture Notes

Example
When we insert any character or symbol to a digital system, through key board, it is needed to
be encoded in machine readable farm.
Encoder converts different human readable characters or symbol to their equivalent digital
format.
4-to-2 Bit Binary Encoder
Truth table
D3 D2 D1 D0 B A
0 0 0 1 0 0

0 0 1 0 0 1

0 1 0 0 1 0

1 0 0 0 1 1

Boolean expression
A = D1 + D3
B = D2 + D3

Logic circuit of 4-2 line


encoder
Future university Digital system II lecture Notes

8-to-3 Encoder Octal


to Binary Encoder
The octal numbers system has base of 8, so that the number of digits used in octal
system are from 0 to 7. Therefore, there will be eight input line in a basic Octal to binary encoder.
As binary equivalent of numbers 0 to 7 can be represented by only three binary bits. There will
be three output lines to represent bits of binary equivalent of octal number.
Truth table
D0 D1 D2 D3 D4 D5 D6 D7 A B C
1 0 0 0 0 0 0 0 0 0 0
0 1 0 0 0 0 0 0 0 0 1
0 0 1 0 0 0 0 0 0 1 0
0 0 0 1 0 0 0 0 0 1 1
0 0 0 0 1 0 0 0 1 0 0
0 0 0 0 0 1 0 0 1 0 1
0 0 0 0 0 0 1 0 1 1 0
0 0 0 0 0 0 0 1 1 1 1

Boolean expression
A = D4 + D5 + D6 +
D7
B = D2 + D3 + D6 +
D7
C = D1 + D3 + D5 + D7

Logic circuit of 8-3 line


encoder
Future university Digital system II lecture Notes

The Decimal to BCD Encoder


Suppose we have to design an encoder which will encode 10 characters (from 0 to 9).
The encoded form of each character would be 4 bit binary equivalent.
Then the encoder will have 10 numbers of input lines and each for one character.
There will be four output lines to represent 4 bit encoded form of each input character.

Logic symbol for Decimal to BCD encoder

Similarly for encoding M numbers of characters in N bit format, we need M input N


output digital encoder.
In encoder normally, the input of which encoding to be done, is made high, other all
inputs remain low at that time.
The 74HC147 is a priority encoder with active – LOW inputs (0) for decimal
digits 1 through 9 and active-LOW BCD outputs as indicated in the logic symbol in
Figure below. A BCD zero output is represented when none of the inputs is active. The
device pin numbers are in parentheses. This device may be available in other CMOS or TTL
families.
Future Digital system II lecture Notes
university
Truth
table Input Decimal A B C D
D0 0 0 0 0 0
D1 1 0 0 0 1
D2 2 0 0 1 0
D3 3 0 0 1 1
D4 4 0 1 0 0
D5 5 0 1 0 1
D6 6 0 1 1 0
D7 7 0 1 1 1
D8 8 1 0 0 0
D9 9 1 0 0 1

Boolean expression
A = D8 + D9
B = D4 + D5 + D6 + D7
C = D2 + D3 + D6 + D7 +
D9
D = D1 + D3 + D5 + D7 +
D9

Logic circuit of Decimal to BCD


Encoder
Future Digital system II lecture Notes
university
Encoder Application
A simplified keyboard
encoder

When one of the keys is pressed, the decimal digit is encoded to the corresponding BCD
code. The keys are represented by 10 push-button switches, each with a pull-up resistor to
V+.
The pull-up resistor ensures that the line is HIGH when a key is not pressed.
When a key is pressed, the line is connected to ground, and a LOW is applied to
the corresponding encoder input. The zero key is not connected because the BCD output
represents zero when none of the other keys is pressed. The BCD complement output of the
encoder goes into a storage device, and each successive BCD code is stored until the entire
number has been entered.

You might also like