+ All Categories
Home > Documents > Data Transmission and Networks

Data Transmission and Networks

Date post: 03-Jan-2016
Category:
Upload: neve-robbins
View: 34 times
Download: 0 times
Share this document with a friend
Description:
Data Transmission and Networks. Transmission error checking & correcting. Learning Objectives. Discuss the use of check sums and parity bits to reduce transmission errors. Transmission error checking and correcting. Errors are inevitable when transmitting a large number of bits. - PowerPoint PPT Presentation
Popular Tags:
14
Data Transmission Data Transmission and and Networks Networks Transmission error Transmission error checking & correcting checking & correcting
Transcript
Page 1: Data Transmission  and  Networks

Data Transmission Data Transmission and and

NetworksNetworks

Transmission error checking & Transmission error checking & correctingcorrecting

Page 2: Data Transmission  and  Networks

Learning ObjectivesLearning Objectives

Discuss the use of check sums and parity bits to reduce transmission errors.

Page 3: Data Transmission  and  Networks

Transmission error checking and correctingTransmission error checking and correcting

Errors are inevitable when transmitting a Errors are inevitable when transmitting a large number of bits.large number of bits.Luckily there are only two possible Luckily there are only two possible mistakes that can occur:mistakes that can occur:

EitherEither a 1 is received as a 0a 1 is received as a 0Or Or a 0 is received as a 1. a 0 is received as a 1.

Page 4: Data Transmission  and  Networks

Echo BackEcho Back

Send the data back again. Send the data back again. If the data that is sent back is the same as the data If the data that is sent back is the same as the data

that was sent in the first place then the original data that was sent in the first place then the original data must have reached its destination correctly, if not then must have reached its destination correctly, if not then it needs to be sent again. it needs to be sent again.

Advantage:Advantage: Very effective, Very effective,

Disadvantage:Disadvantage: Data has to be sent twice:Data has to be sent twice:

SlowSlowNeeds duplex (or at least half duplex) transmission mode to Needs duplex (or at least half duplex) transmission mode to allow data transfer in both directions.allow data transfer in both directions.

Page 5: Data Transmission  and  Networks

Parity bitParity bit

Used in every byte to force every byte to Used in every byte to force every byte to either have an odd or even number of 1s.either have an odd or even number of 1s. The Number of 1s in a byte must always be The Number of 1s in a byte must always be

either an odd number or an even number. either an odd number or an even number.

As long as both devices agree to either As long as both devices agree to either even or odd parity then this can be even or odd parity then this can be checked by the receiving device after each checked by the receiving device after each byte is received.byte is received.

Page 6: Data Transmission  and  Networks

Parity ExampleParity Example

If odd parity is agreed between two devices then if a byte If odd parity is agreed between two devices then if a byte is received that has an even number of 1s, an error must is received that has an even number of 1s, an error must have occurred.have occurred.

The sender wishes to send 1011000The sender wishes to send 1011000 ?? ?? is the parity bit which is not part of the data it wishes to send. is the parity bit which is not part of the data it wishes to send.

As odd parity is used then it sets the parity bit to As odd parity is used then it sets the parity bit to 0 0 to make the to make the byte have an odd number of 1’s (3).byte have an odd number of 1’s (3).

So the sender sends 1011000So the sender sends 101100000 When it is sent there is an error in transmission so that the last When it is sent there is an error in transmission so that the last

bit is received as a one. bit is received as a one. So, the byte received is 10110010So, the byte received is 10110010 This has 4 ones in it, which is an even number, so there must be This has 4 ones in it, which is an even number, so there must be

an error. an error. The receiving device would ask for it to be sent again. The receiving device would ask for it to be sent again.

Page 7: Data Transmission  and  Networks

ASCII (AASCII (American merican SStandard tandard CCode ode for for IInformation nformation IInterchange)nterchange)

Represents each character in a standard character set Represents each character in a standard character set as a single byte binary code.as a single byte binary code.The standard code form that most PCs use to allow for The standard code form that most PCs use to allow for communication between systems. communication between systems. Usually uses a 7 bit binary code so can store 128 Usually uses a 7 bit binary code so can store 128 different characters and simple communications different characters and simple communications protocols.protocols.Sufficient for all characters on a standard keyboard Sufficient for all characters on a standard keyboard plus control codes.plus control codes.

This means that 1 bit is free to be used for This means that 1 bit is free to be used for something else (i.e. a parity bit).something else (i.e. a parity bit).

Page 8: Data Transmission  and  Networks

Notes:Notes:

Even parity can equally well be used, as long as Even parity can equally well be used, as long as it has been agreed between the two devices.it has been agreed between the two devices.

If two mistakes are made in the same byte they If two mistakes are made in the same byte they will cancel each other out and the faulty data will will cancel each other out and the faulty data will be accepted. be accepted. The solution to this is not part of this course.The solution to this is not part of this course.

Parity is not only used during data transfer Parity is not only used during data transfer between devices, but also when data is between devices, but also when data is transferred between different parts of the CPU.transferred between different parts of the CPU.

Page 9: Data Transmission  and  Networks

Summary of Summary of Bit Parity MethodBit Parity Method

Extra bit in each byte that does not Extra bit in each byte that does not transmit data.transmit data.

Makes number of ones in a byte be Makes number of ones in a byte be always even or always odd.always even or always odd.

Error in the transmission of a bit will Error in the transmission of a bit will make the even/odd wrong.make the even/odd wrong.

Problem of two errors in one byte not Problem of two errors in one byte not being found.being found.

Page 10: Data Transmission  and  Networks

Parity BlockParity Block

Odd parity Odd parity is being used.is being used.

Byte number 5 Byte number 5 has an has an even number of 1s even number of 1s therefore an therefore an errorerror..

Column 4Column 4 has an has an even number of 1seven number of 1s..

Therefore the Therefore the 00 inin row 5 row 5, , column 4 column 4 needs to be changed to needs to be changed to 11..

Page 11: Data Transmission  and  Networks

Check SumCheck Sum

Add all the bytes together that are being sent in Add all the bytes together that are being sent in a block of data. a block of data. Data will normally be sent as a block of bytes rather Data will normally be sent as a block of bytes rather

than as individual bytes. than as individual bytes.

The carry, out of the byte, is not taken into The carry, out of the byte, is not taken into account, so the answer is an 8 bit number, just account, so the answer is an 8 bit number, just like the bytes. like the bytes. This is calculated before the data is sent, and This is calculated before the data is sent, and then calculated again when it is received.then calculated again when it is received.If there are no errors in the transmission, the two If there are no errors in the transmission, the two answers will match.answers will match.

Page 12: Data Transmission  and  Networks

PlenaryPlenary

Can you explain the use of check sums and parity bits to reduce transmission errors?

Page 13: Data Transmission  and  Networks

Summary of Summary of Parity MethodParity Method

Extra bit on each data-byte that does not Extra bit on each data-byte that does not transmit data.transmit data.

Makes number of ones in a byte be Makes number of ones in a byte be always even or always odd.always even or always odd.

Error in the transmission of a bit will Error in the transmission of a bit will make the even/odd wrong.make the even/odd wrong.

Problem of two errors in one byte not Problem of two errors in one byte not being found.being found.

Page 14: Data Transmission  and  Networks

Check SumCheck Sum

Add all the bytes together that are being sent in Add all the bytes together that are being sent in a block of data. a block of data. Data will normally be sent as a block of bytes rather Data will normally be sent as a block of bytes rather

than as individual bytes. than as individual bytes.

The carry, out of the byte, is not taken into The carry, out of the byte, is not taken into account, so the answer is an 8 bit number, just account, so the answer is an 8 bit number, just like the bytes. like the bytes. This is calculated before the data is sent, and This is calculated before the data is sent, and then calculated again when it is received.then calculated again when it is received.If there are no errors in the transmission, the two If there are no errors in the transmission, the two answers will match.answers will match.


Recommended