T325 Summary T305 T325 B BLOCK 4 T325. Session 3. Dr. Saatchi, Seyed Mohsen. Prepared by:

Similar documents
4. Error correction and link control. Contents

ELG3175 Introduction to Communication Systems. Introduction to Error Control Coding

ELEC 691X/498X Broadcast Signal Transmission Winter 2018

CSE 123: Computer Networks

FAULT TOLERANT SYSTEMS

UCSD ECE154C Handout #21 Prof. Young-Han Kim Thursday, June 8, Solutions to Practice Final Examination (Spring 2016)

Advanced Computer Networks. Rab Nawaz Jadoon DCS. Assistant Professor COMSATS University, Lahore Pakistan. Department of Computer Science

CSEP 561 Error detection & correction. David Wetherall

Data Link Control Layer, Error Detection, Error Correction, and Framing

Link Layer: Error detection and correction

CS321: Computer Networks Error Detection and Correction

UNIT-II 1. Discuss the issues in the data link layer. Answer:

Chapter 10 Error Detection and Correction 10.1

Fault Tolerance & Reliability CDA Chapter 2 Additional Interesting Codes

Chapter 10 Error Detection and Correction. Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Error-Correcting Codes

CMSC 2833 Lecture 18. Parity Add a bit to make the number of ones (1s) transmitted odd.

Lecture / The Data Link Layer: Framing and Error Detection

COMPUTER NETWORKS UNIT-3

Communication Fundamentals in Computer Networks

EITF25 Internet Techniques and Applications L3: Data Link layer. Stefan Höst

Forward Error Correction Using Reed-Solomon Codes

Channel Decoding in Wireless Communication Systems using Deep Learning

The Data Link Layer. CS158a Chris Pollett Feb 26, 2007.

CSE 123: Computer Networks

The Data Link Layer Chapter 3

Ad hoc and Sensor Networks Chapter 6: Link layer protocols. Holger Karl

EE 6900: FAULT-TOLERANT COMPUTING SYSTEMS

Error Detection Codes. Error Detection. Two Dimensional Parity. Internet Checksum Algorithm. Cyclic Redundancy Check.

Implementation of Multidirectional Parity Check Code Using Hamming Code for Error Detection and Correction

Ch. 7 Error Detection and Correction

Comparative Performance Analysis of Block and Convolution Codes

Data Link Layer (1) Networked Systems 3 Lecture 6

Where we are in the Course

Data Link Layer. Srinidhi Varadarajan

Chapter 3. The Data Link Layer. Wesam A. Hatamleh

CSN Telecommunications. 5: Error Coding. Data, Audio, Video and Images Prof Bill Buchanan

PART III. Data Link Layer MGH T MGH C I 204

ECE 2020B Fundamentals of Digital Design Spring problems, 6 pages Exam Two 26 February 2014

CHANNEL CODING 1. Introduction

Viterbi Algorithm for error detection and correction

ECE 2020B Fundamentals of Digital Design Spring problems, 6 pages Exam Two Solutions 26 February 2014

(Refer Slide Time: 2:20)

Communication Systems, 5e Chapter 13: Channel Coding

Design and Implementation of Low Density Parity Check Codes

Pending Issues. Opera,ng Systems and Networks. Network Lecture 3: Link Layer (1) Where we are in the Course. Scope of the Link Layer

Convolutional Codes. COS 463: Wireless Networks Lecture 9 Kyle Jamieson. [Parts adapted from H. Balakrishnan]

Chapter 9: Data Transmission

Chapter 3. The Data Link Layer

Forward Error Correction Codes

CSE 123A Computer Networks

Wireless Sensornetworks Concepts, Protocols and Applications. Chapter 5b. Link Layer Control

CS Computer Architecture

Error Correction and Detection using Cyclic Redundancy Check

CSE 123: Computer Networks Alex C. Snoeren. HW 1 due Thursday!

Lecture 4: CRC & Reliable Transmission. Lecture 4 Overview. Checksum review. CRC toward a better EDC. Reliable Transmission

Chapter 6 Digital Data Communications Techniques

Due dates are as mentioned above. Checkoff interviews for PS2 and PS3 will be held together and will happen between October 4 and 8.

1. Which of the following Boolean operations produces the output 1 for the fewest number of input patterns?

ECE 333: Introduction to Communication Networks Fall Lecture 6: Data Link Layer II

Advanced Modulation and Coding Challenges

5 Binary Coding In Noisy Channels

CSMC 417. Computer Networks Prof. Ashok K Agrawala Ashok Agrawala. Nov 1,

Advanced Computer Architecture

ECE 2030D Computer Engineering Spring problems, 5 pages Exam Two 8 March 2012

Lecture 5: Data Link Layer Basics

The Data Link Layer Chapter 3

FLASH RELIABILITY, BEYOND DATA MANAGEMENT AND ECC. Hooman Parizi, PHD Proton Digital Systems Aug 15, 2013

FORWARD ERROR CORRECTION CODING TECHNIQUES FOR RELIABLE COMMUNICATION SYSTEMS

Some portions courtesy Robin Kravets and Steve Lumetta

Hamming Codes. s 0 s 1 s 2 Error bit No error has occurred c c d3 [E1] c0. Topics in Computer Mathematics

Midterm Exam 2B Answer key

Lecture 2 Error Detection & Correction. Types of Errors Detection Correction

CSMC 417. Computer Networks Prof. Ashok K Agrawala Ashok Agrawala Set 4. September 09 CMSC417 Set 4 1

Review of Number Systems

1.6 Error Control Strategies

Chapter Six. Errors, Error Detection, and Error Control. Data Communications and Computer Networks: A Business User s Approach Seventh Edition

COMPUTER NETWORKS UNIT I. 1. What are the three criteria necessary for an effective and efficient networks?

Errors. Chapter Extension of System Model

TYPES OF ERRORS. Data can be corrupted during transmission. Some applications require that errors be detected and corrected.

Design of Convolution Encoder and Reconfigurable Viterbi Decoder

Basic Communication Concepts

C LDPC Coding Proposal for LBC. This contribution provides an LDPC coding proposal for LBC

Design Single and Multiple Errors Correction Block Codes

Digital Fundamentals

Inst: Chris Davison

Department of Computer and IT Engineering University of Kurdistan. Data Communication Netwotks (Graduate level) Data Link Layer

CS 4453 Computer Networks Winter

CS/ECE 552: Introduction to Computer Architecture

CSE 461: Framing, Error Detection and Correction

CS/ECE 438: Communication Networks for Computers Spring 2018 Midterm Examination Online

IMPLEMENTATION OF A BIT ERROR RATE TESTER OF A WIRELESS COMMUNICATION SYSTEM ON AN FPGA

Module Contact: Dr. Ben Milner Copyright of the University of East Anglia Version 2

CHAPTER 7. Copyright Cengage Learning. All rights reserved.

Lecture 6: Reliable Transmission. CSE 123: Computer Networks Alex Snoeren (guest lecture) Alex Sn

Chip Design for Turbo Encoder Module for In-Vehicle System

CSCI-1680 Link Layer Reliability Rodrigo Fonseca

15110 PRINCIPLES OF COMPUTING SAMPLE EXAM 2

S Capacity enhancement methods for radio interface ARQ Schemes

A Hybrid ARQ Scheme for Resilient Packet Header Compression

Transcription:

T305 T325 B BLOCK 4 T325 Summary Prepared by: Session 3 [Type Dr. Saatchi, your address] Seyed Mohsen [Type your phone number] [Type your e-mail address] Dr. Saatchi, Seyed Mohsen T325

Error Control Coding Q1: Possibility of fault in all memory technologies means one or more bits being in error: Bit error : 1 0 or 0 1 True Q2: What is BER stands for? Bit Error Rate Q3: Bit error rate (BER), or bit error ratio, is one measure of how badly a signal is affected by errors. True Q4: Which is better: a high BER or a low BER? If there are 10 errors in 10000 bits, what is the BER? Lower BER is better, The BER = 10/10000 = 0.001 Q5: Messages to be conveyed from the data source to the data sink. True Q6: The transmitter converts each message to a codeword (a process called encoding or just coding), which is sent through the channel. True Q7: The receiver converts the codeword back to the message (decoding). True Q8: Redundancy is a measure of the proportion of a code that is extra beyond what is strictly needed to convey the message. True Q9: What does it mean by term Redundancy? Redundancy is a measure of the proportion of a code that is extra beyond what is strictly needed to convey the message. Prepared by: Dr. Saatchi, Seyed Mohsen 2

Q10: Redundancy can be quantified, If the message has k bits and the codeword n bits, the redundancy of the code is: R = (n k) / n True Q11: The message has 4 bits (it is, say, 1101) and two extra bits are added for error control coding. The message with 4 bits, with extra 2 bits will be 6 bits in the codeword, so the redundancy of the codeword is R= (n-k) /n n= 6 (4 bits message + 2 bits codeword) k = 4 R= (6-4)/6 R= 2/6 2/6, which is 0.333333X100= 33%. Q12: The message has 4 bits (it is, say, 1101) and two extra bits are added for error control coding. What is the code rate? n= 6, (4 bits message + 2 bits code word) k=4 (4 bits message) Code rate = k/n Code rate = 4/6 The code of an (n, k) code is given by k/n, so the rate of a (6, 4) code is 2/3. =0.66666 X 100 = 66% Note: Code rate is normally written as a fraction, reduced to the smallest integers. Q13: Bit Error Rate (BER) or bit error ratio, is one measure of how badly a signal is affected by errors. A. Which is better a high BER or a low BER? Justify your answer B. If there are 10 errors in 10000 bits, what is the BER? Low BER, because low BER => less errors BER = 10/10000 = 0.001 or 10-3 Prepared by: Dr. Saatchi, Seyed Mohsen 3

Q14: A (7,4) hamming code has the following redundancy a. 3/4 b. 4/7 c. 7/3 d. 4/3 e. 3/7 e. 3/7, because R= (n-k) / n => R=(7-4)/7 => R = 3/7 Q15: If there are 100 erroneous bits in 1000000, what is the BER? a. 10-2 b. 10-3 c. 10-4 d. 10-5 e. 10-7 c. 10-4, because BER= 100/1000000 = 0.0001 => 10-4 Q16: A (6,4) hamming code has the following redundancy a. 6/4 b. 4/6 c. 3 d. 1/3 e. 6 d. 1/3, because R=(n-k)/n, so R=(6-4)/6 => 2/6 => 1/3 => 0.333 Q17: The extra bits added by the error control codes are described as redundant bits. True Q18: Raw signals contain redundancy and, because of that, can be compressed to reduce the bit rate. True Q19: What does it mean by term Parity Check? A simple method of detecting single errors Underlies more advanced codes Parity checking can be done either on even parity or on odd parity. Q20: In Parity Check the transmitting device sends data, it counts the number of set bits (ones) in each group of seven bits. If the number of set bits is even, it sets the parity bit to 0 if the number of set bits is odd, it sets the parity bit to 1 True Prepared by: Dr. Saatchi, Seyed Mohsen 4

Q21: Suppose a system uses an even parity check code, creating 8-bit codewords by adding a check bit to 7-bit messages. a. What would be the codewords if the messages were: I. 1011010 II. 1100001 An extra bit is added to the end of the message, chosen to be a 1 or 0 in such a way as to ensure that the codeword contains an even number of ones. i. 10110100 ii. 11000011 Q22: Assuming that the probability of there being more than one error in any one codeword is negligible, which of the following codewords contain errors? i. 00111011 ii. 00000001 iii. 01001000 iv. 01001100 i. 00111011 (The number of 1s are Odd), So there is an error ii. 00000001 (The number of 1s are Odd), So there is an error iii. 01001000 (The number of 1s are Even), So there is No error iv. 01001100 (The number of 1s are Odd), So there is an error Note: If the codeword contains an even number of ones it is error free. If it contains an odd number of ones it must contain an error. On this basis, (i), (ii) and (iv) contain an error, while (iii) does not. Prepared by: Dr. Saatchi, Seyed Mohsen 5

Q23: Figure below represents a codeword from a rectangular code. a. How many parity digits are used per codeword to check for errors? b. Describe this code using the (n, k) notation. c. Calculate the code rate and the redundancy of this code. d. Assuming that no more than one digit is in error, how many different errors can be corrected using this code? a) The diagram shows that eight parity digits are used to check for errors, out of 20 digits in total. b) n is the total number of bits in the code, 20, and k is the number of bits in the message, which is 12. The code is therefore a (20,12) code. c) The code rate is k/n, which is 12/20, or 3/5. => 0.6666 x 100 = 60% The redundancy is which is 60%. d) The rectangular code can correct a single error at any digit position, including the parity digits, so it can correct 20 different errors. Q24: Supposing that the probability of having more than one bit in error is negligible, which of the following codewords is incorrect? a. 10110101 b. 10110100 c. 11011011 d. 10011010 e. 11101000 a. 10110101, because 5 one s (Has an error) Q25: How many bits are in error among 1000 bits if the bit error rate is 2% a. 2 b. 5 c. 20 d. 50 e. 200 c. 20, BER = 1000 x 0.02 = 20 Prepared by: Dr. Saatchi, Seyed Mohsen 6

Q26: What do you think is better : Compress then Code or Code then Compress? Code then compress: Redundancy bits added by the code will be removed by the compression and thus the result will be vulnerable to errors Compress then Code: Redundancy is minimized in the message signal by efficient source coding and/or advanced data compression, and then redundancy is added back through error-control coding. Compressing then adding redundancy allows the use of efficient error control codes Q27: What does it mean by term Code Distance? Is the minimum number of places in which any two codewords differ This is a fundamental parameter of error control codes! Q28: In general, codes with a minimum Hamming distance of n can correct up to (n - 1)/2 errors if n is odd, True Q29: In general, codes with a minimum Hamming distance of n can correct or up to (n/2) - 1 errors if n is even; or can detect up to n - 1 errors without correcting them True Q30: What is the Hamming distance of the code specified by this Table? Message Codeword 00 00001 01 01010 10 10100 11 11111 00001 01010 10100 11111 00001 0 01010 3 0 10100 3 4 0 11111 4 3 3 0 Prepared by: Dr. Saatchi, Seyed Mohsen 7

To determine the Hamming distance of the code check all possible pairs of codewords, counting in how many places they differ. Table above: minimum value is 3, so the Hamming distance for this code is 3. up to (n - 1)/2 errors if n is odd, So, the Hamming distance is 3, and the number of bits this code can correct is = (3-1) / 2 = 1 bits Q31: What is the Hamming distance of the code specified by this Table? Codeword 00010 10001 11010 00101 01010 00010 0 10001 3 0 11010 2 3 0 00101 3 2 5 0 01010 1 4 1 4 0 Minimum hamming distance is 1 up to (n - 1)/2 errors if n is odd, So, the Hamming distance is 3, and the number of bits this code can correct is = (1-1) / 2 = 0 bits Prepared by: Dr. Saatchi, Seyed Mohsen 8

Q32: The following matrix represents a codeword from a rectangular code i. Represent this code in (n, k) representation Code = (n,k), n=15, K=8, so the (15,8) ii. Calculate the code rate and the redundancy of this code. Code rate = k/n Code rate = 8/15 Redundancy = (n-k) / n Redundancy = (15-8) / 15 Redundancy = 7/15 0.47 X 100 = 47% Q33: How many bits the following correction code can correct? Hint: calculate the Hamming distance: 000 011 101 110 000 0 011 2 0 101 2 2 0 110 2 2 2 0 up to (n/2) - 1 errors if n is even So, the Hamming distance is 2, and the number of bits this code can correct is = 2/2 1 = 0 bits Prepared by: Dr. Saatchi, Seyed Mohsen 9

Q34: What is the Hamming distance of the code specified by this Table? Message Codeword 00 0000 01 1000 10 0001 11 1001 Codeword 0000 1000 0001 1001 0000 0 1000 1 0 0001 1 2 0 1001 2 1 1 0 up to (n - 1)/2 errors if n is odd, So, the Hamming distance is 1, and the number of bits this code can correct is = (1-1) / 2 = 0 bits Q35: What is the Hamming distance of the code specified by this Table? How many erroneous bits it can detect? It can correct? Codeword 000000 010101 101010 111111 000000 0 010101 3 0 101010 3 6 0 111111 6 3 3 0 up to (n-1) /2 errors if n is odd The hamming distance is therefore 3 The code can detect up to 3-1 = 2 erroneous bits It can correct up to 3-1/2 => 1 bit Prepared by: Dr. Saatchi, Seyed Mohsen 10

Q36: What is CRC stands for? Cyclic Redundancy Check Q37: What does it mean by term CRC? The CRC stands for Cyclic Redundancy Check, and its more powerful type of error detection code. CRC codes add one or more bytes (a collection of bits) to a message. Q38: In CRC is adding the redundancy makes these codes more flexible than Parity Check codes because they can detect many different combinations of errors. True Q39: How to correct errors once detected? Automatic Repeat Request (ARQ): get a replacement copy of the data. ARQ introduces delays while you wait for the repeat, which might not be acceptable, also the correct data will generally not be available. Forward Error Correction (FEC) : used to overcome the limitations of ARQ Q40: What is ARQ stands for? Automatic Repeat Request Q41: What is FEC stands for? Forward Error Correction Q42: List two types of nodes in convolutional code tree. Upper Node upper path is taken if the input bit is a 0 Lower Node lower path is taken if the input is a 1 Prepared by: Dr. Saatchi, Seyed Mohsen 11

Q43: What would the output stream be if the input data were: a) 1010 b) 0110 By using the Convolutional Code: Tree representation a) 1010 => 11 10 11 10 b) 0110 => 00 11 01 10 Q44: It is possible to collapse equivalent nodes at a given level on the tree onto each other, which leads to a trellis rather than a tree. True Prepared by: Dr. Saatchi, Seyed Mohsen 12

Q45: What would the output stream be if the input data were: a) 1010 b) 0110 By using the Convolutional Code: Trellis representation a) 1010 => 11 10 11 10 b) 0110 => 00 11 01 10 Q46: Consider the following trellis representation of a convolutional encoder, where S is the point to start from in the encoding process. What will be the codeword if the message to encode is 1101? Justify your answer and draw that path followed in the trellis. In the trellis representation, When a branch is encountered: The upper path is taken if the input bit is a 0 The lower path is taken if the input is a 1. Applying these rules and starting from the point S, the output of the encoder is: 11 01 10 11 Prepared by: Dr. Saatchi, Seyed Mohsen 13

Q47: The coding of the input data 1100 is shown by the red dashed path, resulting in the code 11 01 10 00. (The spaces between the pairs of bits are for ease of reading.) What would the output stream be if the input data were? (a) 0011 (b) 1101 A) 0011 => 00001101 B) 1101 => 11011011 (a) (b) Prepared by: Dr. Saatchi, Seyed Mohsen 14

Q48: The three parts of the question are independent a. Consider the following coding tree for a simple convolutional code. b. What will be the output sequence for the following input sequence: 1101 (start with the most significant bit 1 ->1 ->0 ->1) a. The code rate is ½ since for every one bit input there are two bits output b. Following the arrows (if 1 go down and if 0 go up): the output sequence is : 11 01 10 11 Q49: List two types of Error correction codes. Convolutional codes Block codes Q50: Turbo codes have found a very wide range of applications, mainly in wireless communications, ranging from the third generation mobile systems to deep-space exploration. True Prepared by: Dr. Saatchi, Seyed Mohsen 15

Q51: Turbo-codes promise to achieve the ultimate limits of capacity of a communication channel True Q52: In the Turbo Codes Capacity of communication channel, C= B log 2 (1+ S/N), C is the data rate in bits per second ( channel capacity ), B is the channel bandwidth in hertz, S/N is the signal power divided by the noise power and the logarithm is to the base 2. True Q53: Using Shannon equation, what is the maximum theoretical capacity of a channel of bandwidth 500 MHz if the signal to noise ratio (SNR) is 100? According to shannon: C = B log2 (1 + SNR) 500 x 10 6 x log2 (1 + 100) = 500 x 10 6 x 6.66 = 3330 Mbits/s Q54: Block codes are the most popular type of error correction codes. True Q55: Explain the importancies of Block Code. Encoder takes in a message block of finite length adds redundancy sends out a code word that is also a block of longer length than the message. Q56: If the following codes are received, state whether there have been any errors, and give the decoded output. (Assume that the probability of there being more than one error in a received codeword is negligible.) i. 1110000 The decoding can either be done by looking for the closest match among the codewords in Table 3.4, or by calculating the syndrome. Prepared by: Dr. Saatchi, Seyed Mohsen 16

i) 1110000. if the message is ABCD, the hamming codeword is XYAZBCD with X Y A Z B C D 1 2 3 4 5 6 7 1 1 1 0 0 0 0 The three parity checks are as follows: o ABDX : 0011 => syndrome 0 o ACDY : 0011 => syndrome 0 o BCDZ : 0011 => syndrome 0 Parity 1 tests parity on digits 1, 3, 5 and 7 : 1110000. => 1100, this has an even number of ones (two), so passes. the syndrome is (0) ABDX : 1001 Parity 2 tests parity on digits 2, 3, 6 and 7: 1110000. => 1100, this has an even number of ones (two), so passes. the syndrome is (0) ACDY : 1001 Parity 3 tests parity on digits 4, 5, 6 and 7: 1110000. => 0000, this has an even number of ones (none), so passes. the syndrome is (0) BCDZ : 0000 All three parity checks pass, so the syndrome is 000, and there are no errors. The decoded data is just extracted from the codeword (digits 3, 5, 6 and 7) 1110000: => 1000. Q57: If the following codes are received, state whether there have been any errors, and give the decoded output. (Assume that the probability of there being more than one error in a received codeword is negligible.) i. 1101011 The decoding can either be done by looking for the closest match among the codewords in Table 3.4, or by calculating the syndrome. i) 1101011. X Y A Z B C D 1 2 3 4 5 6 7 1 1 0 1 0 1 1 Parity 1 tests parity on digits 1, 3, 5 and 7: 1101011 => 1001, this has an Even, so passes. the syndrome is (0) ABDX : 0011 Prepared by: Dr. Saatchi, Seyed Mohsen 17

Parity 2 tests parity on digits 2, 3, 6 and 7: 1101011 => 1011, this has an Odd, so Fail. the syndrome is (1) ACDY : 0111 Parity 3 tests parity on digits 4, 5, 6 and 7: 1101011 => 0000, this has an Odd, so Fail. the syndrome is (1) BCDZ : 0111 Writing 0 for a pass and 1 for a fail, the syndrome is (110). This is the binary for 110 is 6, indicating that digit number 6 is in error. 4 2 1 1 1 0 4+2 = 6 so the denary for 110 is 6 The number 6 is the location of error for 1101011, it will be 0 like 1101001 Last Step: The corrected codeword is therefore 1101011. The decoded data is extracted from the corrected codeword (digits 3, 5, 6 and 7): 0011 Q57: Two machines A and B are using a (7, 4) Hamming code to detect errors during transmission. The codeword 0010110 is received by B. State whether there have been any errors, and give the decoded output. (Assume that the probability of there being more than one error in a received codeword is negligible.) X Y A Z B C D 1 2 3 4 5 6 7 0 0 1 0 1 1 0 The three parity checks are as follows: Parity 1 tests parity on digits 1, 3, 5 and 7: 00 10 11 0 => 0110. This has an Even number of ones (two), so passes, the syndrome is (0) Prepared by: Dr. Saatchi, Seyed Mohsen 18

ABDX : 1100 Parity 2 tests parity on digits 2, 3, 6 and 7: 00 10 11 0 => 0110 This has an Even number of ones (two), so passes. the syndrome is (0) ACDY : 1100 Parity 3 tests parity on digits 4, 5, 6 and 7: 00 10 11 0 => 0110 This has an Even number of ones (none), so passes. the syndrome is (0) BCDZ : 1100 All three parity checks pass, so the syndrome is 000, and there are no errors. The decoded data is just extracted from the codeword (digits 3, 5, 6 and 7): 00 10 11 0 => 1110. Q59: Verify if the following (7, 4) hamming codeword is correct or not, and find the message. 1101001 if the message is ABCD, the hamming codeword is XYAZBCD with X Y A Z B C D 1 2 3 4 5 6 7 1 1 0 1 0 0 1 Parity 1 tests parity on digits 1, 3, 5 and 7: 1101001 => 1001, this has an Even number of ones (two), so passes, the syndrome is (0) ABDX : 0011 Parity 2 tests parity on digits 2, 3, 6 and 7: 1101001 => 1001, this has an Even number of ones (two), so passes, the syndrome is (0) ACDY : 0011 Parity 3 tests parity on digits 4, 5, 6 and 7: 1101001 => 1001, this has an Even number of ones (two), so passes, the syndrome is (0) BCDZ : 0011 o ABDX : 0011 => syndrome 0 o ACDY : 0011 => syndrome 0 Prepared by: Dr. Saatchi, Seyed Mohsen 19

o BCDZ : 0011 => syndrome 0 Last Step: The corrected codeword is therefore 1101001 The decoded data is extracted from the corrected codeword (digits 3, 5, 6 and 7): 0001 Q60: If the following codes are received(they have been encoded using the sevendigit Hamming code )), state whether there have been any errors(using the table2 below), and give the decoded output. (Assume that the probability of there being more than one error in a received codeword is negligible.) (i) 1110000 (ii) 1000010 (i) 1110000 if the message is ABCD, the hamming codeword is XYAZBCD with X Y A Z B C D 1 2 3 4 5 6 7 1 1 0 1 0 0 1 o ABDX : 0011 => syndrome 0 o ACDY : 0011 => syndrome 0 o BCDZ : 0011 => syndrome 0 Last Step: The corrected codeword is therefore 1110000, the decoded data is extracted from the corrected codeword (digits 3, 5, 6 and 7): 1000 Prepared by: Dr. Saatchi, Seyed Mohsen 20

(ii) 1000010 if the message is ABCD, the hamming codeword is XYAZBCD with X Y A Z B C D 1 2 3 4 5 6 7 1 0 0 0 0 1 0 o ABDX : 0001 => syndrome 1 o ACDY : 0100 => syndrome 1 o BCDZ : 0100 => syndrome 1 Last Step: Writing 0 for a pass and 1 for a fail, the syndrome is (111). This is the binary for 110 is 6, indicating that digit number 6 is in error. 4 2 1 1 1 1 4+2+1 = 7 so the denary for 111 is The number 7 is the location of error for 1000010 => 1000011, All three parity checks pass, so the syndrome is 000, and there are no errors. The decoded data is just extracted from the codeword (digits 3, 5, 6 and 7): 1000011=> 0011. i) Scanning through the code words in Table 1, the received codeword 1110000 is found to be a valid codeword corresponding to the original data word 1000. ii) Scanning through the code words in Table 1 we can t find any match,calculating the hamming distance strating for the first row, we Prepared by: Dr. Saatchi, Seyed Mohsen 21

found that the fourt row Has a hamming distance equal to one, so the original massage has to be 0011. Q61: Calculate the (7,4) hamming code corresponding to the following message : 1101. Explain your answer. if the message is ABCD, the hamming codeword is XYAZBCD with X Y A Z B C D?? 1? 1 0 1 A B C D 1 1 0 1 o ABDX : 111X => X= 1 o ACDY : 101Y => Y= 0 o BCDZ : 101Z => Z= 0 So, to find the codword for XYAZBCD =>?? 1? 1 0 1 X=1, Y= 0, Z = 0, A = 1, B = 1, C = 0, D =1 So, the codeword is 1010101 Q62: What should be the minimum hamming distance for a code to be able to correct 7 erroneous bits? n for odd = (n-1)/2 n for even = (n/2) 1 If n is odd => (n 1) / 2 = 7, => 2x7+1 => n = 15 If n is even => (n/2) 1, =>n+1x2, => (7+1)x2 = 16 The minimum distance is 15 Q63: A technique which can be employed to allow error-correcting codes to protect against bursts is interleaving. True Q64: The interleaving takes place after the coding at the transmitter, and the deinterleaving takes place before the decoding at the receiver. Prepared by: Dr. Saatchi, Seyed Mohsen 22

That is, the sequence is: coding interleaving channel de-interleaving decoding If we now have a burst of four errors on the channel, so that four consecutive bits in the data arriving at the receiver are errored, the de-interleaving has the effect of spreading out the errors so that each of the four codewords contains only a single error, which can be corrected. True Q65: Low density parity check (LDPC) codes are block codes based on parity checks. True Q66: Calculate the check digit, and so derive the full EAN-13 code, for the following: 978-052142557 The first Step: we found 978-052142557 has 12 digits, so we have to find the last 13 digits: Adding together the odd digits: 9 + 8 + 5 + 1 + 2 + 5 = 30 The second Step: Adding together the even digits: 7 + 0 + 2 + 4 + 5 + 7 = 25 The third Step: And multiplying by 3 gives = 25 x 3 = 75. The fourth Step: Adding these two together gives 30 + 75 = 105. The sixth Step: Taking this result modulo-10 amounts to taking the units digit, which is 5. Finally, the check digit is 10-5 = 5. So, The EAN-13 code is therefore 978-0521425575. Q67: Explain if the following EAN-13 code (878-012142463-4) is correct or not. You should detail the different steps. First step: the no 878-012142463-4 has 13 digits, so we have to check if there is an error on last digit 4: Adding together the odd digits: 8 + 8 + 1 + 1 + 2 + 6 = 26 Note: don t sum number (4), because it position is 13 Prepared by: Dr. Saatchi, Seyed Mohsen 23

Second step: Adding together the even digits: 7 + 0 + 2 + 4 + 4 + 3 = 20 Third step: Multiply 20 by 3 => 3X 20 = 60 Fourth step: Adding 60 + 26 Adding these two together gives 86. Fifth step: Taking this result modulo-10 amounts to taking the units digit, which is finally, the check digit is 10-6 = 4. While the received one is 4, so there is no error on the code. Because EAN-13 code (878-012142463-4) last number is equal 4. Q68: barcode machine is reading the following full EAN-13 code and is about to check it for eventual error. You are asked to do the check manually for an eventual error: 878-0121424637 The first step: We have threen digits, so we have to check if the last number has an error or not: Adding together the odd digits: 8 + 8 + 1 + 1 + 2 + 6 = 26 The second step: Adding together the even digits: 7 + 0 + 2 + 4 + 4 + 3 = 20 The third step: Multiply 20 X 3 = 60 The fourth step: Adding 60 + 26 = 86 Adding these two together gives 86. Taking this result modulo-10 amounts to taking the units digit, which is 6. Finally, the check digit is 10-6 = 4. While the received one is 7, so there is an error on the code., because of Ean-13 code 878-0121424637 last number not matching the number 4. Q69: What Calculate the check digit, and so derive the full EAN-13 code, for the following: 678-052142576 We have 12 digits and we have to find the last threen digits: The first step: Adding together the odd digits: 6 + 8 + 5 + 1 + 2 + 7 = 29 The second step: Adding together the even digits: 7 + 0 + 2 + 4 + 5 + 6 = 24 Prepared by: Dr. Saatchi, Seyed Mohsen 24

The third step: Multiply the result of the second step x 3 24x3 = 72 The fourth step: Adding 72 + 29 = 101 The fifth step: Taking this result modulo-10 amounts to taking the units digit, which is 1. Finally, the check digit is 10-1 = 9. The EAN-13 code is therefore 678-0521425769 Q70: The following information is found in a memory chip data sheet indicating the memory organization : 32768 bits x 128 pages x 4096 blocks x 2 planes. taking into consideration that the organization is presented from the smallest unit size (bit) to the largest unit size (plane). Calculate the following A. The size of a memory in KiloBytes Size of memory in KB = 32768 / (1024 x 8) = 4Kbytes B. The size of a memory page in MigaBytes Size of memory page in MB = 4K x 128 / (1024) = 0.5 Mbytes C. The size of a memory block in GigaBytes Size of memory block in GB = 0.5 x 4096 x 2 / (1024) = 4 Gbytes Q71: Consider the following Convolutional encoder. What it the codeword corresponding to the message 110? detail your answer by drawing the states of the encoder (values stored in the registers, input bit, inputs of the XOR gates and output bits). Assume that the registers M1 and M2 are initialized to zeros at the beginning. and that the input bits are fed to the convolutional encoder starting with the most significant bit (1 then 1 then 0). Prepared by: Dr. Saatchi, Seyed Mohsen 25

Q72: The following questions (a and b) are independent a. Consider the following convolutional encoder. The two registers are initialized to zeros at the beginning. The + operations correspond to simple XOR operations. a. What is the code rate of this encoder? Justify your answer => One input bit corresponds to two output bits => the code rate is ½ b. What will be the output of the following sequence: (101)? Start with the most significant bit. Detail your answer; draw the different states of the encoder for each input bit. Prepared by: Dr. Saatchi, Seyed Mohsen 26

Q73: Consider the following encoder (Figure 1) of a convolutional code. Each input bit is encoded into two bits transmitted to the channel. The D rectangles are buffers and the circles correspond to XOR operations. Assume that the buffers of the encoder are initialized to zeros, what will be the output sequence corresponding to a (1010) input sequence. You should draw each step of the encoder (Fill the white rectangles in the four figures below). Note: Start encoding the most significant bit. The first step: Prepared by: Dr. Saatchi, Seyed Mohsen 27

The second step: The Third step: Prepared by: Dr. Saatchi, Seyed Mohsen 28

The fourth step: So, Thus the output of the encoder is : 01101010 Good Luck, Prepared by: Dr. Saatchi, Seyed Mohsen 29