What is the character count? Explain with an example?


Data link layer translates the physical layers raw bit stream into discrete messages called frames. Now the question is how can a frame be transmitted, so the receiver can recognize the start and end frame?

Techniques

The techniques we used to find the start and end frame are −

  • Character count
  • Flag byte with byte stuffing
  • Starting and ending flag with bit stuffing
  • Encoding Violation.

Now let us see the character count technique.

Character Count

First framing method uses a field in the header to specify the number of characters in the frame. When the data link layer at the destination sees the character count, it knows how many characters follow and hence where the end of the frame is.

For Example,

Consider a data − 1 2 3 4 5 6 7 8 9 0 1 2 3

Divide this data into three frames −


1234

First empty box used for the header indicates character count.


5678



90123

Explanation

Step 1 − Starting header in the frame indicate the character count, so first frame consists of 5 units of data including that number,

Step 2 − Second frame header consists of 5 units of data including that number, so second frame consists of data 5,6,7,8. 8 indicate the end of the frame here.

Step 3 − Third frame header consists of character count 6 that means the frame consists of 6 characters including 6. So the data in the third frame is 9,0,1,2,3.

Step 4 − My data transfer to the receiver side without any errors.

Explanation

Step 1 − Starting header in the frame indicates the character count, so the first frame consists of 5 units of data including that number.

Step 2 − Second frame header consists of 7 character count including that number actually it is an error, even though error is there the data will be transmitted, so second frame consists of data 5,6,7,8,6,9. Here, 9 indicate the end of the frame here.

Step 3 − Third frame header consists of character count 0 that means the frame consists of 0 characters. The last frame data is discarded.

Step 4 − My data transfer to the receiver side with errors.

Updated on: 09-Sep-2021

7K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements