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 ...
随机推荐
- Python标准库:内置函数ascii(object)
这个函数跟repr()函数一样,返回一个可打印的对象字符串方式表示.当遇到非ASCII码时,就会输出\x,\u或\U等字符来表示. 与Python 2版本号里的repr()是等效的函数. 样例: #a ...
- OCP-1Z0-051-题目解析-第26题
26. Which is the valid CREATE TABLE statement? A. CREATE TABLE emp9$# (emp_no NUMBER (4)); B. CRE ...
- Hive总结(五)hive日志
日志记录了程序执行的过程.是一种查找问题的利器. Hive中的日志分为两种 1. 系统日志,记录了hive的执行情况,错误状况. 2. Job 日志,记录了Hive 中job的运行的历史过程. 系统日 ...
- LinkedIn Cubert 实践指南
· LinkedIn Cubert安装指南 · Understanding Cubert Concepts(一)Partitioned Blocks · Understanding Cubert Co ...
- javafx tabPane
public class EffectTest extends Application { @Override public void start(Stage primaryStage) { prim ...
- Exercise: PCA in 2D
Step 0: Load data The starter code contains code to load 45 2D data points. When plotted using the s ...
- c# for 和 foreach
1给定长度 不需要计算长度的 for比foreach循环效率高 2 在不确定长度 或者计算长度有性能损耗的时候 用foreach比较方便 2336 循环语句是编程的基本语句,在C#中除了沿用C语言的循 ...
- POj 2159 Dividing
Dividing Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 71453 Accepted: 18631 Descri ...
- C/C++(结构体)
结构体(struct) 从某种意义上说,会不会使用struct,如何使用struct是区别一个开发人员是否具备丰富开发经验的试金石. 处理由不同类型成员构成的构造类型,要采用结构体的方式. 定义:关键 ...
- 压状态bfs
一般地图很小,状态不多,可以装压或者hash,构造压缩或hash的函数,构造还原地图的函数,然后就无脑bfs(感觉就是SPFA) 题目: 1.玩具游戏:二进制压缩状态 #include<cstd ...