Encoder And Decoder In Digital Electronics Pdf

Posted on by admin
  1. The encoders and decoders play an essential role in digital electronics projects; encoders & decoders are used to convert data from one form to another form.These are frequently used in communication system such as telecommunication, networking, etc.to transfer data from one end to the other end.
  2. Binary Encoders. Digital Electronics Module 1 (Number Systems) described a number of different binary codes that are used to perform a range of functions in digital circuits. Mathematics, graphics, data manipulation and physical control systems are among many of the functions that are carried out using binary data, and each of these uses may require binary data arranged in various forms of.
  1. Encoder And Decoder In Digital Electronics Pdf Download
  2. Decoder And Encoder Circuit

A General encoder's block diagram.A simple encoder or simply an in is a to binary. That is, if there are 2 n input lines, and at most only one of them will ever be high, the binary code of this 'hot' line is produced on the n-bit output lines.For example, a 4-to-2 simple encoder takes 4 input bits and produces 2 output bits. The illustrated gate level example implements the simple encoder defined by the truth table, but it must be understood that for all the non-explicitly defined input combinations (i.e., inputs containing 0, 2, 3, or 4 high bits) the outputs are treated as don't cares.It is the reverse of a in its function. Gate level circuit diagram of a single bit 4-to-2 line encoder 4 to 2 Simple EncoderI 3I 2I 1I 0O 1O 0V0000xx011000111If the input circuit can guarantee at most a single-active input, a simple encoder is a better choice than a, since it requires less logic to implement but if not this become the major disadvantage of simple encoder that is they can generate the wrong output when there is more than one input present in a high state (logic state “1”). To rectify this problem a is used. They act on the request of higher priority and the rest cases go in 'don't care condition'.

Encoder And Decoder In Digital Electronics Pdf Download

So let’s now understand what are actually Encoders and Decoders. What are Encoders? Encoders are digital ICs used for encoding. By encoding, we mean generating a digital binary code for every input. An Encoder IC generally consists of an Enable pin which is usually set high to indicate the working.

Prerequisite –,Binary code of N digits can be used to store 2 N distinct elements of coded information. This is what encoders and decoders are used for. Encoders convert 2 N lines of input into a code of N bits and Decoders decode the N bits into 2 N lines.1. Encoders –An encoder is a combinational circuit that converts binary information in the form of a 2 N 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.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.Truth Table – D7D6D5D4D3D2D1D0XYZ00000111As 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.

Encoder And Decoder In Digital Electronics Pdf

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 + D7Y = D2 +D3 + D6 + D7Z = D1 + D3 + D5 + D7Hence, the encoder can be realised with OR gates as follows:One limitation of this encoder is that only one input can be active at any given time. If more than one inputs are active, then the output is undefined. For example, if D6 and D3 are both active, then, our output would be 111 which is the output for D7. To overcome this, we use Priority Encoders.Another ambiguity arises when all inputs are 0. In this case, encoder outputs 000 which actually is the output for D0 active.

Decoder And Encoder Circuit

In order to avoid this, an extra bit can be added to the output, called the valid bit which is 0 when all inputs are 0 and 1 otherwise.Priority Encoder –A priority encoder is an encoder circuit in which inputs are given priorities. When more than one inputs are active at the same time, the input with higher priority takes precedence and the output corresponding to that is generated.Let us consider the 4 to 2 priority encoder as an example.From the truth table, we see that when all inputs are 0, our V bit or the valid bit is zero and outputs are not used.

The x’s in the table show the don’t care condition, i.e, it may either be 0 or 1. Here, D3 has highest priority, therefore, whatever be the other inputs, when D3 is high, output has to be 11.

And D0 has the lowest priority, therefore the output would be 00 only when D0 is high and the other input lines are low. Similarly, D2 has higher priority over D1 and D0 but lower than D3 therefore the output would be 010 only when D2 is high and D3 are low (D0 & D1 are don’t care).Truth Table – D3D2D1D0XYV0000xx1x01101xx1011xxx111Implementation –It can clearly be seen that the condition for valid bit to be 1 is that at least any one of the inputs should be high. Hence, V = D0 + D1 + D2 + D3For X:= X = D2 + D3For Y:= Y = D1 D2’ + D3Hence, the priority 4-to-2 encoder can be realized as follows:2. Decoders –A decoder does the opposite job of an encoder. It is a combinational circuit that converts n lines of input into 2 n lines of output.Let’s take an example of 3-to-8 line decoder.Truth Table – XYZD0D1D2D3D4D5D6D100000001Implementation –D0 is high when X = 0, Y = 0 and Z = 0. Hence, D0 = X’ Y’ Z’Similarly, D1 = X’ Y’ ZD2 = X’ Y Z’D3 = X’ Y ZD4 = X Y’ Z’D5 = X Y’ ZD6 = X Y Z’D7 = X Y ZHence.