Haiming code verification

Source: Internet
Author: User
Haiming code is a multiple (Duplex) parity check error system. It encodes the information in a logical form to detect and correct errors. All the transmitted code words used in the Haiming code are composed of the original information and the added parity bit. Each such parity bit is programmed at a specific location where the code word is transmitted. This system separates the wrong digits, whether in the original information bit or in the addition of the verification bit. Derive and use the Hamming code with m-bit length. The steps are as follows: 1. determine the minimum checkpoint K and mark them as D1, D2 ,... And DK. Each parity bit complies with different parity test rules. 2. The original information and K verification bits are combined into a new code word with M + k bits. Select the K check bit (0 or 1) to meet the required parity conditions. 3. perform the required K parity checks on the received information. 4. If all the parity check results are correct, the information is considered to be correct. If one or more errors are found, the error bit is uniquely identified by the results of these checks. One of the basic considerations when the number of digits of the verification digit is to determine the minimum number of digits required for verification. Considering the information with m-bit length, if K parity bits are appended, the total length sent is m + K. Perform K parity checks on the receiver. Each check result is either true or false. The result of this parity check can be expressed as a K-bit binary character, which can determine a maximum of 2 k different states. Among these States, all their parity tests must be true, which is the condition for determining the correct information. The remaining (2k-1) status can be used to determine the location of the error code. So export the next relationship: 2k-1 ≥ m + k codeword format theoretically, the check bit can be placed in any position, but it is customary that the check bit is arranged in 1, 2, 4, 8 ,... . Figure 5 lists the information bit and check bit distribution when m is 4 and K is 3.
Codeword location B1 B2 B3 B4 B5 B6 B7
Check bit X X   X      
Information bit     X   X X X
Compound codeword P1 P2 D1 P3 D2 D3 D4
Figure 5 determination of checkpoint and information location checkpoint in Haiming code K checkpoint is determined by parity check on M + k-bit compound codeword. Among them: P1 is responsible for verifying the 1st, 3, 5, 7 ,... (P1, D1, D2, D4 ,...) P2 verifies the 2nd, 3, 6, 7 ,... (P2, D1, D3, D4 ,...) (Including P2) P3 is responsible for verifying the 4th, 5, 6, 7 ,... (P3, D2, D3, D4 ,...) (Including P3 itself) for M = 4, K = 3, even verification examples, as long as the progressive parity test. These tests (represented by A, B, and C) are performed at the positions shown in figure 6.
Parity Condition Bitwise
1 2 3 4 5 6 7
ABC X X Xx X X Xx Xxx
Figure 6 the parity position can therefore obtain three verification equations and three formulas for determining the parity bit: A = B1 then B3 then B5 then B7 = 0 to P1 = D1 then D2 1_d4b = B2 then B3 then B6 then B7 = 0 to P2 = D1 then D3 then D4C = B4 then b5 1_b6 1_b7 = 0 P3 = D2 1_d3 1_d4 if the four-digit information code is 1001, the three formulas can be used to obtain the values of P1, P2, and P3. And hamming code, 7 indicates all the conditions of the Hamming code when the Information Code is 1001. In figure 8, all 16 types of information are listed (D1D2D3D4 = 0000 ~ 1111.
Codeword location B1 B2 B3 B4 B5 B6 B7
Bitwise type P1 P2 D1 P3 D2 D3 D4
Information Code - - 1 - 0 0 1
Check bit 0 0 - 1 - - -
The Hamming code after Encoding 0 0 1 1 0 0 1
Figure 7 Haiming code of four-digit information codes
P1 P2 D1 P3 D2 D3 D4
0 0 0 0 0 0 0
1 1 0 1 0 0 1
0 1 0 1 0 1 0
1 0 0 0 0 1 1
1 0 0 1 1 0 0
0 1 0 0 1 0 1
1 1 0 0 1 1 0
0 0 0 1 1 1 1
1 1 1 0 0 0 0
0 0 1 1 0 0 1
1 0 1 1 0 1 0
0 1 1 0 0 1 1
0 1 1 1 1 0 0
1 0 1 0 1 0 1
0 0 1 0 1 1 0
1 1 1 1 1 1 1
Figure 8 Haiming codes with unencoded information are processed by the sender on the receiver. You can also perform the same parity test based on the three verification equations: A = B1 then B3 then B5 then B7 = 0; B = B2 then B3 then B6 then B7 = 0; C = B4 then B5 then B6 then B7 = 0. If all three verification equations are true, that is, the right side of the equation is equal to 0, there is no error. If the right side of the equation is not equal to 0, it indicates a mistake. From the value on the right of the three equations, you can judge the error. For example, if the 3rd-bit number is reversed, C = 0 (this equation does not have B3), A = B = 1 (the two equations have B3 ). The binary CBA can be formed, and A is the lowest valid bit. Then, the error location can be simply pointed out using the binary CBA = 011. Similarly, if the value on the right of the three equations is 001, a 1st-bit error occurs. If the value on the right of the three equations is 100, a 4th-bit error occurs. The Hamming code distance should be 3, so one error can be corrected. The gap between the parity code is 2. Only one error can be found, but it cannot be corrected (the dislocation is unknown ). The unverified code margin is 1, which is still valid after any error occurs, so no error can be found. This is a classic saying about the Haiming code, that is, the code distance is 3, and two digits can be found, or the 1 dislocation can be corrected. 2k-1 ≥ m + k. However, in the computer Composition and Structure edited by Wang aiying of Tsinghua University (the book has become the Authority in China), the author also proposed a four-digit hamming code, which can be found in two places, and 1 dislocation is corrected. Should meet 2 (k-1) ≥ m + k. From http://yardbird2005.spaces.live.com/blog/cns! E0A5B10FEAFEB3F2! 128. entry

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.