Lecture 29:  Data communication II

 

Objectives of this lecture

q       Learn some data transmission terms

q       Study some error-detection and correction techniques

 

Data Transmission Terms

q       Transmission media may be classified as guided or unguided.

q       With guide media the waves are guided through a physical part.  Examples are twisted pair, coaxial cable and fiber optic cable.

q       Unguided media provides a means of transmitting electromagnetic waves but do not guide them.  Example is air. 

q       Transmission can be either analog or digital. 

q       Data communication that uses continuous mode of transmission or reception as a function of time such as the sinusoids are called analog transmission. 

q       When the information is transmitted as a discrete sequence of 0s and 1s, the transmission is called digital. 

q       Digital transmission can be synchronous or asynchronous. 

q       In synchronous transmission, bits are sent at a fixed rate.

q       In a sinusoidal pattern, the height of the signal at a point is called its amplitude.

q       The number of repetition of a sinusoidal pattern is called its frequency and is measured in cycle per second or Hertz (Hz).

q       The conversion of digital signals to analog is called modulation and can be done either by adjusting the amplitude – amplitude modulation (AM), or by.adjusting the frequency – frequency modulation (FM).

q       The conversion of analog signals to digital is called de-modulation.

q       A device that performs modulation and demodulation is called a modem.

q       Transmission of signals without modulation is called baseband.  In baseband LAN, digital signals are inserted directly onto the cable as voltage pulses.  This scheme does not allow for frequency division multiplexing (FDM)

q       The use of coaxial cable for analog transmission is called broadband.

q       Transmission may be simplex, half-duplex or full-duplex. 

q       In simplex, signals are transmitted in only one direction. 

q       In half-duplex, both stations may transmit, but only one at a time. 

 

q       In full-duplex, both stations may transmit simultaneously

 

Error Detection and Correction

q       We saw that one of the functions of the data link layer is to ensure reliable communication through framing, flaw control and error detection and correction.

 

q       One of the simplest methods of error detection is parity check.  The method involves ensuring that the number 1-bits in a sequence of bits being sent is either odd or even by adding a 0 or a 1 bit called the parity bit. 

q       Assuming the parity is even, then a message of 7-bit ASCII character 1010001 for the letter Q is sent as 11010001.    

q       Note that parity bit could be added at any point depending on the protocols being used. 

q       At the receiving host, the number of 1-bits is counted by the data link layer protocol to make sure that they are even.  If they are not, then some error must have occurred along the way, so the two systems must correct it according to some error correction protocol. 

q       Using a single bit to encode a message enable some errors to be detected but it has two problems:

1.   A defective code with two inverted bits can not be detected

2.   Even if detected, it is not possible to correct it.

q       One solution is to let the receiving host transmit a signal to the sending host requesting for a re-transmission.  However, re-transmission is not always an option, for example in the case of simplex communication.

q       Other techniques include framing, in which the data link layer of the sending host inserts a time gap between frames.  However, this method is useful only with synchronous transmission.

q       Another method is to count the number of ASCII characters in a frame and transmit this value in the data.  If a character is lost in transmission, the receiving host detects and flags it as an error.  The disadvantage is that numeric data and binary strings are not ASCII characters. 

q       A still better approach is cyclic redundancy check (CRC), which is beyond the scope of this course.

 

Hamming Codes and Error Detection

q       In the late 1940s and early 1950s, R.W. Hamming developed his famous algorithm for correcting transmission errors. 

q       Suppose data has a length of h bits and that k check bits are appended to the information bits, let m be the total length (i.e., m=h+k)

q       An m bit code is referred to as a codeword.  For example, consider a 5-bit codeword, where one bit is a check bit and four bits are the information bits.  This means there are 16 legal messages.  Suppose the check bit is on position 5, then the following are the legal codewords.

00000

01001

01010

00011

01100

01101

00110

01111

11000

10001

10010

11011

10100

11101

11110

10111

 

q       The above table is called a complete code for this example. 

q       If any one bit is inverted in any of these 16 codewords, it could not produce a legal codeword.  For example, to convert 00000 to 01001, we need to convert two-bits, thus,2 is  the smallest number of bits in which two codewords differ.  This is called the Hamming distance d.

 

q      Hamming concluded that a complete code of minimum distance d can detect e errors, where e =d-1.  For the above example, e is1, i.e., changing one bit cannot produce a legal codeword. 

q       Note that although this gives us enough information to detect a 1-bit error, it does not give enough information to correct it.  For example, 10011 could have come from 00011, 10001 or 10010, all of which are legal.

q       Hamming went further to show that error detecting properties of a complete code can be expanded to correct defective codewords. 

q       He showed that to correct e errors in a complete code, we need the distance to be one more than twice the error i.e., d=2e+1.  For example, consider a code with four valid codewords: 0000000000, 0000011111, 1111100000, 1111111111.  This code has a distance d=5 which means it can correct two bit errors. 

q       If the codeword 0000000111 arrives, the receiver knows that the original must have been 0000011111.  If however a triple error occurs, the error cannot be corrected properly.