从数的最左边开始,并标记为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的更多相关文章

  1. CodeForces 527B Error Correct System

    Error Correct System Time Limit:2000MS     Memory Limit:262144KB     64bit IO Format:%I64d & %I6 ...

  2. CF Error Correct System

    Error Correct System time limit per test 2 seconds memory limit per test 256 megabytes input standar ...

  3. Error Correct System(模拟)

     Error Correct System Time Limit:2000MS     Memory Limit:262144KB     64bit IO Format:%I64d & %I ...

  4. 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 ...

  5. 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 ...

  6. 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 ...

  7. 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 ...

  8. windows 部署 git 服务器报 Please make sure you have the correct access rights and the repository exists.错误

    这两天在阿里云上弄windows 服务器,顺便部署了一个git服务.根据网上教程一步步操作下来,最后在 remote远程仓库的时候提示 fatal: 'yourpath/test.git' does ...

  9. [LeetCode] Total Hamming Distance 全部汉明距离

    The Hamming distance between two integers is the number of positions at which the corresponding bits ...

随机推荐

  1. BZOJ——1012: [JSOI2008]最大数maxnumber || 洛谷—— P1198 [JSOI2008]最大数

    http://www.lydsy.com/JudgeOnline/problem.php?id=1012|| https://www.luogu.org/problem/show?pid=1198 T ...

  2. vue -- config.js 配置跨域文件

    1.在使用vue开发的时候经常要涉及到跨域的问题,其实在vue cli中是有我们设置跨域请求的文件的. 2.当跨域无法请求的时候我们可以修改工程下config文件夹下的index.js中的dev -- ...

  3. asp.net大数据导出execl实现分开压缩并下载

    asp.net大数据导出execl实现分开压缩并下载 /// <summary> /// 导出数据到EXCEL 多个表的 /// </summary> /// <para ...

  4. POJ 1991 DP

    题意: 思路: 考虑DP 先把事件按照地点顺序排个序 f[i][j][0]表示从i到j还没有去过 现在在i f[i][j][1]表示从i到j还没有去过 现在在j 那么方程就呼之欲出了 f[i][j][ ...

  5. js对象基础写法练习

    <!doctype html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  6. Intellij IDEA 部署Web项目,解决 404 错误

    https://blog.csdn.net/eaphyy/article/details/72513914

  7. init进程

    2.Linux下的三个特殊进程 Linux下有三个特殊的进程idle进程(PID=0),init进程(PID=1),和kthreadd(PID=2)idle进程由系统自动创建,运行在内核态idle进程 ...

  8. Css学习总结(1)——20个很有用的CSS技巧

    1. 黑白图像 这段代码会让你的彩色照片显示为黑白照片,是不是很酷? img.desaturate { filter: grayscale(100%); -webkit-filter: graysca ...

  9. android基于开源网络框架asychhttpclient,二次封装为通用网络请求组件

    网络请求是全部App都不可缺少的功能,假设每次开发都重写一次网络请求或者将曾经的代码拷贝到新的App中,不是非常合理,出于此目的,我希望将整个网络请求框架独立出来,与业务逻辑分隔开,这样就能够避免每次 ...

  10. Input File选择图片后,未保存预览

    今天实现上传图片到服务器 简单的jQuery实现input file选择图片后,可以预览图片的效果 简单的HTML代码: <div> <img src="" cl ...