由Richard Hamming于1950年提出的、目前还被广泛采用在网络传输等领域。

实现原理:在有效信息位中加入几个校验位形成海明码,使码距比较均匀的拉大,并把数据的每一个二进制位分配在几个奇偶校验组中。当某一位出错后,就会引起有关的几个校验组的值发生变化,这不但可以发现出错,还能指出是哪一位出错,为自动纠错提供了依据。

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/941a85ad-1ba0-41ae-8d23-d69b34a00dc4/3774D85A-2A24-43FA-AC22-E7C8E94A9862.png

能发现并纠正一位错误:$2^k \ge k+r+1$

能发现两位错误并纠正一位错误:$2^{r-1}\ge k+r$

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/aa0f4391-d88a-43d8-a5ad-ac4f6060c144/image8.png

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/44ba4b15-502c-411d-aa09-18bb4f409fa1/image9.png

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/b71745f7-87fd-4026-bbea-9f4189002ef5/image10.png

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/8f221eb3-e66c-46a0-b583-8cc5d5ec2d8a/image11.png

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/a458d5fe-23f1-4dc4-a07b-edaeba7e9eb0/image12.png

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/86eaf4eb-6ba7-4078-8479-11acb6d2e56c/image13.png

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/38bdefcc-8fcd-473b-9a6e-3655eb227edd/image14.png

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/8d60751d-d292-4d0e-89cc-d326b855b939/image15.png

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/aefd94ee-d710-4007-859b-92d246305410/image16.png

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/d30d5f1e-3732-42b0-8ab8-6eaed5c5ee7d/image17.png