## 3 General Encoding and Decoding Algorithm  
Convolutional codes are error-correcting codes where the data streams of indefinite lengths are encoded before transmission over noisy channels. The message streams are encoded by the sliding application of Boolean functions that generate a sequence of output bits. Convolutional codes and block codes do differ, with Convolutional codes incorporating memory in the encoding process. An (n, \(k\), \(\mathbf{K}\)) Convolutional code can be implemented with a \(k\)-input, n-output linear sequential circuit, and \"constraint length\" \(\mathbf{K}\) which defined is defined as (\(\mathbf{K}=\text{m}+1\), \(1\) represents the input bit encoded along with the bits stored in the m shift registers) [10], where m is the maximum number of stages (memory size) in any shift register. The encoder of convolution code for a binary (\(2\), \(l\), \(3\)) code is shown in Figure 1. All Convolutional encoders can be implemented using a linear feed-forward shift register of this type [11]. In practice, Convolutional codes are often designed based on a trade-off between code performance and complexity. The choice of the specific number of bits or the length of the shift registers depends on factors such as the desired coding efficiency, the available hardware resources, and the complexity of the communication system being designed. The code rate of a Convolutional code refers to the ratio of output bits to input bits. Together, the constraint length and code rate of a Convolutional code determine its error-correction capabilities. A longer constraint length and higher code rate generally result in better error correction, at the expense of increased computational complexity and bandwidth utilization [12]. The choice of the length of the shift registers determines the number of bits to be stored, which, in turn, determines the number of bits used to compute the output bits. Longer shift registers provide more memory and can result in better coding performance, but they also increase the complexity of the encoding and decoding processes. On the other hand, shorter shift registers provide less memory, and hence a lessened coding performance, but they also simplify the encoding and decoding processes [13]. In the case of the GPS system's Convolutional code, the constraint length is seven, which means that the encoder uses seven previous input bits to generate the current output bit [14; 15]. For the GPS system's Convolutional code, the code rate is \(1/2\), which means that for every 2 input bits, the encoder generates 1 output bit. This results in a redundancy in the transmitted signal that makes it less susceptible to errors. As an example of constraint  
Figure 1: Convolution code for a binary (\(2\), \(l\), \(3\)). length size utilized in Convolutional codes, which has been employed since the Voyager program, possesses a constraint length of seven and a rate of 1/2. In the case of the Mars Pathfinder, Mars Exploration Rover, and Cassini probe to Saturn, a code with a constraint length of 15 and a rate of 1/6 is employed. In the context of GSM, an error correction technique is utilized that employs a Convolutional code with a constraint length of two and a rate of 1/2 [16]. The encoding in Convolutional codes can be represented in various equivalent ways, namely the Generator, Tree Diagram, State Diagram, and Trellis Diagram representations. However, our research will utilize the Trellis Diagram Representation. * **Trellis Diagram** A trellis diagram is a graphical representation of the code's encoding process. The trellis diagram is a directed, cyclic graph that displays all possible paths that the encoding process can take for a given input sequence. The trellis diagram consists of a set of nodes or state points that correspond to the internal state of the encoder and a set of branches that connect the state points. The branches represent the encoder's output bits as they change from one state to another.