




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、1 1 1 1hamming distance between x and y is count of positions where x-bit differs from y-bitalso equals link count in shortest path from x to yn-cubes and distancen-cubes and distance0-cube1-cube2-cube01100011013-cube1100101110111000001010014-cube2 2 2 2gray code is path that visits each vertex exac
2、tly once3-cube1100101110111000001010014-cube3 3 3 3example: n=3example: n=3 l = l = 000, ,111 0001111000100011011100114 4奇偶校验码奇偶校验码u在每组数据信息上附加一位奇偶校验位,若在每组数据信息上附加一位奇偶校验位,若采用奇校验方式,则使包括校验码在内的数采用奇校验方式,则使包括校验码在内的数据含有奇数个据含有奇数个“1”;偶校验方式,则使包括;偶校验方式,则使包括校验码在内的数据含有偶数个校验码在内的数据含有偶数个“1”。u例:字母例:字母“e”的的7位位ascii码为:
3、码为:u1 0 0 0 1 0 1,若在最高位增加一位奇偶校,若在最高位增加一位奇偶校验位,其奇校验编码则为验位,其奇校验编码则为0 1 0 0 0 1 0 1;其;其偶校验编码则为偶校验编码则为1 1 0 0 0 1 0 1。5 5工作原理工作原理 奇偶检验码的工作原理如下图所示。奇偶检验码的工作原理如下图所示。 检检 测测 器器编码器编码器 x x1 1 x x2 2 x x3 3 x x4 4 1 11 11 11 11 11 10 00 00 00 01 1f f发发现现错错误误p(p(奇奇) ) 发送端发送端 接收端接收端 6 6特点特点: : (1) (1) 编码简单、容易实现编码
4、简单、容易实现 ; (2) (2) 奇偶检验码只有检错能力,没有纠错能力奇偶检验码只有检错能力,没有纠错能力 ; (3) (3) 只能发现单错,不能发现双错只能发现单错,不能发现双错 。 7 7 7 7code space contains 2n possible n-bit code words:1010”a”hd = 1hd = 1hd = 1hd = 11110”e”1011”b”1000”8”0010”2”1-bit error in “a”error not correctable. reason: no redundancy.hammings idea: increase hd b
5、etween valid code words.n = 4codesymbol000000001100102001130100401015011060111710008100191010a1011b1100c1101d1110e1111f8 8 8 81010010 ”a”1-bit error in “a”shortest distancedecoding eliminateserrorhd = 2hd = 10010101 ”2”1000111 ”8”1011001 ”b”1110100 ”e”hd = 3hd = 3hd = 3hd = 40010010 ”?”hd = 3hd = 4h
6、d = 40011110 ”3”9 9 9 9example: correct one bit errors or detect two-bit errorserror-correcting codesminimum distance between code words 11010101015 14 13 12 11 10 9 8 7 6 5 4 3 2 1group 8group 1group 2group 4(15,1115,11)汉明码)汉明码11 11位信息位,位信息位,4 4位校验位位校验位分组分组151111141110131101121100111011101010910018
7、100070111601105010140100300112001010001100001000010000111 11 11 11note:single bit error corrupts one or more parity groupstwo-bit error in locations x, y corrupts at least one parity groupthree-bit error (i.e. 1, 4, 5) goes undetected3 = 2(1) + 0 + 1 = 2(0) + 2 + 1 = can correct 1-bit errors or dete
8、ct errors of size 1 or 2.12121212code information packets to maintain even parity in groupse.g. (n = 7)packet is 1011 = positions 7, 6, 5, 37 6 5 4 3 2 11 0 1 x 1 x xconsult group memberships to compute check bitscheckinformation1 3, 5, 7= bit 1 is 1 2 3, 6, 7= bit 2 is 04 5, 6, 7= bit 4 is 0code wo
9、rd is 1010101(7,47,4)汉明码)汉明码4 4位信息位,位信息位,3 3位校验位位校验位13131313traditional to permute check bits to far rightused in memory protection schemes14141414(1212,8 8)hamming codehamming code10101001data bits001?1?codeword1010123456789101112bit position 1: 0?1 0 1 1 10bit position 1bit position 2? 1 0 1 0 1bi
10、t position 2: 11101515hamming code (2)hamming code (2)00100111codeword1010assume error in bit 9recompute the check bits at the receiver.bit 1 = 1 (0, error)bit 2 = 1 ( = 1, no error )bit 4 = 1 ( = 1, no error )bit 8 = 1 (0, error)error is in bit position = 1 + 8 = 9 flip it (correction).123456789101
11、11201616crccrc校验码校验码(cyclic redundancy check)crc校验是用一个固定数去除信息码得出余校验是用一个固定数去除信息码得出余数,将此余数附加在原信息之后,成为数,将此余数附加在原信息之后,成为crc字符。字符。接收方用同样的数去除含有接收方用同样的数去除含有crc字符的信息,字符的信息,若接收无错误,则结果为若接收无错误,则结果为0。1717例:已知被传送的信息例:已知被传送的信息c(x) =1001,生成多项式,生成多项式g(x)=1011,求,求c(x)的的crc码。码。解:解: g(x)=1011 ,4位位 , 则则 r=4-1=3c(x) 左移左
12、移r=3位:位:c(x) 2r = 1001 23 =1001000再用模再用模2除法将除法将c(x) 2r除以除以g(x)余数表达式余数表达式r(x)=110 c(x) 2r + r(x)=1001110 即即crc码为码为1001110crccrc校验码校验码10111 0 1 01 0 0 1 0 0 0 1 0 1 1 1 0 0 0 1 0 1 1 1 1 018181818two-dimensional paritytwo-dimensional parityuse 1-dimensional parityadd one bit to a 7-bit code to ensure
13、an even/odd number of 1sadd 2nd dimensionadd an extra byte to framebits are set to ensure even/odd number of 1s in that position across all bytes in framecommentscatches all 1-, 2- and 3-bit errors10111011110110parity bitsparity byte010100111010011011110000111001101001011111data191919191 0 0 1 0 00
14、1 0 0 0 11 0 0 1 0 01 1 0 1 1 01 0 0 1 1 1 bottom row consists of check bit for each column last column consists of check bits for each rowtwo-dimensional parity check code202020201 0 0 1 0 00 0 0 0 0 11 0 0 1 0 01 1 0 1 1 01 0 0 1 1 1 1 0 0 1 0 00 0 0 0 0 11 0 0 1 0 01 0 0 1 1 01 0 0 1 1 1 1 0 0 1
15、0 00 0 0 1 0 11 0 0 1 0 01 0 0 1 1 01 0 0 1 1 1 1 0 0 1 0 00 0 0 1 0 11 0 0 1 0 01 0 0 0 1 01 0 0 1 1 1 two errorsone errorthree errorsfour errorsarrows indicate failed check bits21212121two-dimensional codes (product codes)min distance is product ofrow and column distancesfor simple parity on each
16、(below)min distance is 42222题题2-462-46xxx23232323checksum codesmod-256 sum of info bytes becomes checksum bytemod-255 sum used in ip packets /wiki/ipv4_header_checksumm-hot codes (m out of n codes)each valid codes has m ones in a frame of n bitsmin distance is 2detect all unidi
17、rectional errorsbit flips are all 0 to 1 or 1 to 02424error detection vs. error correctionerror detection vs. error correctiondetectionpro: overhead only on messages with errorscon: cost in bandwidth and latency for retransmissionscorrectionpro: quick recoverycon: overhead on all messageswhat should
18、 we use?correction if retransmission is too expensivecorrection if probability of errors is high2525data can be transmitted by either serial transfer or parallel transfer.serial and parallel datacomputermodem10110010t0t1t2t3t4t5t6t7computerprinter1011001026262626serial data transmission(simple) transmit clock and sync with data (3 lines)(complex) recover clock and/or sync from data line27272727manchester: zero = 0 to 1 transition, one = 1
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025版智能通风排烟系统安装与智能化改造合同文本
- 2025版智能建筑项目施工班组承包服务合同范本
- 2025版全新员工试用期入职劳动合同及福利待遇协议
- 2025年度高性能河沙资源买卖合同
- 2025年度维修保养外包服务合同
- 2025诚意金协议范本:企业项目合作诚意保证金
- 2025版石材及辅料一体化建筑施工总承包合同
- 2025房地产战略合作地产项目工程监理合同
- 2025年度WTO与全球供应链金融服务合同
- 2025年度医院食堂配餐安全责任协议书范本
- 药品效期和近效期药品管理
- 全国灌溉水有效利用系数测算分析技术指导细则(2024修订版)知识培训
- 起搏器围手术期的护理
- 《诊断学意识障碍》课件
- 培训主管技能展示
- 《环境设计工程计量与计价》课件-1.什么是装饰工程预算
- 某露天矿山剥离工程施工组织设计方案
- 艺术家品牌影响力构建-洞察分析
- 孕产妇急救技能考核试卷
- 消防水池及泵房基坑土方开挖方案
- 北师大版(2024新版)七年级上册数学全册教案
评论
0/150
提交评论