Encoding vs Decoding
Encoding is the process of transforming data in to a different format using a method that is publicly available. The purpose of this transformation is to increase the usability of data especially in different systems. It is also used for reducing the storage space required to store data and for transferring data across different channels. Decoding is the reverse process of encoding, which converts encoded information back in to the original format.
What is Encoding?
Transforming data in to more usable formats for different systems, using a method publicly available is called encoding. Encoded data can be easily reversed. Most of the time, the converted format is a standard format that is widely used. For example, in ASCII (American Standard Code for Information Interchange) characters are encoded using numbers. ‘A’ is represented using number 65, ‘B’ by number 66, etc. These numbers are referred to as ‘code’. Similarly, encoding systems such as DBCS, EBCDIC, Unicode, etc. are also used to encode characters. Compressing data can also be seen as an encoding process. Encoding techniques are also used when transporting data. For example, Binary Coded Decimal (BCD) encoding system uses four bits to represent a decimal number and Manchester Phase Encoding (MPE) is used by Ethernet to encode bits. The term encoding is also used for analog to digital conversion.
What is Decoding?
Decoding is the reverse process of encoding, which converts encoded information back in to its original format. Encoded data can be easily decoded using standard methods. For example, decoding Binary Coded Decimal requires some simple calculations in base-2 arithmetic. Decoding ASCII values is a straightforward process since there is a one to one mapping between characters and numbers. The term decoding is also used for digital to analog conversion. In the filed of communication, decoding is the process of converting received messages in to a message written using a specific language. This process is not straight forward as the previously mentioned decoding schemes, since the message could be tampered due to the noise in the channels used for communication. Decoding methods such as Ideal observer decoding, maximum likelihood decoding, minimum distance decoding, etc are used for decoding messages sent via noisy channels.
What is the difference between Encoding and Decoding?
Encoding and decoding are two opposite processes. Encoding is done with the intension of increasing the usability of data in different systems and to reduce the space required for storage, while decoding converts encoded information back in to its original format. Encoding is done using publicly available methods and it can be easily reversed (decoded). For example, ASCII encoding is just a mapping between characters and numbers. So decoding it is straight forward. But decoding messages sent via a noisy channels will not be straight forward, because the message could be tampered with noise. In such instances decoding involves complex methods that are used to filter out the effect of noise in the message.