What Is Bit Stuffing?
Bit is a unit of measurement information. Each digit (0 or 1) of binary data or code is called a "bit" and is the smallest unit of computer information. Bit stuffing means that when the data bits occupied by the data are not all used, "0" or "1" is used to fill the unused data bits. In computers, the rules for digital padding are generally related to the machine code of the number.
- Bit stuffing simply refers to filling unused binary bits of data with "0" or "1". In a computer, not all data can fully use all binary bits. For example, 1 is integer data. In a computer, the memory is allocated 32 bits of memory size. In fact, 1 occupies only one bit. In order for 1 to be recognized as integer data, the remaining bits must be filled with bits. To fill. In computer networks, bit stuffing is also called
- In a binary number system, bits are abbreviated as b, also called bits, and each binary digit 0 or 1 is a bit. Bit is the smallest unit of data storage, of which 8 bits are called a
- In the frame structure of HDLC, the head and tail mark method with padding bits allows the data frame to contain any number of bits, and also allows the encoding of each character to contain any number of bits. It adopts a unified frame format and uses a specific bit sequence for frame synchronization and Delimitation. The working principle of the head and tail flag method with padding bits is that each frame uses a special bit pattern, namely 01111110 as the start and end flag bytes. When the sending data link layer encounters 5 consecutive 1s in the data, it automatically inserts a 0 into the output bit stream afterwards. This is called a bit stuffing technique. When the receiver sees five consecutive ones followed by a zero. Automatically delete this 0 [1]
- When the synchronous data signal is asynchronous with the clock of the data terminal, the buffer memory can be used to synchronize the input and output signals. The principle is to first multiplex multiple data signals into a primary group, and then send the primary group input data signal to the buffer at its pulse rate. When the input rate is slightly slower than the read rate of the buffer memory, there will be situations where the signal must be read before it has arrived. At this time, a filling pulse is inserted, and the information of the filling pulse is transmitted to the receiving end. After receiving the filling instruction information, the receiving end erases the filling circuit switch, fills the pulse, and then spreads the pulse into a certain interval, thereby restoring the original data signal. This method is limited to transmitting synchronous data signals.
Bit stuffing source code
- A representation of a number in an electronic computer. The original code form of the number is the same as the absolute value form of the original number, except for the sign bit, except that the sign of the number is represented by "0" and "1", respectively. For example, the binary code of +46 is represented as 00100110, and the binary code of -46 is represented as 10100110 (the first bit is the sign bit). The value "0" has two kinds of original code representation: "+0" is 00000000; "-0" is 10000000. The original code representation is very convenient for multiplication and division of numbers, but it is more complicated for addition and subtraction. When adding and subtracting two numbers, you need to determine their sign and absolute value to determine the operation relationship and operation type. In order to simplify the addition and subtraction of the processor, the original code representation is rarely used, but the data is represented by two's complement or two's complement.
Bit stuffing complement
- A representation of a number in a computer. In radix counting system, each digit of a certain number is subtracted from the radix and then added to 1. For positive numbers, the two's complement representation is the same as the original code; for negative numbers, The two's complement expression is obtained by adding one to the least significant bit of its complement. For example, the two's complement of the binary number 00101110 is still 00101110; the inverse of 10101110 is 11010001, and its complement is 11010001 + 1 = 11010010. In the two's complement expression, the complement of the value 0 is unique, that is, 00000000 (all zeros) ). Complement notation is very convenient for adding and subtracting positive and negative numbers. The use of two's complement can transform the subtraction operation into the addition operation, so that the adder can be used in the computer for addition and subtraction operations.
Bit stuffing
- Also called base minus one's complement. One of the representations of numbers in the computer is the number obtained by subtracting each digit from the radix in the radix counting system. For example, in binary counting system, the base is 2, and the base minus 1 is 1, then the inverse of -0101101 is 111111-0101101 = 1010010; in the decimal counting system, the base is 10 and the base is minus 1 and the inverse of -0543 The code is 9999-0543 = 9456. For positive numbers, the binary inverse expression is the same as the original code; for negative numbers, the binary inverse expression is to change the 0 in the binary numeric expression to 1, the 1 to 0, and then use the negative 1. The reverse code of 00101110 is still 00101110; the reverse code of 10101110 is 11010001.