Beruflich Dokumente
Kultur Dokumente
Repetition code
Parity bit
7 bits of data (number of 1s) 0000000 (0) 8 bits including parity even 00000000 odd 10000000
1010001 (3)
1101001 (4) 1111111 (7)
11010001
01101001 11111111
01010001
11101001 01111111
Checksum
Checksum algorithms
Parity byte or word Modular sum
11010011101100 000 <--- input left shifted by 3 bits 1011 <--- divisor 01100011101100 000 <--- result 1011 <--------------------- divisor ... 00111011101100 000 1011 00010111101100 000 1011 00000001101100 000 1011 00000000110100 000 1011 00000000011000 000 1011 00000000001110 000 1011 00000000000101 000 1011 ----------------- ------------00000000000000 100 <---remainder (3 bits)
Block code
Hamming weight (number of weights) Minimum distance dmin = code block length data block length. Number of detected errors = dmin 1 Number corrected errors = (dmin 1)/2
Decoding Matrix R
Pr = R * r
Hamming(7,4)
Encodes 4 bits of data into 7 bits by adding 3 parity bits.
d1 p1 p2 p3
Yes No
d2
No
d3
No
d4
Yes Ye
Yes Yes
Yes Yes
Yes Yes
Example: Encoding:
Convolutional code
n1 = m1 + m0 + m-1 n2 = m0 + m-1 n3 = m1 + m-1.
Trellis diagram:
This diagram gives us an idea about decoding: if a received sequence doesn't fit this graph, then it was received with errors, and we must choose the nearest correct (fitting the graph) sequence. The real decoding algorithms exploit this idea.