information processes and technology hsc communications unit

Post on 24-Jun-2015

540 Views

Category:

Education

0 Downloads

Preview:

Click to see full reader

DESCRIPTION

Communictions and networking content for HSC Information Processess and Technology

TRANSCRIPT

Networks

And Communication Systems

Protocols

• Defined as a set of rules for communication

Handshaking

• 2 devices will “shake” hands to establish what kind of protocol to use. This involves things like:

• Are you ready for communication? (session level)

• What speed can you talk at ( Application level. flow control)

Error checking methods

• When data is sent, it can get damaged or lost or corrupted. Therefore data must be somehow checked for correctness.

What happens when things go wrong?

First we have to find if something has gone wrong

• Error detection is the most important step in the process of getting correct data. How do we detect an error?

Summary!For the exam, you must therefore think of it in 2 parts

1) Error Detection

2) Error Correction

Error Detection

• Parity check

• Checksum

• Cyclic Redundancy Check

Parity Checkparity “to be equivalent to or the same”

A byte of information is made of 8 bits

The first 7 bits are used to transmit data, the 8th bit is added to mark the total number of 1s as either odd or even. It is then used to check if the data is correct. (It is the number of 1s that is checked)

Odd & Even Parity in use

Parity Bit of 0 is added to keep the total number of 1s as even

Example of even parity 10101010

10000111 Parity Bit of 1 is added to keep the totals # of 1s as even.

Example of odd parity

11100000Parity bit of 0 is added to keep the total # of 1s as odd

11000001In this case a 1 is added to keep the total number of 1s as odd

Even and Odd Parity

• Parity can be set at even or odd

Parity in use…Suppose we send the letter A in ASCII. It might

consist of the following 7 0s and 1s

1001101 0

If we count the 1s, there are 4 which is an even number

The last 8th bit is used to indicate that there was an even number of 1s

If the A is corrupted and arrives with an odd number of 1s

1001100 0

If we count the 1s, there are now 3 which is an odd number

This indicates that the number of 1s should be even.

Therefore an error has taken place.

Problems with Parity

If more than one error occurs then it might cancel the check out. This is

known as “bit swapping”

The parity bit may be corrupted, changing the end result.

More than one error could occur within the first seven bits, cancelling

out the detectable error (bit swapping)

Parity problems

1001100 0

1001101 0Original

Received with 1 detected error

1001000 0Cannot detect 2 errors as parity is even

The second group of bits has an even number of 1s and therefore it is accepted as correct.

Introduction to Checksum

Checksum checks blocks of data made up of bytes rather than individual bytes.

10101010 100101010 11101010 11101010

Entire block of data is checked using a checksum made up of the the last byte

in the block

Added up value /256 =

Pros and Cons of Checksum

Pros: More accurate than parity. Faster as blocks of data can be checked.

Cons: The precise byte or bytes in error can’t be identified so entire block must be retransmitted.

Checking long message blocks is not reliable,

Example of Checksum

I run above and get

checksum of 36

I run above and get checksum of

36 too. Data block is correct

Cyclic Redundancy Check

• CRC is the most accurate error checking method.

• It uses much larger numbers than Checksum

• Like checksum it checks a block of data

• High level of accuracy with 16 bit check or a 32 bit check

Cyclic Redundancy Check

12 9 18 24

The values of each of the block are read as 1 big number

00011100 00001001 00010010 00011000

58,790,424/16 or 32 bit CRC value

I run above and get CRC

of 3692

I run above and get CRC of 36

92too. Data block is correct

Error Correction

• When an error is detected using Parity, Checksum or CRC, then the error must be corrected.

Methods of Error Correction

• Retransmission – The receiving computer having detected the error requests that the data block be transmitted again.

I got an error, please send that last block again!

Retransmit

Symbol Substitution

• The receiving computer will replace faulty symbols with a substitute symbol such as

It will then run a spell check to try and correct the data –example love you would be corrected to I love you. This does not always work.

Error Correction Code (ECC)

• ECC is a technique that sends “extra” data so that if there is an error, it can be corrected with the extra data. At least one extra byte must be sent for every eight bytes of data.

• Problems with this is that it is slow and much more data is sent overall. It is better to just resend each block of data that is in error,

top related