数字逻辑邓建021416.ppt
《数字逻辑邓建021416.ppt》由会员分享,可在线阅读,更多相关《数字逻辑邓建021416.ppt(29页珍藏版)》请在优知文库上搜索。
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码为:码为:u1 0
3、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)编码简单、容易实现编码简单、容易实现 ;(2)(2)奇偶
4、检验码只有检错能力,没有纠错能力奇偶检验码只有检错能力,没有纠错能力 ;(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 between valid code words.N=4CodeSymbo
5、l000000001100102001130100401015011060111710008100191010A1011B1100C1101D1110E1111F8 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=4HD=40011110”3”9 9 9 9Example:correct one bit errors or detect
6、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位校验位位校验位分组分组151111141110131101121100111011101010910018100070111601105010140100300112001010001100001000010000111 11 11 1
7、1Note: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 detect errors of size 1 or 2.12121212Code information packets to maintain even parity in
8、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 word is 1010101(7,47,4)汉明码)汉明码4 4位信息位,位信息位,3 3位校验位位校验位13131313Traditional to permute check bits to far r
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 数字 逻辑 021416
