This is a C++ based application to stuff the bits into the sending code in the data link layer.
1. A code 01111110 must be appended at the beginning and the ending of the message(sending bits).
2. Whenever there are five continuous 1's in the input (sending bits) then a zero '0' must be appended at the end of the five repeated 1's.
1. Enter the number of bits to be sent.
2. It checks for whether the given input is binary or not.
3. Then in appends the code 0111110 in the beginning.
4. Checks the each bit in the given input for repeated 1's
5. If five repeated 1s are found 0 is appended and then the next digit is appended.
6. This cycle repeats until all the input bits are completed.
7. Appends the code 0111110 at the end.
Thus the required stuffed code is ready to send.