Definimos:
T = trama a transmitir (k + n), n < k M = mensaje de k bits, los primeros k bits de T F = FCS de n bits, los ltimos n bits de T P = patrn de n + 1 bits, divisor predeterminado.
R es siempre un bit menor que el divisor P. Usando a R como nuestro FCS (F), tenemos: T = 2n M + R
__ ________ T 2nM + R =
P P
__ T = ___ 2nM + __ R =
P P P
R + __ R + __ P P
__ T =
P
Ejemplo: 1. Dado :
Mensaje M = 1010001101 (10 bits) Patrn P = 110101 (6 bits) n + 1 FCS R = a calcular (5 bits) n k
2.
3.
1
1 0
0
1 1 1 0
1
0 1 1 0
0
1 1 0 1 1 0
0
0 0 1 1 1 0
0
1 1 0 1 0 1 1 0
2nM
1 1 0 1 1 1 0 1 0 1 0 1 1 0 0 1 1 1 0 1 1 1 0 1 0 1 0 1 1 0 0 1 1 1 0 0 0 0 0 0 1 1 0 1 1 0 1 0 1 1 0
4.
5.
R = 01110 es sumado a 2n M para obtener: T=101000110101110 el cual es transmitido. Si no hay errores de transmisin, el receptor recibe T intacto. La trama es dividida entre P.
1 1 0 1 0 1 0 1 1 0
1
1 0
0
1 1 1 0
1
0 1 1 0
0
1 1 0 1 1 0
0
0 0 1 1 1 0
0
1 1 0 1 0 1 1 0
1 1 0 1 1 1 0 1 0 1 0 1 1 0 0 1 1 1 0 1 1 1 0 1 0 1 0 1 1 0 0 1 1 1 0 0 0 1 0 1 1 0 1 1 0 0 0 1 1 0 0
El patrn P debe de ser 1 bit mayor qu el FCS deseado. El patrn depende de los tipos de error esperados. Por lo menos el bms y el bMs de P deben ser 1
REPRESENTACIN PILINOMIAL M = 110011; M (x) = x5 + x4 + x + 1 P = 11001; P (x) = x4 + x3 + 1 El clculo de T quedara:
1.
2.
xn M(x) _____
Q(x)
R (x) ____
x5 + x4 + x2 + 1
x9 + x8 + x6 + x4 + x2 + x x14 + x12+ x8 + x7 + x5 x14 + x13+ x11 + x9 x13 + x12+ x11 + x9 + x8 + x7 + x5 . x13 + x12+ x10 + x8 x11 + x10 + x9 + x7 + x5 . x11 + x10 + x8 + x6 x9 + x8 + x7 + x6+ x5 x9 + x8 + x6 + x4 x7 + x5 + x4 x7 + x6 + x4 + x 2 x6+ x5 + x2 x6+ x5 + x3 +x + x 3 + x2 + x
R= x3 + x2 + x
T= x14 + x12+ x8 + x7 + x5+ x3 + x2 + x
x5 + x4 + x2 + 1
x9 + x8 + x6 + x4 + x2 + x x14 + x12+ x8 + x7 + x5 + x3 + x2 + x x14 + x13+ x11 + x9 x13+ x12+ x11 + x9 + x8 + x7 + x5 x13+ x12 + x10 + x8 x11+ x10 + x9 + x7 + x5
+ x3 + x2 + x
.
+ x3 + x 2 + x
.
x11+ x10
+ x8
+ x6
.
Los polinomios generadores ms comunes son: CRC 12 = x12 + x11 + x3 + x2 + x + 1 CRC 16 = x16 + x15 + x2 + 1 CRC CCITT = x16 + x12 + x5 + 1 CRC 32 = x32 + x26 + x23 + x22 + x16 + x12 + x11 + x10 + x8 + x7
+ x5 + x4 + x2 + x + 1
CHEQUEO DE PARIDAD Se agrega un bit de paridad al final de una secuencia de bits. V.g. transmisin del cdigo ASCII. Cada carcter es representado por 7 bits; el octavo bit es de paridad. Paridad par La palabra de 8 bits tiene un nmero par de 1s Paridad impar La palabra de 8 bits tiene un nmero impar de 1s Ejemplo: Transmisin con paridad impar ASCII G (1110001) Palabra a transmitir 1110001 1
LRL y VRL Verificacin de redundancia longitudinal (LRC) Cerificacin de redundancia Vertical (VRC)
bit 1 bit 2 b12 b22 bit n b1n b2n LRC LRC1 LRC2 n+1 = m= nmero de caracteres nmero de bits incluyendo el bit de paridad a transmitir.
Carcter 1 Carcter 2
b11 b21
Carcter m VRC
bm1 VRC1
bm2 VRC2
bmn VRCn
LRCm
LRC1 = b11 + b12 + ..... + b1n LRC2 = b21 + b22 + ..... + b2n LRCm = bm1 + bm2 + ..... + bmn
LRCi = b11 + b12 + + b1n 1<= i <= m
VRC1 = b11 + b12 + ..... + bm1 VRC2 = b21 + b22 + ..... + bm2 VRCn = b1n + b2n + ..... + bmn VRCi = b1i + b2i + + bmi 1<= i <= n
VRC n+1 = LRC m+1 VRC n+1 = VRC 1 + VRC 2 + .. + VRC n LRC m+1 = LRC 1 + LRC 2 + .. + LRC m
Ejemplo:
1 1 0
0 1 0
1 0 1
1 1 1
0 0 1
1 1 0
1 1 1
1 1 0
1
1
1
0
1
0
1
0
0
1
0
0
0
1
0
1
0
0
1
1
0
1
1
1
1
1
1
1
1
1
1
0