Hamming correct
从数的最左边开始,并标记为1
将2的平方的位置留出来,做为校验位例如,8位2进制数10011010===>_ _ 1 _ 0 0 1 _ 1 0 1 0
位置1用来校验最右边的位位1的位置1 3 5 7 9 11标记为_ _ 1 _ 0 0 1 _ 1 0 1 0
因此校验位为0 即得到0 _ 1 _ 0 0 1 _ 1 0 1 0
位置2用来校验最右边数第2位1的位置2 3 6 7 10 11标记为_ _ 1 _ 0 0 1 _ 1 0 1 0
因此校验位为1 即得到0 1 1 _ 0 0 1 _ 1 0 1 0
位置4用来校验最右边数第3位1的位置4 5 6 7 12标记为_ _ 1 _ 0 0 1 _ 1 0 1 0
因此校验位为1 即得到0 1 1 1 0 0 1 _ 1 0 1 0
位置8用来校验最右边数第4位1的位置8 9 10 11 12标记为_ _ 1 _ 0 0 1 _ 1 0 1 0
因此校验位为0 即得到0 1 1 1 0 0 1 0 1 0 1 0
在末尾加一位全部位校验位,即可实现double error detecting
Hamming correct的更多相关文章
- CodeForces 527B Error Correct System
Error Correct System Time Limit:2000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I6 ...
- CF Error Correct System
Error Correct System time limit per test 2 seconds memory limit per test 256 megabytes input standar ...
- Error Correct System(模拟)
Error Correct System Time Limit:2000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I ...
- Error Correct System CodeForces - 527B
Ford Prefect got a job as a web developer for a small company that makes towels. His current work ta ...
- Codeforces Round #296 (Div. 2) B. Error Correct System
B. Error Correct System time limit per test 2 seconds memory limit per test 256 megabytes input stan ...
- B. Error Correct System (CF Round #296 (Div. 2))
B. Error Correct System time limit per test 2 seconds memory limit per test 256 megabytes input stan ...
- Codeforces Round #296 (Div. 2B. Error Correct System
Ford Prefect got a job as a web developer for a small company that makes towels. His current work ta ...
- windows 部署 git 服务器报 Please make sure you have the correct access rights and the repository exists.错误
这两天在阿里云上弄windows 服务器,顺便部署了一个git服务.根据网上教程一步步操作下来,最后在 remote远程仓库的时候提示 fatal: 'yourpath/test.git' does ...
- [LeetCode] Total Hamming Distance 全部汉明距离
The Hamming distance between two integers is the number of positions at which the corresponding bits ...
随机推荐
- qt程序实现打开文件夹
QString path=QDir::currentPath();//获取程序当前目录 path.replace("/","\\");//将地址中的" ...
- azure云中 mount: wrong fs type, bad option, bad superblock on /dev/sdc1
2016-01-30 mount失败问题解决 [root@mofficedb2 ~]# mount /dev/sdc /dta mount: you must specify the filesyst ...
- hdoj-1016-Prime Ring Problem【深搜】
Prime Ring Problem Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) ...
- SpringMVC的注解方式
mvc-servlet.xml <?xml version="1.0" encoding="UTF-8"?> <beans xmlns=&qu ...
- 洛谷P1722 矩阵 II
题目背景 usqwedf 改编系列题. 题目描述 如果你在百忙之中抽空看题,请自动跳到第六行. 众所周知,在中国古代算筹中,红为正,黑为负…… 给定一个1*(2n)的矩阵(usqwedf:这不是一个2 ...
- C++标准库概述
一.C++标准库的主要组件: 1.标准C库 2.I/O流技术(对标准输入输出设备称为标准I/O,对在外磁盘上文件的输入输出称为文件I/O,对内存中指定的字符串存储空间的输入输出称为串I/O) 3.st ...
- UITouch 的使用
直接上代码: touch 的四大状态.: // // TouchView.m // UI_practice_04 // // Created by lanouhn on 15/4/22. // Cop ...
- HDU 3072--Intelligence System【SCC缩点新构图 && 求连通全部SCC的最小费用】
Intelligence System Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Othe ...
- 微软自拍应用iOS版公布
微软自拍(Microsoft Selfie)主要是支持自拍后还能加强自拍效果的功能. 只是和其它自拍应用不同的是.Microsoft Selfie 利用了机器学习来增强照片,应用会"考虑年龄 ...
- erroe:plot.new() : figure margins too large
使用R时多次出现这个错误,plot.new() : figure margins too large,提示图片边界太大 解决方法,win.graph(width=4.875, height=2.5,p ...