CS 2001: Internet Technologies 2005

Internet Technologies – Networking Technologies

Lesson Introduction
In this lesson we will discuss Transmission Errors, Error Control, Error Detection, Error Correction, Hamming Codes, Data Encryption and Data Compression in details

2

Internet Technologies – Networking Technologies

Lesson Objectives
► ► ► ► ►

$escribe the reliability and the security aspects o the trans!itted in or!ation "nderstand the trans!ission errors and !echanis!s used to o#erco!e errors $iscuss the approaches a#ailable to ensure the pre#ention o unauthori%ed access "nderstand the ad#antages o data co!pression Try out the co!pression !echanis!s a#ailable
3

Internet Technologies – Networking Technologies

Transmission Errors
►During ►

the data transmission there can be many errors hat important is how the user at the other end can receive data correctly and securely this session we would discuss what transmission errors are and what strategies we can use to overcome those problems
4

►During

Internet Technologies – Networking Technologies

Error Control
$ecessary to protect the data !rom errors ► "ser in the other end has to receive them reliably ► #any cases we cannot depend on the communication line
► ► ►

$eed an error control mechanism to detect errors and in some cases correct them too There are two error control mechanism that we are going to discuss under error control
 %orwarderrorcontrolapproaches  %eedbac&errorcontrolapproaches
5

Internet Technologies – Networking Technologies

%eedbac& error control mechanism
►)ends ►I!

only the in!ormation that need to detect the error

it !inds error in the !rame then it sends a repeat re'uest this scheme additional bits need to send !or error detection is very low compared to %orward error correction mechanism(
6

►In

Internet Technologies – Networking Technologies

%orward error control approach
►In

!orward error correction mechanism details need to detect and correct the errors are also sends over the communication line used in lin&s where retransmission is impossible the transmission sender sends redundant in!ormation along with the data bits and using this receiver can detect and correct errors
7

►#ainly

►During

Internet Technologies – Networking Technologies

Error detection
►Error

detection means detecting errors in the received message detection is very important as it needs to as& retransmit the !rame again

►Error

8

Internet Technologies – Networking Technologies

*arity chec&

"sed to determine whether data has been lost or changed during the transmission ► #eaning o! the parity is e'ual or e'uivalent which came !orm the Latin ► In parity chec& additional bit called parity bit is added to the data bits( ► There are & types o parity checking
    1's (#en parity 1's odd parity 0's e#en parity 0's odd parity

9

Internet Technologies – Networking Technologies

+,s even parity
►Total

number o! +,s in the whole string is maintained at even number o! +,s

►$umber

o! -+. in the data string is counted and adds the additional bit which is called parity bit, to ma&e the count o! the +,s in the string including the parity bit, to become an even number o! +,s
10

Internet Technologies – Networking Technologies

+,s even parity E/ample
►Let,s ►In

consider the string -++00+0++.

this string, count o! +,s is 1 ►2dditional parity bit is added to ma&e it an even number
►)o

the new string is -++00+0++3+. ►$ow the count o! the +,s is 4 and it is even
11

Internet Technologies – Networking Technologies

+,s odd parity
►Total ►In

number o! +,s in the whole string is maintained odd number o! +,s

+,s odd parity number o! -+,s. in the data string is counted and adds the additional bit which is called parity bit, to ma&e the count o! the +,s in the string including the parity bit, to become an odd number o! +,s
12

Internet Technologies – Networking Technologies

+,s odd parity E/ample
►Let,s ►In

consider the string -000+0+++.

this string count o! +,s is 5 ►2dditional bit is added to ma&e it an odd number
►)o

the new string is -000+0+++ 3+. ►$ow the count o! the +,s is 1s and it is an odd number
13

Internet Technologies – Networking Technologies

0,s even parity
►In

this parity method total number o! 0,s in the whole string is maintained even number o! 0,s 0,s even parity number o! -0. in the data string is counted and adds the additional bit which is called parity bit, to ma&e the count o! 0,s in the string to become an even number o! 0,s
14

►In

Internet Technologies – Networking Technologies

0,s even parity E/ample
►Let,s ►In

consider the string -++00+0++.

this string count o! 0,s is 6 ►2dditional parity bit is added to ma&e it an even number o! -0.
►)o

the new string is -++00+0++30. ►$ow the count o! the 0,s is 5 and it is even
15

Internet Technologies – Networking Technologies

0,s odd parity
►In

this parity method total number o! 0,s in the whole string is maintained odd number o! 0,s In 0,s odd parity number o! -0. in the data string is counted and adds the additional bit which is called parity bit, to ma&e the count o! 0,s in the string to become an odd number o! 0,s
16

Internet Technologies – Networking Technologies

0,s odd parity E/ample
►Let,s ►In

consider the string -+00+0+++.

this string count o! 0,s is 6 ►2dditional bit is added to ma&e it an odd number
►)o

the new string is -+00+0+++ 3+. ►$ow the count o! the 0,s is 6 and it is an odd number
17

Internet Technologies – Networking Technologies

7loc& sum chec&
►In

bloc& sum chec& it,s rather chec&ed a bloc& o! bits than a one row o! bits

►Let,s

understand it by an e/ample ►In this e/ample we use the +,s even parity to chec& the row parity and +,s even parity !or columns too
►I!

any bit is !lipped during the data transmission we can !ind it out
18

Internet Technologies – Networking Technologies

7loc& sum chec& contd(
R1 R2 R3 R4 R5 R6 R7 R8 R9 C1 1 1 0 1 1 0 1 0 1 C2 0 0 1 1 0 0 1 1 0 C3 1 0 0 1 1 0 1 1 1 C4 0 0 0 1 1 0 1 1 0 C5 1 0 0 0 1 0 1 1 0 C6 1 0 0 0 0 1 1 0 1 C7 1 1 0 0 0 1 1 0 0 C8 1 1 0 0 1 1 1 0 1 C9 0 1 1 0 1 1 0 0 0
19

Internet Technologies – Networking Technologies

%rame chec& se'uence
►This ►In

is also mechanism

an

error

detection

generally e/tra characters 8parity bits9 added to the end o! the bit string

that it can detect any errors ►In this mechanism parity bits were calculated using a polynomial
20

►)o

Internet Technologies – Networking Technologies

%rame chec& se'uence
►*arity

contd(

or its derivative bloc& sum chec& does not provide a reliable detection scheme against error burst address this we can use polynomial codes

►To ►2

single set o! chec& digits is generated !or each !rame transmitted based on the content o! the !rame
21

Internet Technologies – Networking Technologies

%rame chec& se'uence
► ► ►

contd(

The receiver then per!orms a similar computation on the complete !rame and chec& digits I! no errors have been induced a &nown result should be obtained

I! a di!!erent answer is !ound this indicate an error ► The computer chec& bits are re!erred to be !rame chec& se'uence or cyclic redundancy chec& digits

22

Internet Technologies – Networking Technologies

%rame chec& se'uence
►Let ►Let ►Let

contd(

#8/9 be a &3bit number 8the message to be transmitted9 :8/9 be an 8n ; +9 bit number 8the divisor or generator9 <8/9 be an n3bit number such that & =n 8the reminder9

23

Internet Technologies – Networking Technologies

Error Correction
#8/9 > ?n @ A8/9 ; 3333333333333 :8/9 <8/9 333333 :8/9

#8/9 > ?n ; A8/9 @ A8/9 333333333333333333333 :8/9 #8/9 > ?nd @ A8/9 ; 33333333333333 :8/9 <8/9 ; 333333 :8/9 <8/9 333333 :8/9

24

Internet Technologies – Networking Technologies

Hamming Codes
► ► ► ► ►

► ► ►

)ome times it is better to use error detection and the re'uest a retransmission than try to correct the error 7ut in same cases it is better to use error correction mechanism One method is hamming codes and it can detect and correct one bit error "sually a message consists o! data bits e can add additional chec& bits to the original data bits which will enable the receiver to detect and correct errors and this whole bit set is called )codeword* The minimum number o! bit positions in which two valid codeword di!!er is &nown as the Hamming distance o! the code To detect n errors we have to use code scheme with hamming distance n;+ To correct n errors we need ?n;+ hamming distance
25

Internet Technologies – Networking Technologies

Hamming Codes

contd(

*lace chec& bits among data bits ► Chec& bits are placed in the power o! ?,s positions ► The data bits are corrected by the chec& bits whose positions add up to the position o! each o! the data bit
► ►

The values o! the chec& bits are calculated !orm the values o! the data bit covered that chec& bits Calculation is E/clusive O<
26

Internet Technologies – Networking Technologies

Hamming BC5 mechanism
►"se ►5

5 chec& bits !or B data bits

chec& bits are placed on the position o! the power o! ? even parity bit mechanism @= chec& + bit s&ip + bit chec& + bit D( @= s&ip + bit chec& ? bit s&ip ? bit D(( @= s&ip 6 bits chec& 5 bits s&ip 5 bitsD @= s&ip B bits chec& E bits s&ip E bitsD
27

►"se ►C+ ►C? ►C6 ►C5

Internet Technologies – Networking Technologies

Hamming Codes
►E/ercise ►The

contd(

!ollowing hamming code has been set as the data bits the code word

►+0++0++ ►Calculate

28

Internet Technologies – Networking Technologies

Hamming Codes
►E/ercise ►0+++00+ ►+0+0+00 ►+++000+ ►+0+0000 ►+++++++ ►0000000

contd(

F Calculate the hamming code

29

Internet Technologies – Networking Technologies

Hamming Codes
►Error

contd(

Correction

     

:et the received codeword E/tract the in!ormation bits <ecalculate the codeword %ind the errorness bits %ind the inde/ o! errorness bits Invert the 7it and get the correct code
30

Internet Technologies – Networking Technologies

Hu!!man Encoding
Hu!!man encoding mechanism is statistical system ► It is obvious that we can !ind some !re'uently applied characters
► ► ► ►

I! we can encode them with !ewer bits, then we can save some space %irst the set o! characters to be transmitted is analyGed and their relative !re'uencies determined Then we can create the Hu!!man code tree which is an unbalanced binary tree
31

Internet Technologies – Networking Technologies

7uilding Hu!!man Encoding
► ►

Consider each o! the letters as a symbol with its respective probability %ind the two symbols with the smallest probability and combine them into a new symbol with both letters by adding the probabilities There may be a choice between two symbols with the same probability I! this is the case, either symbol can be chosen The !inal tree and codes will be di!!erent, but the overall e!!iciency o! the code will be the same <epeat step ? until there is only one symbol le!t with a probability o! +
32

► ► ► ►

Internet Technologies – Networking Technologies

7uilding Hu!!man Encoding

To see the code, redraw all the symbols in the !orm o! a tree, where each symbol contains either a single letter or splits up into two smaller symbols Label all the le!t branches o! the tree with a + and all the right branches with a 0 The code !or each o! the letters is the se'uence o! 0Hs and +Hs that lead to it on the tree, starting !rom the symbol with a probability o! +
33

► ►

Internet Technologies – Networking Technologies

7uilding Hu!!man Encoding
►E/ercise ►encode

the letters listed with their respective probabilities
 2 80(+?9  E 80(5?9  I 80(0I9  O 80(609  " 80(0B9
34

Internet Technologies – Networking Technologies

7uilding Hu!!man Encoding

E/ercise
  2 80(?09, 7 80(0I9, C 80(+19, D 80(++9, E 80(509, % 80(019 2 80(019, C 80(059, E 80(+49, : 80(0?9, I 80(059, L 80(0B9, # 80(0I9, $ 80(0E9, O 80(+?9, < 80(0E9, ) 80(0I9, T 80(+09, " 80(059, J 80(0?9 2 80(059, 7 80(0?9, C 80(069, D 80(069, E 80(+69, % 80(0+9, : 80(0?9, H 80(0?9, I 80(069, K 80(0+9, L 80(0?9, L 80(049, # 80(0B9, $ 80(049, O 80(+09, * 80(0?9, A 80(0+9, < 80(049, ) 80(0B9, T 80(0E9, " 80(069, M 80(0?9, 80(0?9, > 80(0+9, J 80(0?9, N 80(0+9
35

Internet Technologies – Networking Technologies

End o! Lesson 5

36