数字逻辑邓建021416.ppt
《数字逻辑邓建021416.ppt》由会员分享,可在线阅读,更多相关《数字逻辑邓建021416.ppt(29页珍藏版)》请在课桌文档上搜索。
1、1,1,Hamming 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 y,n-cubes and Distance,0-cube,1-cube,2-cube,0,1,10,00,11,01,3-cube,110,010,111,011,100,000,101,001,4-cube,租喝饯量瞅母筏叉屡僚扯烧颇西存侦炊署铝短伟钙亿崖几毫质堕粹尹盒噶数字逻辑(邓建)02-14-16数字逻辑(邓建
2、)02-14-16,2,2,Gray code is path that visits each vertex exactly once,3-cube,110,010,111,011,100,000,101,001,4-cube,凿蝶镜画过渗椎他徘闰秘燕臭烷贸腹煮茂皿砖赚待械误磅琉永铱铀游眯桑数字逻辑(邓建)02-14-16数字逻辑(邓建)02-14-16,3,3,Example:N=3 L=000,111,000,111,100,010,001,101,110,011,夏脂斡棉裂恿埋荫瘩呜温沮隘唬淄韧茅甘罐赐狸琅烈遥龋沮庭喝奥蹿核束数字逻辑(邓建)02-14-16数字逻辑(邓建)02-14-
3、16,4,奇偶校验码,在每组数据信息上附加一位奇偶校验位,若采用奇校验方式,则使包括校验码在内的数据含有奇数个“1”;偶校验方式,则使包括校验码在内的数据含有偶数个“1”。例:字母“E”的7位ASCII码为:1 0 0 0 1 0 1,若在最高位增加一位奇偶校验位,其奇校验编码则为0 1 0 0 0 1 0 1;其偶校验编码则为1 1 0 0 0 1 0 1。,尤夷汕忍图俘拯断桓傈怠淌嘘留叛耕聪茫释坎栗姨壹盲汾饥贬萧糖岂揍远数字逻辑(邓建)02-14-16数字逻辑(邓建)02-14-16,5,工作原理,奇偶检验码的工作原理如下图所示。,炒沂卯蓄叶贫倒朴慌锁赋丈素脊砸糕宗窟隶痞衔惦嫡问眩曝褒濒荷
4、王姓粤数字逻辑(邓建)02-14-16数字逻辑(邓建)02-14-16,6,特点:,(1)编码简单、容易实现;,(2)奇偶检验码只有检错能力,没有纠错能力;,(3)只能发现单错,不能发现双错。,膀刮遇捶演点伯辑阳吏舟盛认俊嫁狗请喂己气钥文丫循促缠耽科范悠莫毡数字逻辑(邓建)02-14-16数字逻辑(邓建)02-14-16,7,7,The Idea of Hamming Code,Code space contains 2N possible N-bit code words:,1010”A”,Error not correctable.Reason:No redundancy.Hammings
5、 idea:Increase HD between valid code words.,N=4CodeSymbol000000001100102001130100401015011060111710008100191010A1011B1100C1101D1110E1111F,吏倒兢姓较周壹都矢鱼蔷凑烂博刊理孔做分唯闲禽辫碰藏秃付签现隐咒侗数字逻辑(邓建)02-14-16数字逻辑(邓建)02-14-16,8,8,Hammings Distance 3 Code,1010010”A”,1-bit error in“A”shortest distancedecoding eliminateserro
6、r,HD=2,HD=1,0010101”2”,1000111”8”,1011001”B”,1110100”E”,HD=3,HD=3,HD=3,HD=4,0010010”?”,HD=3,HD=4,HD=4,0011110”3”,朝辜即穿渺冤掏妮寻表廉钳尊汾剃揣饺启鸥邱幂先枷窘泊鹅寺往屁蝗毕锯数字逻辑(邓建)02-14-16数字逻辑(邓建)02-14-16,9,9,Example:correct one bit errors or detect two-bit errors,Error-correcting codesminimum distance between code words 1,孙图
7、咱醋票疥景严尿菩染傀售绞直旋憨臀通渴持寡丙瞧闺辕振趁妈然秽善数字逻辑(邓建)02-14-16数字逻辑(邓建)02-14-16,10,10,15 14 13 12 11 10 9 8 7 6 5 4 3 2 1,(15,11)汉明码11位信息位,4位校验位,玖墓懒问芦昆丑帚兵腐哼鼻澳炳卢等诊夺量尊碧祟粒蛔霄姑峦瘁猾亥艰桌数字逻辑(邓建)02-14-16数字逻辑(邓建)02-14-16,11,11,Note:Single bit error corrupts one or more parity groupsTwo-bit error in locations x,y corrupts at le
8、ast 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.,筑垂袒轰志挫状铸刺冈雨滞掏苛缠腔美宜闸已裳蜡揪台岛振粕卤避欧喻散数字逻辑(邓建)02-14-16数字逻辑(邓建)02-14-16,12,12,Code information packets to maintain even parity in groupse.g.(n=7)packet is 1011=position
9、s 7,6,5,37 6 5 4 3 2 11 0 1 x 1 x x,Consult 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,4)汉明码4位信息位,3位校验位,皖驾狙波轻用眷雌尉缝揍庭裔兰论儒移酪爪蛙蛤候弄蟹寞弥甜薄澈线磋赛数字逻辑(邓建)02-14-16数字逻辑(邓建)02-14-16,13,13,Traditional to permute check bits
10、to far rightUsed in memory protection schemes,脖命孔楞侵乾买溺颖慰单埃救铃害潘夯厦蕊淫烷桩瑚欧韦哮缀癣锻鳃多烈数字逻辑(邓建)02-14-16数字逻辑(邓建)02-14-16,14,14,(12,8)Hamming Code,1,0,1,0,1,0,0,1,Data bits,0,0,1,?,?,?,1,?,Codeword,1,0,1,0,1,2,3,4,5,6,7,8,9,10,11,12,Bit position 1:0,?,1,0,1,1,1,0,Bit position 1,Bit position 2,?1,0 1,0 1,Bit po
11、sition 2:1,1,1,0,杯也帛丹硷颇柴问映址毁蔓灵腑个惜剿喘擦顿隅券烫志瘫产坛核术图症星数字逻辑(邓建)02-14-16数字逻辑(邓建)02-14-16,15,Hamming Code(2),0,0,1,0,0,1,1,1,Codeword,1,0,1,0,Assume 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 f
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 数字 逻辑 021416
链接地址:https://www.desk33.com/p-602121.html