The understanding calculation of the sea-plaintext

Source: Internet
Author: User

Sea-PlainText ( Hamming Code ) is an error-correcting code that can have multiple check bits, which detects and corrects a bug, so it is only used in environments with better channel characteristics, such as Ethernet, because if the channel characteristics are not good, the error is usually not one.

The basic idea of error detection and correction of sea-codes is that the effective information is divided into several groups according to a certain rule, each group arranges a parity test, then produces multiple bits of detection information, and obtains the specific error position from it, and finally passes the inverse of the error bit (originally 1 will become 0 , turned out to be 0 will become 1 ) to correct it.

According to the error correction principle of the sea-codes, it is obtained:


m+k+1<=2k

among them: m indicates the number of valid information bits; k represents the number of bits used for error correction. The above formula is satisfied to correct the error.

For example, suppose a set of information codes is: 1101 0111 0 , how to calculate the sea-plaintext?

I. Determine the number of redundant digits for error correction

m=9 , then, 9+k+1<=2k , which results in k=4 , which means to populate the original valid information bit 4bit binary.

Second, the calculation of redundant filling bits

4 a bit the redundant bits are populated in accordance with the principle of the sea 2n position, i.e. 1 , 2 , 4 , 8 ... The position. This results in the following form

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/7D/8F/wKioL1bqzsCgJJo5AACZfiv-BXA630.jpg "title=" 54.jpg "alt=" Wkiol1bqzscgjjo5aaczfiv-bxa630.jpg "/>

The relationship between information bits and redundant bits is organized into a table as follows.

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/7D/8F/wKioL1bqzzfSDwo7AADgt80wGBw195.jpg "title=" 55.jpg "alt=" Wkiol1bqzzfsdwo7aadgt80wgbw195.jpg "/>

This concludes:

1 3 Span style= "FONT-SIZE:19PX;" >5 7 9 11 13

2 3 Span style= "FONT-SIZE:19PX;" >6 7 10 11 participate in validation

4 5 Span style= "FONT-SIZE:19PX;" >6 7 12 13 participate in validation

Section 8 a redundant bit by 9 , Ten , One , A , - participate in the validation

If all of the results are calculated as the parity :

650) this.width=650; "src=" http://s4.51cto.com/wyfs02/M02/7D/8F/wKioL1bqz46BHtTIAADHLZ7leCk954.jpg "title=" 56.jpg "alt=" Wkiol1bqz46bhttiaadhlz7leck954.jpg "/>

This can be understood as:

Section 1bit bit: B1 ⊙ B3 ⊙ B5 ⊙ B7 ⊙ B9 ⊙ B11 ⊙ b13=0 ⊕1⊕1⊕1⊕0⊕1⊕0=0

2bit b2 ⊕ B3 ⊕ b6 b7 ⊕ B10 ⊕ b11 =0 Span style= "font-size:19px;font-family: ' The song Body '; >⊕1⊕0⊕1⊕1⊕1=0

4bit b4 ⊕ B5 ⊕ b6 b7 ⊕ B12 ⊕ b13 =1 Span style= "font-size:19px;font-family: ' The song Body '; >⊕1⊕0⊕1⊕1⊕0=0

Section 8bit bit: B8 ⊙ B9 ⊙ B10 ⊙ B11 ⊙ B12 ⊙ B13 =1 ⊕0⊕1⊕1⊕1⊕0=0

We call the above 4 formulas a supervisory relationship.

In other words, the checksum of the original information to do the same or calculate the results of the parity calculation is all 0 .

Therefore, this 4 a bit The redundancy bits are: 0011

Third, information verification

Suppose there is an error in the data, we assume this is the 10 bit in transit by 1 Span style= "font-size:19px;font-family: ' The song Body '; It became the 0 wrong, so the above 4

1bit b1 ⊕ B3 ⊕ b5 b7 ⊕ B9 ⊕ b11 b13=0 ⊕1⊕1⊕1⊕0⊕1⊕0 =0

2bit b2 ⊕ B3 ⊕ b6 b7 ⊕ B10 ⊕ b11 =0 Span style= "font-size:19px;font-family: ' The song Body '; >⊕1⊕0⊕1⊕0⊕1=1

4bit b4 ⊕ B5 ⊕ b6 b7 ⊕ B12 ⊕ b13 =1 Span style= "font-size:19px;font-family: ' The song Body '; >⊕1⊕0⊕1⊕1⊕0=0

Section 8bit bit: B8 ⊙ B9 ⊙ B10 ⊙ B11 ⊙ B12 ⊙ B13 =1 ⊕0⊕0⊕1⊕1⊕0=1

From This we can see that1and the4The formula is not wrong, but2and the8An error has occurred and thisB3,B6,B7,B10,B11,B9,B12,B13may be misplaced, but from1and the4bit can be seen that the correct bit is:B3,B5,B7,B9,B11,B13,B6,B12, remove the correct one from the bits that are likely to go wrong, leaving theB3,B6,B7,B10,B11,B9,B12,B13(The red Word is the bit removed), so that only the firstTenbit, so we putTenThe correct information is obtained by reversing.

Have such a problem:

Use the Hamming code for forward error correction, if the redundancy is 4 bits, then the information bit can be used up to how many bits? Assume that the code bit A6 A5 A4 A3 A2 A1 A0, and has the following supervisory relationship:

S2=a2+a4+a5+a6

S1=a1+a3+a5+a6

S0=a0+a3+a4+a6

If s2s1s0=110, then indicate the dislocation is which one?

Answer: can use 11 bit; A5 bit error

Not written well, please advise!!!

This article is from the Web Learning Notes blog, so be sure to keep this source http://cdlaowang.blog.51cto.com/5022872/1752369

The understanding calculation of the sea-plaintext

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.