0% found this document useful (0 votes)
19 views18 pages

Session_05_Encoder Decoder

Nothing

Uploaded by

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

Session_05_Encoder Decoder

Nothing

Uploaded by

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

Department of BES-II

Fundamentals of IOT & Sensors (24EC1101)

Topic:
Encoder(74LS148), Decoder(74LS138)

Session No: 05
AIM OF THE SESSION

To familiarize students with the basic concept of Encoders and Decoders using SN74LS148 and 74LS138 ICs respectively.

INSTRUCTIONAL OBJECTIVES

This Session is designed to:


1. Demonstrate the operation and applications of encoding logic in digital systems
2. Describe the working of SN74LS148 priority encoder integrated circuit.
3. List out the applications of encoders and decoders
4. Describe the working of 74LS138 3 to 8 line decoder integrated circuit.

LEARNING OUTCOMES

At the end of this session, you should be able to:


1. Define the working of encoder and decoder logic in digital systems
2. Describe the working of SN74LS148 priority encoder integrated circuit.
3. Summarize the pin diagram, truth table and working of encoder/decoder integrated circuits
ENCODERS: INTRODUCTION

• An encoder is a digital circuit that converts a


set of binary inputs into a unique binary code.
Encoders are commonly used in digital
systems to convert a parallel set of inputs into
a serial code.

• It has a maximum of 2n input lines and ‘n’


output lines; hence it encodes the
information from 2n inputs into an n-bit code.

Block Diagram of a Encoder


ENCODERS: INTRODUCTION

• 4 to 2 Encoder: The 4 to 2 Encoder consists of four inputs Y3, Y2, Y1 & Y0, and
two outputs A1 & A0. At any time, only one of these 4 inputs can be ‘1’ in order to
get the respective binary code at the output.

Fig. 4 to 2 Encoder
Table:Truth Table of 4 to 2 Encoder
SN74LS148: Priority Encoder

• The priority encoder is a circuit that executes the priority


function.

• The logic of the priority encoder is such that two or more


inputs appear at an equal time, the input having the largest
priority will take precedence.

• For all types, data inputs and outputs are active at the low
logic level.
PIN DESCRIPTION OF SN74LS148

Pin No Pin Name Description


1 4 Octal Input Pin 1
• The SN74LS148 is a 8-to-3 line priority 2 5 Octal Input Pin 2
encoder. It has 8 input lines (D0 to D7) 3 6 Octal Input Pin 3
and 3 output lines (A0, A1, A2). 4 7 Octal Input Pin 4
5 E1 Active Low Enable Pin
6 A2 Binary Output Pin A2
• The priority encoding scheme used in 7 A1 Binary Output Pin A1
SN74LS148 is such that the highest 8 GND Ground
priority input line with a valid input is 9 A0 Binary Output Pin A0
encoded. 10 0 Octal Input Pin 10
11 1 Octal Input Pin 11
12 2 Octal Input Pin 12
• The SN74LS148 operates on a 5V 13 3 Octal Input Pin 13
power supply and is compatible with TTL 14 GS Group Signal Output Pin
logic levels. 15 EO Enable Output Pin
16 Vcc Chip Supply Voltage
SN74LS148: Functional Table

• EI is active low, GS(Group Signal) is active LOW when any


input is LOW: this indicates when any input is active.
• EO (Enable Output) is LOW when all inputs are HIGH.
• Let us take the case when 4th input is L (Logic high): In that
case it will not see the preceding inputs i.e 0,1,2,3 inputs and
it will activate 4th output automatically
• That is why preceding inputs 0,1,2,3 are don’t care and 4th
output is activated.
• 4th output : L H H meaning 1 0 0. (active low case: L meaning
logic high)
Decoder

Decoder is a combinational circuit that has ‘n’ input lines and maximum of 2n output lines.
One of these outputs will be active High based on the combination of inputs present, when
the decoder is enabled. That means decoder detects a particular code.

Block Diagram of a Decoder


Decoder

2 to 4 line decoder: In the 2 to 4 line decoder, there is a total of three inputs, i.e., A0, and A1 and E and four
outputs, i.e., Y0, Y1, Y2, and Y3. For each combination of inputs, when the enable 'E' is set to “1”, one of these four
outputs will be “1”.
74LS138 : 3 to 8 Line Decoder

• 74LS138 is a member from ‘74xx’family of


TTL logic gates.

• The chip is designed for decoding or de-


multiplexing applications and comes with
3 inputs to 8 output setup.

• The design is also made for the chip to be


used in high-performance memory-decoding
or data-routing applications, requiring very
short propagation delay times.
74LS138 : Functional Table

• As shown in table first three rows the enable pins needed to be connected appropriately or irrespective of
input lines all outputs will be high.

• After powering, if all buttons are not pressed O0 will be LOW and remaining output will be HIGH as
shown in table.
• If only A0 is pressed, A0=HIGH and O1 will become LOW while remaining will be HIGH.
• Following if only A1 is pressed, A1=HIGH and O2 will become LOW while remaining will be HIGH.
TRADITIONAL ENCODE-DECODE MODEL OF HUMAN COMMUNICATION
SUMMARY

This Session is designed to demonstrate the operation and applications of encoding logic in digital

systems. We have also described the working of SN74LS148 priority encoder integrated circuit. We

have listed out the applications of encoders and decoders. Added to this we have described the

working of 74LS138 3 to 8 line decoder integrated circuit.


SELF-ASSESSMENT QUESTIONS

1. What is the primary function of an Encoder?

A. To combine multiple inputs into one output


B. To decode digital signals into analog signals
C. To convert digital data into a coded form
D. To amplify signals

2. How many input lines are required for a 4-to-2 Encoder?

A. 2
B. 3
C. 4
D. 8
SELF-ASSESSMENT QUESTIONS

3. What is the output configuration of a Decoder?

A. One input, multiple outputs


B. Multiple inputs, one output
C. Multiple inputs, multiple outputs
D. One input, one output

4. In a 2-to-4 Encoder, if the input is 01, which output line will be active?

A. Output 0
B. Output 1
C. Output 2
D. Output 3
TERMINAL QUESTIONS

Short answer questions:


1. Specify the purpose of an decoder in digital systems?
2. What is the purpose of an encoder in digital systems?

Long answer questions:


1. Draw the block diagram of 4:2 Encoder and specify its function with the help of truth table.
2. Illustrate the working of a decoder IC 74LS138 with PIN diagram and truth table.
3. Discuss the encoder IC 74LS148 and its applications.
REFERENCES FOR FURTHER LEARNING OF THE SESSION

Reference Books:
1. Internet of Things: A Hands-On Approach" by Arshdeep Bahga and Vijay Madisetti
2. "Internet of Things: Architectures, Protocols and Standards" by Hossam Mahmoud Ahmad Fahmy
and Ahmed K. Elhakeem

Sites and Web links:


1. https://www.javatpoint.com/decoder-digital-electronics
2. https://www.geeksforgeeks.org/encoder-in-digital-logic/
3. https://www.tutorialspoint.com/digital_circuits/digital_circuits_decoders.htm
THANK YOU

Team – Fundamentals of IoT & Sensors

You might also like