Encoder & Decoder PDF
Document Details
Uploaded by FondNirvana2882
Assam Down Town University
Tags
Summary
This document discusses encoders and decoders, which are combinational logic circuits used in digital systems. It explores different types of encoders, such as 4-to-2 encoders and octal-to-binary encoders, along with their associated truth tables and implementation details. It also covers the concept of decoders and their application in converting encoded information to a usable format. The document highlights the advantages and disadvantages of using encoders and decoders.
Full Transcript
Encoder An encoder is a combinational circuit that converts binary information in the form of a 2N input lines into N output lines, which represent N bit code for the input. For simple encoders, it is assumed that only one input line is active at a time. Types of Encoders There are different types...
Encoder An encoder is a combinational circuit that converts binary information in the form of a 2N input lines into N output lines, which represent N bit code for the input. For simple encoders, it is assumed that only one input line is active at a time. Types of Encoders There are different types of Encoders which are mentioned below. 4 to 2 Encoder Octal to Binary Encoder (8 to 3 Encoder) Decimal to BCD Encoder Priority Encoder As an example, let’s consider Octal to Binary encoder. As shown in the following figure, an octal-to- binary encoder takes 8 input lines and generates 3 output lines. Octal to Binary Encoder (8 to 3 Encoder) The 8 to 3 Encoder or octal to Binary encoder consists of 8 inputs: Y7 to Y0 and 3 outputs: A2, A1 & A0. Each input line corresponds to each octal digit and three outputs generate corresponding binary code. The figure below shows the logic symbol of octal to the binary encoder. The truth table for the 8 to 3 encoder is as follows. Truth Table – D7 D6 D5 D4 D3 D2 D1 D0 X Y Z 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 1 0 0 0 0 1 1 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 0 1 0 1 0 0 0 0 0 0 1 1 0 1 0 0 0 0 0 0 0 1 1 1 As seen from the truth table, the output is 000 when D0 is active; 001 when D1 is active; 010 when D2 is active and so on. Implementation – From the truth table, the output line Z is active when the input octal digit is 1, 3, 5 or 7. Similarly, Y is 1 when input octal digit is 2, 3, 6 or 7 and X is 1 for input octal digits 4, 5, 6 or 7. Hence, the Boolean functions would be: X = D4 + D5 + D6 + D7 Y = D2 +D3 + D6 + D7 Z = D1 + D3 + D5 + D7 Hence, the encoder can be realised with OR gates as follows: Advantages of using encoders: Accuracy: Encoders provide precise and accurate measurement of position, speed, or angular displacement. Reliability: They are highly reliable as they have no mechanical parts that can wear out or get damaged. Flexibility: Encoders can be easily integrated into various systems and are adaptable to different applications. Disadvantages of using encoders: Cost: Encoders can be relatively expensive compared to other sensing technologies. Noisy Output: Electrical noise can sometimes affect the accuracy of the encoder's output. Complexity: The setup and calibration of encoders can be complex, requiring technical expertise. 2. Decoders – A decoder does the opposite job of an encoder. It is a combinational circuit that converts n lines of input into 2n lines of output. Let’s take an example of 3-to-8 line decoder. Truth Table – X Y Z D0 D1 D2 D3 D4 D5 D6 D7 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 X Y Z D0 D1 D2 D3 D4 D5 D6 D7 0 1 0 0 0 1 0 0 0 0 0 0 1 1 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 1 0 1 0 0 0 0 0 1 0 0 1 1 0 0 0 0 0 0 0 1 0 1 1 1 0 0 0 0 0 0 0 1 Implementation – D0 is high when X = 0, Y = 0 and Z = 0. Hence, D0 = X’ Y’ Z’ Similarly, D1 = X’ Y’ Z D2 = X’ Y Z’ D3 = X’ Y Z D4 = X Y’ Z’ D5 = X Y’ Z D6 = X Y Z’ D7 = X Y Z Hence, Advantages & Disadvantages of Decoder Decoders efficiently convert encoded information into a more usable format, enabling systems to interpret and process complex data streams. This capability is crucial in applications like digital communications, memory addressing, and signal processing. By reducing the number of control lines needed, decoders help simplify circuit designs and reduce overall system complexity. This leads to more compact and efficient hardware implementations, particularly in digital systems and computer architecture. Decoders introduce a small delay as they process and convert signals, which can impact system performance in high-speed applications. This delay may become significant in time- critical operations or when cascading multiple decoders. As active components, decoders require power to operate, which can contribute to overall system power consumption. In battery-powered or energy-efficient designs, this additional power requirement may be a consideration, especially for large or complex decoding operations. Difference Between Encoder and Decoder Encoder Decoder Encoder circuit basically converts Decoder performs reverse operation the applied information signal into and recovers the original information a coded digital bit stream. signal from the coded bits. In case of encoder, the applied Decoder accepts coded binary data as signal is the active signal input. its input. The number of inputs accepted by The number of input accepted by an encoder is 2n. decoder is only n inputs. The output lines for an encoder is The output lines of an decoder is 2n. n. The decoder generates an active output The encoder generates coded data signal in response to the coded data bits as its output. bits. The operation performed is simple. The operation performed is complex. The encoder circuit is installed at The decoder circuit is installed at the the transmitting end. receiving side. OR gate is the basic logic element AND gate along with NOT gate is the used in it. basic logic element used in it. It is used in E-mail, video encoders It is used in Microprocessors, memory etc. chips etc.