unsigned short cksum(unsigned short *addr, int count) { /*Compute Internet Checksum for “count” bytes * beginning at location “addr”. */ register long sum = 0; while ( count > 1 ) { /* This is the inner loop*/ sum += *addr++; coun t -=2; } /* Add left-over byte, if any if ( count > 0 ) sum += *addr;
*/
/* Fold 32-bit sum to 16 bits */ while (sum >>16) sum = (sum & 0xffff) + (sum >> 16) ; }
Leon-Garcia/Widjaja
return ~sum;
Communication Networks
Figure 3.65
(x 7 + x 6 +1) + (x 6 + x 5 ) = x 7 + (1 +1)x 6 + x 5 +1
Addition:
= x 7 + x 5 +1 Multiplication:
2
3
x3 + x2 + x Division: divisor 3 35 ) 122 105 17
Leon-Garcia/Widjaja
2
2
3
(x + 1)(x + x + 1) = x + x + x + x + x + 1 = x + 1
x3 + x + 1 ) x6 + x5 x6 +
= q(x) quotient dividend
x4 + x3 x5 + x4 + x3 x5 + x3 + x2 x4 + x4 +
x2 x2 + x x
Communication Networks
= r(x) remainder Figure 3.66
Steps: 1. Multiply i(x) by xn-k (puts zeros in (n-k) low order positions) Quotient Remainder xn-ki(x) = g(x) q(x) + r(x)
g(x) has degree n-k; g(x) cannot divide d(x) if deg(g(x))> deg(d(x)) z z
z
L = (n-k) or less: all will be detected L = (n-k+1): deg(d(x)) = deg(g(x)) i.e. d(x) = g(x) is the only undetectable error pattern, fraction of bursts which are undetectable = 1/2L-2 L > (n-k+1): fraction of bursts which are undetectable = 1/2n-k
Leon-Garcia/Widjaja
Communication Networks
Figure 3.72
(a) Single bit input (Transmitter) b
+
r (Receiver)
e Error pattern (b) Vector input (Transmitter) b
+
r (Receiver)
e Error pattern
Leon-Garcia/Widjaja
Communication Networks
Figure 3.73
1011100 s=He= 1101010 0111001
1011100 s=He= 1101010 0111001
1011100 s=He= 1101010 0111001
Leon-Garcia/Widjaja
0 0 1 0 0 0 0 0 1 0 0 1 0 0
1
Single error detected
= 0 1
0 1 = 1 + 0 = 1 0
1 1 1 1 0 = 1 + 0 0 0 0
0 1 + 1
Communication Networks
1 1 1
1 0 = 0 1
Double error detected
Triple error not detected
Figure 3.74
s = H r = He 7p s=0
s=0
No errors in transmission (1–p)7
Leon-Garcia/Widjaja
1–3p
Undetectable errors 7p3
Correctable errors 7p(1–3p)
Communication Networks
3p Uncorrectable errors 21p2
Figure 3.75
b1
o
o
o
o
b2
Set of all n-tuples within distance t
Set of all n-tuples within distance t
t=2
Leon-Garcia/Widjaja
Communication Networks
Figure 3.76
L codewords written vertically in array; then transmitted row by row
b1
b2
b3
b4
b1
b2
b3
b4
A long error burst produces errors in two adjacent rows
in Africa, whereas, the illiteracy rate, the number of telephone lines and the ... Pigato (2001) reviews aspects of the legal, business, and economic environment for FDI in sub-Saharan Africa and ... The coefficients of the education level variables
Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. Higher Ed Service Area.pdf. Higher Ed Service Area.pdf. Open.
A public school teacher can be female and 25 years old. 11. ... A male can be a nursing major. 25. (a) 0.461. (b) 0.762. (c) 0.589 ...... Educational attainment. Status. Not a high school graduate. High school graduate. Some college, no degree. Assoc
Guided Reading & Analysis: Colonial Society. Chapter ... Skim: Flip through the chapter and note titles and subtitles. Look at ... contact. Population Growth... European Immigrants... English... German... Scots-Irish. ... chapter 3.pdf. chapter 3.pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. Results Figures OMG 3-26-15 PDF.pdf. Results Figures OMG 3-26-15 PDF.pdf. Open. Extract. Open with. Sign In.
played a significant part in the development of the standard model. ... In a Rutherford scattering experiment, a beam of alpha particles is fired at a sheet of.