版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、Advanced Computer Networks,计算机网络,Review,Data link layer design issues Service Provided to the network layer Framing Error-Correcting Codes Error-Detecting Codes,Sep10 CN,The Data Link Layer,Chapter 3,Sep10 CN,Topics,Error detection and correction Hamming code CRC (Cyclic Redundancy Check),Sep10 CN,2
2、.1 Error-Correcting Codes,2. Error Detection and Correction,?,A single parity bit appended to the data, the parity bit is chosen so that the number of 1 bits in the codeword is even (or odd) E.g., 1011010 10110100 2D parity check code: Form the data to be transmitted into a matrix. Add a parity bit
3、to each row and each column of the matrix.,Sep10 CN,Hamming distance,Rule: To determine how many bits differ, just exclusive OR the two codewords and count the number of 1 bits in the result, for example:,Definition: The number of bit positions in which two codewords differ is called the Hamming dis
4、tance.,Significance: if two codewords are a Hamming distance d apart, it will require d single-bit errors to convert one into the other.,Sep10 CN,The bits that are powers of 2 (1, 2, 4, 8, 16, etc.) are check bits.The rest (3, 5, 6, 7, 9, etc.) are filled up with the m data bits. Each check bit forc
5、es the parity of some collection of bits, including itself, to be even (or odd).,Hamming code,Correct single errors!,Exercise,1. An 8-bit byte with binary value 10101111 is to be encoded using an even-parity Hamming code. What is the binary value after encoding? 2. A 12-bit Hamming code whose hexade
6、cimal value is 0 xE4F arrives at a receiver. What was the original value in hexadecimal? Assume that not more than 1 bit is in error.,101001001111,The original 8-bit data value was 0 xAF.,Goal: detect “errors” (e.g., flipped bits) in transmitted frame (note: used at transport layer only),2.2 Error-D
7、etecting Codes,Sep10 CN,Modulo 2 arithmetic,No carries for addition or borrows for subtraction Both addition and subtraction are identical to exclusive OR,Long division is carried out the same way as it is in binary except that the subtraction is done modulo 2, as above.,Generator Polynomial - G(x),
8、The sender and receiver must agree upon a generator polynomial in advance Both the high- and low- order bits of G(x) must be 1 To compute the checksum for some frame with m bits, corresponding to the polynomial M(x), the frame must be longer than G(x),The idea of CRC,The idea is to append a checksum
9、 to the end of the frame in such a way that the polynomial represented by the checksummed frame is divisible by G(x). When the receiver gets the checksummed frame, it tries dividing it by G(x). If there is a remainder, there has been a transmission error.,view data bits, D, as a binary number choose
10、 r+1 bit pattern (generator), G goal: choose r CRC bits, R, such that exactly divisible by G (modulo 2) receiver knows G, divides by G. If non-zero remainder: error detected! can detect all burst errors less than r+1 bits widely used in practice (ATM, HDLC),Cyclic Redundancy Check,Example1,Data Fram
11、e: 101110000,Generator G(x) = x3 + 1,The transmitted Frame: 101110000011,Fig.2 Calculation of the polynomial code checksum,Fig.2 illustrates the calculation for a frame 1101011011 using the generator G(x) = x4 + x + 1.,Example2,The transmitted Frame:,Transmitting T(x), receiving T(x) Receiver comput
12、es E(x)=T(x) /G(x) Those errors that happen to correspond to polynomials containing G(x) as a factor will slip by; all other error will be caught.,Sep10 CN,What is the remainder obtained by dividing x7+x5+1 by the generator polynomial x3+x+1? 在数据传输过程中,若接收方收到发送方送来的信息为10110011,生成多项式为G(x)=x3+x2+1,接收方收到
13、的数据是否正确?若想发送的一段信息为10110011,则在线路上传输的码字是怎样的?,Exercise,010,不正确,10110011100,Sep10 CN,The popular G(x),CRC-4 X4+X+1 CRC-8 X8+X5+X4+1 CRC-12 X12+X11+X3+X+1 CRC-16 X16+X15+X2+1 CRC-16-CCITT X16+X12+X5+1 CRC32 X32+X26+X23+X22+X16+X12+X11+X10 +X8+X7+X5+X4+X2+X+1,Sep10 CN,冗余码的计算举例,现在 k = 6, M = 101001。 设 n =
14、3, 除数 P = 1101, 被除数是 2nM = 101001000。 模 2 运算的结果是:商 Q = 110101, 余数 R = 001。 把余数 R 作为冗余码添加在数据 M 的后面发送出去。发送的数据是:2nM + R 即:101001001,共 (k + n) 位。,Sep10 CN,接收端对收到的每一帧进行 CRC 检验,(1) 若得出的余数 R = 0,则判定这个帧没有差错,就接受(accept)。 (2) 若余数 R 0,则判定这个帧有差错,就丢弃。 但这种检测方法并不能确定究竟是哪一个或哪几个比特出现了差错。 只要经过严格的挑选,并使用位数足够多的除数 P,那么出现检测
15、不到的差错的概率就很小很小。,Sep10 CN,Summarize,Design issues Service Provided to the network layer Framing Error-Correcting Codes Error-Detecting Codes,Sep10 CN,Homework,Page243 2, 3,5,14,15,Sep10 CN,Preparation,Elementary data link protocols,Sep10 CN,差错的检测与控制,(1) 差错检测 衡量通信线路传输质量的技术指标是误码率。 Pe=错误接收的码元数/接收的总码元数 (2)几种冗余校验方法 垂直冗余校验 水平冗余校验 水平垂直冗余校验 循环冗余校验,Sep10 CN,垂直奇偶校验,垂直奇偶校验又称纵向奇偶校验,它能检测出每列中所有奇数个错,但检测不出偶数个的错,如下图所示,因而对差错的漏检率接近1/2。,垂直奇偶校验方式,Sep10 CN,水平奇偶校验,水平奇偶校验又称横向奇偶校验,它不但能检测出各段同一位上的奇数个错,而且还能检测出突发长度=p的所有突发错误。其漏检率要比垂直奇偶校验方法低,但实现水平奇偶校验时,一定要使用数据缓冲器。,水平奇偶
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 邯郸市矿业权评估师考试(矿业权价值评估)全真题库及答案(2026年)
- 中级注册安全工程师考试真题及答案:(安全生产事故案例分析)(广东省云浮市)
- 高级数控铣工试题及答案
- 2026年氧化问题总结
- 2026年放射科调研总结
- 人工膝关节置换术后康复临床路径及表单
- 2026年知识产权专员考试题库及答案
- 水痘院内感染暴发应急处置预案
- 2026年四川省绵阳市事业单位人员招聘考试模拟试题与答案详解
- 2026及未来5年葫芦铃项目可行性研究报告(市场调查与数据分析)
- 营养支持与疼痛管理护理
- 中国脑卒中康复指南(2025版)
- 医疗健康智能穿戴设备
- 2025年初中心理健康测试题及答案解析
- 校园突发事件应急疏散与安全演练-2025-2026学年高一上学期学生安全防护主题班会
- 小儿暴发性心肌炎的护理
- 医院口腔科重点专科评审汇报
- 2025年商务英语专业四级考试模拟试题及答案
- 《指纹识别》课件
- 车间桥式起重机吊装作业安全培训
- 2025年新疆交投科技有限责任公司招聘笔试参考题库含答案解析
评论
0/150
提交评论