In digital electronic projects, the encoder and decoder play an important role. It is used to convert the data from one form to another form. Generally, these are frequently used in the communication systems like telecommunication, networking, and transfer the data from one end to the other end. In the same way it is also used in the digital domain for easy transmission of data, placed with the codes and then transmitted. At the end of the receiver, the coded data are collected from the code and then processed to display.This article discusses about what is encoder and encoder, working and its applications.
What is Encoder and Decoder ?
The encoder is a device or a transducer or a circuit. The encoder will convert the information from one format to another format i.e like electrical signals to counters or a PLC. The feedback signal of the encoder will determine the position, count, speed, and direction. The control devices are used to send the command to a particular function.
The decoder is a circuit used to change the code into a set of signals. The name its self tells the decoder because it has the reverse of encoding. The decoders are very simple to design.
In the digital electronics, the binary decoder is a combinational logic circuit that converts the binary integer to the associated pattern of output bits. These are used in different applications like seven segment display, memory address decoding. The function of the binary decoder is obtained if the given input combination has occurred.
3 to 8 Decoder
This type of decoder is called as the 3 line to 8 line decoder because they have 3 inputs and 8 outputs. To decode the combination of the three and eight, we required eight logical gates and to design this type of decoders we have to consider that we required active high output. In the below table shows the decoding of the 3 line to 8 line decoder. To design this type of decoders we need active high output and for the given input combination the decoder output is one. The table shows illustration of the decoding and also a logic symbol of 3 to 8 decoders.
From the truth table of three line inputs to eight line outputs, we can show the logic circuit. The logic circuit consists of three NOT gates and eight NAND gates. Enable pin of NAND gates are connected together. The NOT gates can generate the compliment of input and the NAND gates can produce the max in terms of each output.
2 to 4 Decoder
In the two to four decoders, the two input lines are decoded into four output lines. Therefore, this decoder consist of two input lines and four output lines. From the four output lines with only one output line will be active and the other three output lines are maintained at logic zero.The following diagram shows the two input lines to four output line decoder.
The truth table of the two input lines to four output line decoder can be observed in the following. If the enable pins are active high, then for a given input the outputs from Y0 to Y3 are logic 1. When the two inputs are low, then the output of Y0 is logic 1 and the other outputs are logic 0. If both the inputs are high, then the output of Y3 is logic 1 and other output pins are logic 0. If the enable pin is zero then the output pins are logic 0. If the input pins A = 0 & B = 1 then the Y1 will be logic 1 or if the inputs A= 1 & B = 0 then the Y2 output pin will be logic 1.
From the truth table the Boolean expressions of each output
Y0 = A ̅ B ̅
Y1 = A ̅ B
Y2 = A B ̅
Y3 = A B
By using the above equation, we can implement the logic circuit design of the two line inputs of the four line output. In this logic circuit there are two NOT gates and four AND gates are used. The four enable pins are connected together and if the enable pin is zero, then all the outputs are zero. If the enable pin is one, then the output depends on the product of the two inputs. In this we have designed the logic circuit with the AND gate, but we can also implement with the NAND gates by using the principle of minters.
Working of Encoder
To create the signal in the encoders there are different types of technologies which includes mechanical, magnetic, resistance, and optical is a most common. By using the interruption of light in the optical sensing the encoders will gives the feedback. The following diagram shows the basic structure of the incremental encoder by using the optical technology.
The light emitted from the LED will pass through the disk code, which are with the opaque lines. If the encoder shaft stats rotating the light beam of the LED are interrupted by the opaque lines on the code disk. This will give the pulse signals and the light is present then is in ON state & if there is no light then the light is in the ON state. The signals are sent to the counters or controller and then send the signals to construct the desired function.
The priority encoder is a circuit it compresses the multiple binary input to the small number of outputs. The output of priority encoder is in the binary representation of the original number of most significant bits. Frequently there is a use of control interrupt request by acting the highest priority encoder. We can give at a time two or more than two inputs, then the highest priority takes precedence.
The example of the priority encoder is 4 to 2 encoder and the priority encoders are connected to the arrays to make large encoders. The highest priority encoders are at the left and X is an irrelevant value and the output V indicating that the input is valid or not. The large encoders in the priority encoders are 16 to 4 encoders, these are made with the six 4 to 2 encoders – for 4 to 2 encoders with the single source connected to their inputs and remaining two encoders takes the output of the first four as input.
Applications of the Encoder and Decoder
- Speed synchronization of multiple motors in industries
- War field flying robot with a night vision flying camera
- Robotic vehicle with the metal detector
- RF based home automation system
- Automatic health monitoring systems
In this article we have discussed about the different types of encoders and decoders and their uses. I hope by reading this article you have gained some basic information about this article. If you have any queries regarding this article or to implement engineering projects, please feel free to comment in the below section. Here is the question for you, what is a priority encoder ?