Soft test - check code

check code

Check code basics

Code distance: any kind of code consists of many code words, and the binary digits with the least change between any two code words are called the code distance of the data check code

For example: use 4-bit binary to represent 16 states, then there are 16 different code words, at this time the code distance is 1. Such as 0000 and 0001

Parity

Odd parity: the number of "1" in the entire check code (valid information and parity bit) is odd Even
parity: the number of "1" in the entire check code (effective information and parity bit) is an even number

Parity check, can check 1 bit (odd number) error, not error correctable

CRC Cyclic Redundancy Check Code

CRC check, error detectable, not error correctable

Coding method: splicing r-bit check codes after k-bit information codes.
Divide the received CRC code with the agreed generator polynomial G(X) (modulo two division, if correct, the remainder is 0; if a certain bit is wrong, the remainder is not 0

Hamming check code

Add several parity bits to effective information bits to form a Hamming code, so that the code distance is more evenly enlarged, and each binary bit of the Hamming code is assigned to several parity groups. When a certain bit is wrong, it will cause the value of several related parity bits to change, which can not only find the error, but also point out the location of the error, providing a basis for automatic error correction
2^r >= m+r +1
insert image description here

Guess you like

Origin blog.csdn.net/weixin_47020721/article/details/129600274