当前位置:网站首页>1.16 - check code

1.16 - check code

2022-07-06 03:23:00 It's Li sticky duck

Catalog

One 、 Relevant concepts

1、 Error detection

2、 error correction

3、 Yardage

Two 、 Parity check

1、 Examination site

2、 Odd check

3、 Even check

3、 ... and 、CRC( Cyclic redundancy check )

1、 Examination site

2、 principle

3、 Definition

Four 、 Haiming code

1、 Examination site

2、 Definition

3、 principle

4、 The relationship between the number of check bits and data bits

5、 ... and 、 Test method 1: Characteristics of various check codes


One 、 Relevant concepts

1、 Error detection

  • Errors can be found through information ;
  • Illustrate with examples - The code distance is 1、 The code distance is 2:

(1) For example, the data transmitted is 0 and 1, These are two legal codes , from 1 The switch to 0 You only need to convert one bit code , At this time, it is impossible to detect errors , That is, the code distance is 1 It is impossible to detect errors ;

(2) But if use 00 Express 0,11 Express 1, take 00 Switch to 11 Need to change two , If at this time 00 become 01, The system can check for errors , The existing code distance is 2 Error detection can be carried out ;

  • Illustrate with examples 2- The code distance is 2

(1) Blue on the first floor 1 Conference room ; Red on the second floor 2 Conference room ;

(2) if : Go to the blue 2 Conference room , The system cannot check for errors ; Because blue and 2 Conference room is full of correct information ;

2、 error correction

  • Find the error , And correct the error ;

  • Illustrate with examples - The code distance is 2

(1) For example, the data transmitted is 00 and 11(00 Corresponding decimal system 0,11 Corresponding decimal system 1), If you want to 0 convert to 1, You need to 00 convert to 11;

(2) Then in the process of conversion, if 01, You can check for errors ;

(3) However, it is impossible to judge that this is going to 00 turn 11, Or will it 11 turn 00, So I'm not sure about the modification 01 Medium 0 still 1;

(4) So the code distance is 2 Time cannot be corrected ;

  • Illustrate with examples - The code distance is 3

(1) For example, the data transmitted is 000 and 111(000 Corresponding decimal system 0,111 Corresponding decimal system 1), If you want to 0 convert to 1, You need to 000 convert to 111;

(2) Then in the process of conversion, if 011, You can check for errors ;

(3) You can also judge , This is to 000 Convert to 111, So it will 011 Medium 0 Corrected to 1;

(4) So the code distance is greater than or equal to 3 when , You can correct it ;

  • Illustrate with examples 3- The code distance is 3:

(1) Blue on the first floor 1 Conference room ; Red on the second floor 2 Conference room ;

(2) if : Go to the blue one on the first floor 2 Conference room , At this point, the system can check the error , The first floor and the blue ones are the correct information , Only the name of the conference room is wrong , It will be automatically corrected to blue on the first floor 1 Conference room ;

3、 Yardage

  • The distance between two legal codes ;

  • It will affect error correction and detection ;

Two 、 Parity check

1、 Examination site

  • Coding mechanism ;

2、 Odd check

  • Only error detection , Can be detected 1( Odd number ) Dislocation ;

  • Illustrate with examples

(1) For example, transmitting data 001, When performing odd check , A check bit will be added before the highest bit , Make the coding system 1 The number of is odd ;

(2)001 in , Yes 1 individual 1, So add 0, Turn into 0001;

(3) If at this time 0001 become 0101, Odd check will find ,1 The number of is not odd , So we can check the error ;

(4) In fact, by adding the check digit , Divide the data into verification part and data part , So when the data changes , Both the verification part and the data part of the data will change ; At this time, the code distance is 2, Therefore, errors can be detected ;

3、 Even check

  • Only error detection , Can be detected 1( even numbers ) Dislocation ;

  • Illustrate with examples

(1) For example, transmitting data 001, When performing parity check , A check bit will be added before the highest bit , Make the coding system 1 The number of is even ;

001 in , Yes 1 individual 1, So add 1, Turn into 1001, bring 1 The number of becomes 2 individual ;

If at this time 1001 become 1101, Even check will find ,1 The number of is not even , So we can check the error ;

3、 ... and 、CRC( Cyclic redundancy check )

1、 Examination site

  • Data structure ;

  • model 2 except ;

  • In the soft exam, I think CRC Error correction is not allowed, only error detection , because CRC Not 100% error correction ; Only when the generated polynomial design is perfect , In order to correct the error ;

2、 principle

  • Use data and generated polynomials as modules 2 In addition to the operation , Check bits are generated , Write the check bit and the data bit together to produce a code ( Data bits in front , The check digit is after );

3、 Definition

  • Only error detection , Detectability is mostly wrong ;

Four 、 Haiming code

1、 Examination site

  • characteristic ;

  • The relationship between check bits and data bits ;

2、 Definition

  • Error detection , And it can be corrected ;

  • Correct 1 Dislocation or dislocation ;

3、 principle

  • In the whole coding n Set the check bit at the power position , Error correction of multiple positions can be realized ;

4、 The relationship between the number of check bits and data bits

  • k: Check bit
  • n: Data bits
  • for example : The data is 48 position , that k The value of should be 6 ;

5、 ... and 、 Test method 1: Characteristics of various check codes

原网站

版权声明
本文为[It's Li sticky duck]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/187/202207060310507076.html