@manu00x or @joshi_nitish.

The Gateway to Computer Science Excellence

+1 vote

Flag 0111 means in data part you have to stuff a 0 after every occurence of 11. So given data part is 011111 So after bit stuffing it will be 01101101

If flag contain consecutively n one then in data part you havr to stuff a 0 after every (n-1) one

0

flag 0111 means that we must stuff bit after every occurrence of 011 not 11. In forouzan it is mentioned as "In bit stuffing, if a 0 and five consecutive 1 bits are encountered, an extra 0 is

added for flag 01111110."

added for flag 01111110."

0

+2

i have also read in frouzan that we have to stuff 0 after occurence of 011.. but in other books like tennebaum and lectures of neptel i have found that they used the method of stuffing after occurence of 11... its really confusing which way to opt.

0

Actually I asked this question for altogether different reason. If we stuff 0 after every 011 (flag is 0111) then the data will be 011* 0*111 . Here after stuffing 0, at the end we have 0111 which is same as flag and the problem is not solved.

0

Well your answer lies in our discussion.. Because if you go through the approach that 0 will be added after every 11 then there will be no problem isn't??

0

+1

http://web.mit.edu/modiano/www/6.263/lec2.pdf

I have seen previous year gate paper in that they use to stuff 0 bit after every n-1 occurrences of 1.

- All categories
- General Aptitude 1.9k
- Engineering Mathematics 7.5k
- Digital Logic 2.9k
- Programming and DS 4.9k
- Algorithms 4.3k
- Theory of Computation 6.2k
- Compiler Design 2.1k
- Databases 4.1k
- CO and Architecture 3.4k
- Computer Networks 4.1k
- Non GATE 1.5k
- Others 1.5k
- Admissions 595
- Exam Queries 576
- Tier 1 Placement Questions 23
- Job Queries 72
- Projects 17

50,648 questions

56,422 answers

195,196 comments

99,864 users