Encoders and Decoders.

Slides:



Advertisements
Similar presentations
Adders Used to perform addition, subtraction, multiplication, and division (sometimes) Half-adder adds rightmost (least significant) bit Full-adder.
Advertisements

Logic Circuits Design presented by Amr Al-Awamry
Digital Logic Design Week 7 Encoders, Decoders, Multiplexers, Demuxes.
Multiplexer. A multiplexer (MUX) is a device which selects one of many inputs to a single output. The selection is done by using an input address. Hence,
Decoders/DeMUXs CS370 – Spring Decoder: single data input, n control inputs, 2 outputs control inputs (called select S) represent Binary index of.
Combinational Logic Design
CHAPTER 2 Digital Combinational Logic/Arithmetic Circuits.
Code Converters, Multiplexers and Demultiplexers
CHAPTER 1 Digital Concepts
COE 202: Digital Logic Design Combinational Circuits Part 3 Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office: Ahmad Almulhem, KFUPM.
Chapter 4: The Building Blocks: Binary Numbers, Boolean Logic, and Gates Invitation to Computer Science, Java Version, Third Edition.
Chapter 4: The Building Blocks: Binary Numbers, Boolean Logic, and Gates Invitation to Computer Science, C++ Version, Third Edition.
Chapter 4: The Building Blocks: Binary Numbers, Boolean Logic, and Gates Invitation to Computer Science, C++ Version, Third & Fourth Edition Spring 2008:
Chapter 4: The Building Blocks: Binary Numbers, Boolean Logic, and Gates Invitation to Computer Science, C++ Version, Third Edition.
DIGITAL SYSTEMS TCE OTHER COMBINATIONAL LOGIC CIRCUITS DECODERS ENCODERS.
Chapter2 Digital Components Dr. Bernard Chen Ph.D. University of Central Arkansas Spring 2009.
Chapter 3 Digital Logic Structures. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 3-2 Building Functions.
1 CSE 140 Lecture 12 Standard Combinational Modules Professor CK Cheng CSE Dept. UC San Diego.
Combinational Logic Chapter 4.
9/15/09 - L15 Decoders, Multiplexers Copyright Joanne DeGroat, ECE, OSU1 Decoders and Multiplexers.
Outline Decoder Encoder Mux. Decoder Accepts a value and decodes it Output corresponds to value of n inputs Consists of: Inputs (n) Outputs (2 n, numbered.
CS 151: Digital Design Chapter 3 3-8: Encoding. CS 151 Encoding Encoding - the opposite of decoding - the conversion of a maximum of 2 n input code to.
COE 202: Digital Logic Design Combinational Circuits Part 3 Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office: Ahmad Almulhem, KFUPM.
CS1Q Computer Systems Lecture 8
Documentation Standards Circuit specification. –Description of what the system is supposed to do, including a description of all inputs and outputs and.
9/15/09 - L15 Decoders, Multiplexers Copyright Joanne DeGroat, ECE, OSU1 Decoders and Multiplexer Circuits.
Combinational Design, Part 3: Functional Blocks
Digital Logic Structures: Chapter 3 COMP 2610 Dr. James Money COMP
CO UNIT-I. 2 Multiplexers: A multiplexer selects information from an input line and directs the information to an output line A typical multiplexer has.
Decoder/Demultiplexer
Combinational Circuits by Dr. Amin Danial Asham. References  Digital Design 5 th Edition, Morris Mano.
© 2009 Pearson Education, Upper Saddle River, NJ All Rights Reserved Floyd, Digital Fundamentals, 10 th ed Digital Logic Design Dr. Oliver Faust.
Computer Science I CSCI Summer 2009 David E. Goldschmidt, Ph.D.
Magnitude Comparator A magnitude comparator is a combinational circuit that compares two numbers, A and B, and then determines their relative magnitudes.
Chapter # 4: Programmable Logic
CS1Q Computer Systems Lecture 8
Simple ALU How to perform this C language integer operation in the computer C=A+B; ? The arithmetic/logic unit (ALU) of a processor performs integer arithmetic.
Company LOGO Edit your slogan here DKT 122/3 DIGITAL SYSTEM 1 WEEK #8 FUNCTIONS OF COMBINATIONAL LOGIC (ENCODER & DECODER, MUX & DEMUX)
1 CSE 140 Lecture 11 Standard Combinational Modules CK Cheng CSE Dept. UC San Diego.
Prepared by: Careene McCallum-Rodney Multiplexor.
1 DLD Lecture 16 More Multiplexers, Encoders and Decoders.
3.13 How many output lines will a five-input decoder have?
Multiplexer (MUX) A multiplexer can use addressing bits to select one of several input bits to be the output. A selector chooses a single data input and.
Multiplexer.
DIGITAL ELECTRONICS THEME 2: Combinational Logic Circuits. Decoders, Multiplexers, De-multiplexers, Code converters. For combinational logic the values.
1 Combinational Logic Design.  A process with 5 steps Specification Formulation Optimization Technology mapping Verification  1 st three steps and last.
5-2-3 Analogue to Digital Converters (ADC). Analogue to Digital Conversion The process is now the opposite of that studied in Topic Now we wish.
CHAPTER 2 Digital Combinational Logic/Arithmetic Circuits.
Invitation to Computer Science, C++ Version, Fourth Edition
Chapter # 4: Programmable Logic
Multiplexer.
CS221: Digital Logic Design Combinational Circuits 3
Combinational Circuits
More Devices: Control (Making Choices)
Combinational Logic Circuits
Lecture 9 Logistics Last lecture Today HW3 due Wednesday
Invitation to Computer Science, Java Version, Third Edition
Magnitude Comparator A magnitude comparator is a combinational circuit that compares two numbers, A and B, and then determines their relative magnitudes.
CSE 140 Lecture 11 Standard Combinational Modules
COE 202: Digital Logic Design Combinational Circuits Part 3
Multiplexers Anindya IE CSE.
Digital Fundamentals Floyd Chapter 1 Tenth Edition
Overview Last lecture Timing; Hazards/glitches
Digital System Design Combinational Logic
Arithmetic Circuits.
ECE2030 HW-6.
Digital Electronics and Logic Circuit
ECE 352 Digital System Fundamentals
CSE 140 Lecture 11 Standard Combinational Modules
Presentation transcript:

Encoders and Decoders

Content to be covered: Encoders Decoders Example of using decoders with MUX Conclusion

ENCODERS An encoder is a device that is used to convert a signal or certain data into code. This kind of conversion is done for a variety of reasons, the most common being data compression. Other reasons for using encoders include: data encryption for making the data secure translating data from one code to another new or existing code.

ENCODERS Encoders may be analog or digital devices. In analog devices, the encoding is done using analog circuitry While in digital encoders the encoding is done using program algorithms

ENCODERS vs MULTIPLEXORS An encoder refers to a device that is used to change a signal or data into a code. Whereas A Multiplexer or mux is a device which performs multiplexing or it takes information from more than one channels and outputs into a single channel.

Example of an ENCODER Inputs Output

Activity Draw: 2 input encoder 4 input encoder 16 input encoder

Further example of Encoders If in an encoder the following input was given, the output/address would be as indicated: A B C D E F G H S0 S1 S2 1 0 0 0 0 0 0 0 0 0 0

Further example of Encoders 1 If in an encoder the following input was given, the output/address would be as indicated: A B C D E F G H S0 S1 S2 0 0 0 0 0 1 0 0 1 0 1

Content to be covered: Encoders Decoders Example of using decoders with MUX Conclusion

DECODERS A decoder, on the other hand, functions the reverse of an encoder. It is a device that is used to decode an encoded signal or data. It does this to help retrieve the data that was encoded in the first place. Both encoders and decoders usually function in cycle, i.e., an application that uses an encoder would ideally also require a decoder.

DECODERS A decoder chooses one of the wires and make it output 1. The output whose index is given by the binary value on S (select input) is set to 1. All others are set to 0. Only one wire can be ‘ON’ at a time.   Whichever one is ‘ON’ is based on the input (ie @ the selector).

Example of a DECODER Output NB: Only ONE of the line will have the value 1; others will have 0.

Activity Draw: 1 input decoder 2 input decoder 4 input decoder

Further example of Decoders If in a decoder the following selects were made, the output would be as indicated: S0 S1 S2 A B C D E F G H 1 0 1 0 0 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 0 0

Further example of Decoders If in a decoder the following selects were made, the output would be as indicated: S0 S1 S2 A B C D E F G H 0 1 0 0 0 1 0 0 0 0 0

Content to be covered: Encoders Decoders Example of using decoders with MUX Conclusion

Example of using decoders with MUX

Example of using decoders with MUX The decoder selected 01, which allows 01 to be set to 1, hence allowing it to light up. The MUX gets its input from the wire that has been lit-up by the decoder.

Example of using decoders with MUX The input to the MUX of 1 or 0 is based on if the lines are connected (1) or disconnected (2). In the example given above, if the select for the 2-1 MUX is 00, the output would be 0.

Example of using decoders with MUX Please Note: You don’t always have equal rows and columns. A decoder does not have an output line, and the input (which is to the side) is the select lines.

Activity Draw: 2-4 Decoder with a 8-1 bit Mux (using only 2-1 bit muxes) LOL

Content to be covered: Encoders Decoders Example of using decoders with MUX Conclusion

Conclusion If the encoders are the opposite of decoders, then that means that the outputs and inputs of the decoder are swapped.  That means that what would normally be the select lines on the decoder (which are inputs) would now be the outputs of the encoder.  Its purpose would be to produce the binary encoding of the index whose input is high.

Conclusion That is, the encoder will have 2n inputs and n outputs, and only one of the inputs is expected to be high at any one moment.  Encoders are useful for components like content-addressable memory, where you put in the data you want, and the address where it is stored is returned as a result.

The END