In data transmission and telecommunication, bit stuffing (also known—uncommonly—as positive justification) is the insertion of non information bits into data. Stuffed bits should not be confused with overhead bits.
Questions tagged [bitstuffing]
23 questions
14
votes
5 answers
bit stuffing example
I'm going over an example that reads
Bit Stuffing. Suppose the following bit string is received by the data link layer from the network layer: 01110111101111101111110.
What is the resulting string after bit stuffing? Bold each bit that has been…

Celeritas
- 14,489
- 36
- 113
- 194
6
votes
0 answers
Most pythonic way to implement byte stuffing algorithm
I'm doing some serial protocol stuff and want to implement a basic byte stuffing algorithm in python. I'm struggling to determine what is the most pythonic way to do it.
Byte stuffing is basically just replacing any "reserved" bytes with a pair…

Travis Griggs
- 21,522
- 19
- 91
- 167
4
votes
1 answer
Which data structure should I use for bit stuffing?
I am trying to implement bitstuffing for a project I am working on, namely a simple software AFSK modem. The simplified protocol looks something like this:
0111 1110 # burst sequence
0111 1110 # 16 times 0b0111_1110
...
0111 1110
...
…

Patrick Oscity
- 53,604
- 17
- 144
- 168
1
vote
1 answer
C++, implicit truncation from 'int' to bit field
I want to create a 64-bit data structure that each bit(s) should contain a value. for that, I have created a struct as follows. (this is related to J1939 protocol and ControlApplication NAME just in case)
typedef struct CA_NAME {
unsigned …

Amir-Mousavi
- 4,273
- 12
- 70
- 123
1
vote
2 answers
Discriminate bits after "bit stuffing"
I have written a piece of code to add a '0' after 6 consecutive '1' in a bit stream. But how to decode it?
Here an example of one bits stream:
original = {01101111110111000101111110001100...etc...}
stuffed =…
user11043025
0
votes
1 answer
How will be the bit stuffing applied to the identifier field 0x03E? (CAN PROTOCOL)
Suppose we are transmitting a message with identifier 0x03E.
Its binary in 11 bit form is 000 0011 1110. So while transmitting this how will it get stuffed?
After transmitting the first five zeros there will be a stuffed bit -> 000001.Then in the…

SUPERPIE
- 1
- 1
0
votes
0 answers
utl_lms.format_message | PL/SQL | URL correct in but dot is missing in href
I'm trying to send a mail with a link inside.
l_url := 'https://example.test.com/';
l_body := utl_lms.format_message('%s', l_url, l_url);
But here's what I have as result :

Hashka
- 395
- 3
- 10
0
votes
0 answers
How to do a integer division of a long int in c?
So i am writing a code for Bit Stuffing in C. What I am trying to do is take an input from user,keep on dividing the number to get each digit using "%" operator.This works as long as the no is in the range of int. If I use long int type,the …

Dexter
- 25
- 5
0
votes
1 answer
C Program don't have the same result when compiled on linux and windows
When I compile my program with mingw on windows and gcc on linux, the executable file doesn't give me the same result.
This code is supposed to take a file and encrypt it.
But when I need to add some bytes if the last block is not full or if the…

papi singe
- 31
- 4
0
votes
1 answer
Does Vehicle Spy software give visibility to CAN bus stuffed bits? If not, how can easily we see the stuffed bits?
I'm learning about bit stuffing in CAN bus messages. We're using Vehicle Spy software to extract the arbitration ids, data values, etc.
q1: Does Vehicle Spy give a tally of stuffed bits in each message? If so how do I see this?
q2: If not, then…

travelingbones
- 7,919
- 6
- 36
- 43
0
votes
1 answer
How i can calculate stuffbits in standard CAN 2.0A data frame
I have one CAN standard 2.0A frame which contain 8 Bytes of DATA.
e.g
CAN Frame Data "00 CA 22 FF 55 66 AA DF" (8 Bytes)
Now I want to check how many stuff bits would be add in this CAN frame(bit stuffing). standers formula to calculate the Worst…

Dingo
- 1
- 1
0
votes
1 answer
What happens when a "stuffed-string" is the original transmission?
Take this original string, and let the flag be "01111110" (0-bit stuffing):
0100111110101
After the bit stuffing, the resulting string is the same, but the meaning of the sequence 01111110 is different: it is interpreted as an original flag which…

fpluis
- 189
- 1
- 13
0
votes
1 answer
Bit stuffing help. GATE-CS Set 3 2014
A bit-stuffing based framing protocol uses an 8-bit delimiter pattern of 01111110. If the output bit-string after stuffing is 01111100101, then the input bit-string is
(A) 0111110100
(B) 0111110101
(C) 0111111101
(D) 0111111111
Correct answer…

BuggerNot
- 438
- 1
- 6
- 20
0
votes
1 answer
Bit stuffing in CAN bus
How does the receiving node (CAN bus) know that a bit stuffing is not an actual bit part of the data?
Check this example below. Both are valid streams, but they have different contents:
Valid - Bit stuffed stream (my stuffed zero in…
user1688175
0
votes
1 answer
Bitstuffing in assembly not working as intended
I am currently trying to learn assembly (Intel x86) and I've made a program that simulates bit stuffing on 32bit words -> every 5 consecutive identical bits (5 0's or 5 1's), an opposite bit is inserted. In order to keep the word to its original…

Iocust
- 105
- 1
- 14