Lab Bitstff, Hamming Code
Lab Bitstff, Hamming Code
2
Bit Stuffing
• Each frame begins and ends with a special bit pattern
called a flag byte [01111110]. {Note this is 7E in hex}
• Whenever sender data link layer encounters five
consecutive ones in the data stream, it automatically stuffs
a 0 bit into the outgoing stream.
• When the receiver sees five consecutive incoming ones
followed by a 0 bit, it automatically destuffs the 0 bit
before sending the data to the network layer.
0110111111100111110111111111100000
Stuffed Stream
01101111101100111110011111011111000000
Stuffed bits
Unstuffed Stream
0110111111100111110111111111100000