One of the first steps to sending a message is encoding it. Encoding is the process of converting information into another, acceptable form, for transmission. Decoding reverses this process in order to interpret the information.
Imagine a person planning a holiday trip with a friend, and calling the friend to discuss the details of where they want to go, as shown in Figure 1. To communicate the message, the sender must first convert, or encode, their thoughts and perceptions about the location into words. The words are spoken into the telephone using the sounds and inflections of spoken language that convey the message. On the other end of the telephone line, the person listening to the description, receives and decodes the sounds in order to visualize the image of the sunset described by the sender.
Encoding also occurs in computer communication, as shown in Figure 2. Encoding between hosts must be in an appropriate form for the medium. Messages sent across the network are first converted into bits by the sending host. Each bit is encoded into a pattern of sounds, light waves, or electrical impulses depending on the network media over which the bits are transmitted. The destination host receives and decodes the signals in order to interpret the message.