You are on page 1of 48
Encoding and Modulating As we discussed in Chapter 4, information must be transformed into signals before it can be transported across communication media, We must transform dat nto signals 10 send them from one place ta another How information is transformed depends on its original format and on the format used by the communication hardware. If you want to send a love letter by smoke signal, you need to know which smoke patterns match which words in your message before you actually build your fire, Words ate information and puffs of smoke are a representation of that information A simple signal by itself does not carry information any more than a straight line conveys words. The signal must be manipulated so that it contains identifiable changes that are recognizable to the sender and receiver as representing the information intended. First the information must be translated into agreed-upon patterns of Os and Is, for example, using American Standard Code for Information Interchange (ASCII) tabulated in Appendix A. Data stored in a computer are in the form of Os and 1s. To be carried from one place to another (inside or outside the computer), dats are usually converted to digital signals. This is called digital-to-digital conversion or encoding digital data into a digi- tal signal. Sometimes, we need to convert an analog signal (such as voice in a telephone con- Yersation) into a digital signal for several reasons, such as to decrease the effect of noise, This is called analog-to-digital conversion or digitizing an analog signal. Atother times, we want to send a digital signal coming out of a computer through a medium designed for an analog signal. For example, to send data from one place to another using the public telephone line, the digital signal produced by the computer should be converted to an analog signal. This is called digital-to-analog conversion or ‘modulating a digital signal, Ofien an analog signal is sent over long distances using analog media, For exam ple, voice or music from a radio station, which is naturally an analog signal, is transmit ted through the air. However, the frequency of the voice or music is not appropriate for o CHAPLER 9 ENCODING AND MODULA this kind of transmission; the signal should be carried by a higher-frequency signal. This is called analog-to-analog conversion ot modulating an analog signal. Figure 5.1 shows these four different conversion methods. Figure 5.1 Different conversion schemes Com methods 5.1 DIGITAL-TO-DIGITAL CONVERSION Digital-to-digital encoding or conversion is the representation of digital information. by a digital signal. For example, when you transmit data from your computer to your printer, both the original data and the transmitted data are digital. In this type of encod- ing, the binary 1s and Os generated by a computer are translated into a sequence of voltage pulses that can be propagated over a wire. Figure 5.2 shows the relationship between the digital information, the digital-to-digital encoding hardware, and the resultant digital signe igure 5.2 Digital-to-digital encoding | Digital/digital none JODY i ¥ ' encoding | | Of the many mechanisms for digital-to-digital encoding, we will discuss only those most useful for data communication. These fall into three broad categories: wi- polar, polar, and bipolar (see Figure 5.3). Unipolar encoding is simple, with only one technique in use. Polar encoding has three subcategories, NRZ, RZ, and biphase, two of which have multiple variations of their own, The third option, bipolar encoding, has three variations: AMI, B8ZS, and HDB3 Unipolar Unipolar encoding is very simple and very primitive. Although it is almost obsolete today, its simplicity provides an easy introduction to the concepts developed with the SECTION S.1 DIGITAL-TO-DIGITAL CONVERSION 93 gure 5.3 Types of digital-to-digital encoding Ce J Ce be more complex encoding systems and allows us to examine the kinds of problems that any digital transmission system must overcome. Digital transmission systems work by sending voltage pulses along a medium link, usually a wire or cable. In most types of encoding, one voltage level stands for binary 0 and another level stands for binary 1. The polarity of a pulse refers to whether it is pos- itive or negative. Unipolar encoding is so named because it uses only one polarity. This polarity is assigned to one of the two binary states, usually the I. The other state, usu- ally the 0, is represented by zero voltage. Unipolar encoding uses only one level of value Figure 5.4 shows the idea of unipolar encoding. In this example, the Is are encoded as a positive value and the Os are encoded as the zero value. In addition to being straightforward, unipolar encoding is inexpensive to implement. igure $4 Unipolar encoding Amplivade 0 1,0, 0 1 1 1 0 However, unipolar encoding has at least two problems that make it less desirable: a DC component and synchronization. DC Component The average amplitude of a unipolar encoded signal is nonzero. This creates what is, called a direct current (DC) component (a component with zero frequency). When a CHA FL ENCODING AND Mrectece tones signal contains a DC component, it cannot travel through media that cannot handle DC components. Synchronization When a signal is unvarying, the receiver cannot determine the beginning and ending of each bit, Therefore, a synchronization problem in unipolar encoding can occur when- ever the data stream includes a long uninterrupted series of Is of Os. Digital encoding schemes use changes in voltage level to indicate changes in bit type. A signal change also indicates that one bit has ended and a new bit has begun. In unipolar encoding, however, a series of one kind of bit, say seven 1s, occurs with no voltage changes, just an unbroken positive voltage that lasts seven times as long as a single | bit. Whenever there is no signal change to indicate the start of the next bit in a sequence, the receiver has to rely on a timer. Given an expected bit rate of 1000 bps, if the receiver detects Positive voltage lasting 0.005 second, it reads one | per 0.001 second, or five 1s. Unfortunately, lack of synchronization between the sender's and the receiver's clocks distorts the timing of the signal so that, for example, five 1s can be stretched to 0.006 second, causing an extra 1 bit to be read by the receiver. That one extra bit in the data stream causes everything after it to be decoded erroneously. A solution developed ‘o control the synchronization of unipolar transmission is to use a separate, parallel line that carries a clock pulse and allows the receiving device to resynchronize its timer to that of the signal. But doubling the number of lines used for transmission increases the cost and so proves uneconomical. Polar Polar encoding uses two voltage levels: one positive and one negative. By using both levels, in most polar encoding methods the average voltage level on the line is reduced and the DC component problem of unipolar encoding is alleviated. In Manchester and differential Manchester encoding (see page 97), each bit consists of both positive and negative voltages, so the DC component is totally eliminated, Polar encoding uses two levels (positive and negative) of amplitude, Of the many existing variations of polar encoding, we will examine only the three most popular: nonreturn to zero (NRZ), return to zero (RZ), and biphase. NRZ encoding includes two methods: nonreturn to zero, level (NRZ-L), and nonreturn to zero, invert (NRZ-I). Biphase also refers to two methods. The first, Manchester, is the method used by ethernet LANs. The second, Differential Manchester, is the method used by Token Ring LANs (see Figure 5.5). Nonreturn to Zero (NRZ) In NRZ encoding, the level of the signal is always either positive or negative. The two most popular methods of NRZ transmission are discussed below. SECTION 5.) DIGITAL-TO-DIGITAL CONVERSION 95 Figure 5.5 Types of polar encoding hase vi (oe NRZAL NRz-I | wtneever | [ict NRZ-L In NRZ-L encoding, the level of the signal depends on the type of bit it rep- resents. A positive voltage usually means the bit is a 0, and a negative voltage means the bit is a 1 (or vice versa); thus, the level of the signal is dependent upon the state of the bit. In NRZ-L the level of the signal is dependent upon the state of the Bit, A problem can arise when there is a long stream of Os or Is in the data, The receiver receives a continuous voltage and should determine how many bits are sent by relying on its clock, which may or may not be synchronized with the sender clock, NRZ-I__ In NRZ-1, an inversion of the voltage level represents a | bit. It is the transi- tion between a positive and a negative voltage, not the voltages themselves, that repre- sents a 1 bit, A 0 bit is represented by no change. NRZ-1 is superior to NRZ-L due to the synchronization provided by the signal change each time a | bit is encountered, The existence of 1s in the data stream allows the receiver to resynchronize its timer to the actual arrival of the transmission. A string of Os can still cause problems, but because Os are not as likely, they are less of a problem, In NRZ-1 the signal is inverted if'a | is encountered Figure 5.6 shows the NRZ-L and NRZ-1 representations of the same series of bits. In the NRZ-L sequence, positive and negative voltages have specific meanings: positive for 0 and negative for 1. In the NRZ-I sequence, the voltages per se are meaningless. Instead, the receiver looks for changes from one level to another as its basis for recog- nition of Is. Return to Zero (RZ) ‘As you can see, anytime the original data contain strings of consecutive Is or Os, the receiver can lose its place. As we mentioned in our discussion of unipolar encoding, one

You might also like