从数的最左边开始,并标记为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. C# Socket服务端及多客户端连接通信实现

    服务端代码(控制台示例): static List<Socket> Sockets = new List<Socket>(); static void Main(string[ ...

  2. ArcGIS Engine能够做什么?

    转自原文ArcGIS Engine能够做什么? ArcGIS Engine是一组跨平台的嵌入式ArcObjects,它是ArcGIS软件产品的底层组件,用来构建定制的GIS和桌面制图应用程序,或是向原 ...

  3. 基于二叉树和双向链表实现限制长度的最优Huffman编码

    该代码採用二叉树结合双向链表实现了限制长度的最优Huffman编码,本文代码中的权重所有採用整数值表示.http://pan.baidu.com/s/1mgHn8lq 算法原理详见:A fast al ...

  4. [C/C++标准库]_[0基础]_[使用fstream合并文本文件]

    场景: 1. 就是合并文本文件,而且从第2个文件起不要合并第一行. 2. 多加了一个功能,就是支持2个以上的文件合并. 3. 问题: http://ask.csdn.net/questions/192 ...

  5. 42.管道,cmd执行指令写到管道中

    #define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include <stdlib.h> #include <stri ...

  6. Sparse Coding: Autoencoder Interpretation

    稀疏编码 在稀疏自编码算法中,我们试着学习得到一组权重参数 W(以及相应的截距 b),通过这些参数可以使我们得到稀疏特征向量 σ(Wx + b) ,这些特征向量对于重构输入样本非常有用. 稀疏编码可以 ...

  7. Linux下关机命令的区别 (halt,poweroff,reboot,shutdown,init)

    1.shutdown shutdown命令安全地将系统关机.    而在系统关机前使用shutdown命令﹐系统管理员会通知所有登录的用户系统将要关闭.并且login指令会被冻结﹐即新的用户不能再登录 ...

  8. PatentTips - Control register access virtualization performance improvement

    BACKGROUND OF THE INVENTION A conventional virtual-machine monitor (VMM) typically runs on a compute ...

  9. [Angular & Unit Testing] Testing a RouterOutlet component

    The way to test router componet needs a little bit setup, first we need to create a "router-stu ...

  10. golang panic and recover

    panic 是一个内置函数,当一个函数 F 调用 panic,F 的执行就会停止,F 中 deferred 函数调用会被执行,然后 F 返回控制到它的调用者.这个过程会沿着调用栈执行下去,直到当前 g ...