Soft notes of the test parity check code, Hamming code check and CRC check code

1. parity

Odd parity codes are guaranteed a piece of data occurs an odd number.

The two codewords 00 and 01, to ensure the required odd parity, these two codewords can be added to . 1 00 and 0 01.

Even parity is an even number to ensure a piece of data occurs.Here Insert Picture Description

2. Hamming code

The disadvantages of using parity check code is only to check the whole data, and can not be verified locally, so the introduction of plain sea.

** Hamming code design: packet checksum ** -> a plurality of check bits -> parity bit error location indicated.

Provided information bits n, parity bit k, parity formula: 2 ^ K> = n-K + +. 1 .

Here Insert Picture Description
Note : the parity bit for an on position Pi (i-1) of the 2 ^.

How checksum bit **?

The Hamming code bits: 2 7 = 2 + 2 1 + 2 0,6 2 = 2 + 2 1,5 2 = 2 + 2 0,3 2 = 1 + 2 ^ 0, index represents the weight P3, P2, P1 .

Here Insert Picture Description
P1 = 0, P2 = 1, P3 = 0; Ruhai Ming fill the parity bit position;
Here Insert Picture Description

Correction

Here Insert Picture Description
The exclusive itself or, if the correct representative of all 0, is obtained if the second location 010 illustrate errors, which can be inverted.

CRC checksum

Here Insert Picture Description

  1. k-bit information bit, R bit parity check code bits N = K + R.

  2. After the shift information code becomes 101001 000

  3. With the remainder after shifting information code 101 001 000 1101 In addition to the binary code is the checksum. FIG follows:
    Here Insert Picture Description
    . ** 4 Correction: ** received CRC code obtained by dividing the remainder bits 1101 is 000, then correctly.

Published 11 original articles · won praise 1 · views 1283

Guess you like

Origin blog.csdn.net/superman_lile/article/details/105377390