Professional Documents
Culture Documents
Publication 12 19898 300
Publication 12 19898 300
Sender Receiver
Drop parity bit and accept
data Yes
Reject
1100001 Data Even?
No
Data
Calculate
parity bit Count bits
1100001 1
Bits
Transmission media
r1 r2 d r4 d d d r8 d d d
Calculating the additional bits:
r1 deals with the following bits
1 3 5 7 9 11
r1 r2 d r4 d d d r8 d d d
r2 deals with the following bits
2 3 6 7 10 11
r1 r2 d r4 d d d r8 d d d
r4 deals with the following bits
4 5 6 7
r1 r2 d r4 d d d r8 d d d
r8 deals with the following bits
8 9 10 11
r1 r2 d r4 d d d r8 d d d
m = 1011001
r1 r2 1 r4 0 1 1 r8 0 0 1
insert r1
1 r2 1 r4 0 1 1 r8 0 0 1
insert r2
1 0 1 r4 0 1 1 r8 0 0 1
insert r4
1 0 1 0 0 1 1 r8 0 0 1
insert r8
1 0 1 0 0 1 1 1 0 0 1
1 0 1 0 0 1 0 1 0 0 1
1 0 1 0 0 1 0 1 0 0 1
1 0 1 0 0 1 0 1 0 0 1
1 0 1 0 0 1 0 1 0 0 1
Error Detection:
Error correcting codes are sometimes used for data transmission, for
example, when the channel is simplex, so retransmission cannot be
requested, but most error detection followed by retransmission is preferred
because it is more efficient. Error detection codes are an error control method
that currently used by all computer networks, where the codeword is the
packet add to it the error detecting bits. There are two methods:
1. Checksum method:
Checksum is the sum of the segment contents as sequence of 16-bit
integers, and then take the 1’s complements of the sum. It is called 1’s
complement checksum and used intensively in Internet protocols (used at
transport layer only). The algorithm divide the bit stream into a sequence
of words each of which 16-bit, and then sum the words with each other. In
each once, if the sum of two words give redundancy, it will add ‘1’ to the
summation result. Finally, it takes the 1’s complements for the final
summation that represent the value of checksum. the sender puts
checksum value into UDP (User Data Protocol) checksum field and then
transmit it. when the receiver receive the codeword (bit stream +
checksum value), computes checksum of received codeword. If the
Department of Computer Science 4 University of Babylon
Communication and Computer Networks Asst. Prof. Dr. Ali Kadhum Idrees
x r M (x) : Represent the polynomial frame after performs the first step of
algorithm on the transmitted frame (i.e., represent the frame that required
to be sent after adding zero r bit to its end).
T(x): represent the final transmitted frame.
NOTE: the addition and subtraction corresponding to XOR.
The following algorithm for computing the CRC:
1. Append r zero bits to the low-order end of the frame, so it now contains
m+r bits and corresponds to the polynomial x r M (x) .
2. Divide the bit string corresponding to G(x) into the bit string
corresponding to x r M (x) using modulo 2 divisions.
x r M ( x)
remainder , where the remainder is the division remainder in bits.
G ( x)
3. Subtract the remainder (which is always r or fewer bits) from the bit
string corresponding to x r M (x) using modulo 2 subtractions. The result
is the checksummed frame to be transmitted that called T(x).
T(x) = x r M (x) - remainder.
110011 110011
1001 110101000 1001 110101011
1001 1001
1000 1000
1001 1001
0011 0011
0000 0000
0110 0110
0000 0000
1100 1101
1001 1001
1010 1001
1001 1001
remainder 011 E= 0000
T(x) = x r M (x) - remainder
The received frame is correct.
110101000
-
011
T(x) = 110101011