## 4 Comparative Analysis Convolutional Codes with LDPC Codes, BCH Codes, and Turbo Codes
### Convolutional Codes vs. BCH Codes
Now, the message polynomial is m(x) = \(x^{3}+x\), so the codeword polynomial is  
c(x) = m(x)g(x) = \((x^{3}+x)(x^{8}+x^{7}+x^{6}+x^{4}+1)=x^{1}+x^{1}+x^{9}+x^{7}+x^{5}+x\)  
The codeword is [0 0 0 0 0 1 0 1 1 1 0 1 1 0 0 0]. Suppose we receive the word r(x) = [0 0 0 0 1 0 1 0 1 0 1 1 0 0 0], which has two errors at positions \(i_{1}=8\) and \(i_{2}=10\). The syndromes can be computed as follows:  
\(s_{1}=r(\alpha)=\propto s_{2}=r(\alpha^{2})=\propto s_{3}=r(\alpha^{3})= \propto s_{4}=r(\alpha^{4})=\propto s_{5}=r(\alpha^{5})=\propto s_{6}=r( \alpha^{6})=\propto\)  
[PERSON]'s algorithm can be used to find the error locator polynomial as follows:  
\[\Lambda(x)=\text{lcm}(m_{i_{1}}(x),m_{i_{2}}(x))=(x+\alpha^{15-i_{1}})(x+ \alpha^{15-i_{2}})=(x+\alpha^{7})(x+\alpha^{5})=x^{2}+\alpha^{12}x+\alpha\]  
while [PERSON]'s algorithm can be employed to find the error values as follows:  
\[e_{i_{1}}=\frac{s_{1}}{\Lambda^{\prime}(\alpha^{15-i_{1}})}=\frac{\alpha}{( \alpha^{12-i_{1}})}=\frac{\alpha}{(\alpha^{12-8})}=\frac{\alpha}{(\alpha^{4} )}=\alpha\]  
\[e_{i_{2}}=\frac{s_{1}}{\Lambda^{\prime}(\alpha^{15-i_{2}})}=\frac{\alpha}{( \alpha^{12-i_{2}})}=\frac{\alpha}{(\alpha^{12-10})To know the number of encoding operations in BCH in the given example, we need to multiply the message polynomial m(x) by the generator polynomial g(x) to get the codeword polynomial c(x). The degree of g(x) is 8, which is equal to (m \(\cdot\) t), where m = 4 and t = 2. The number of operations is O(m \(\cdot\) t\({}^{2}\)) = O(4 \(\cdot\) 2\({}^{2}\)) = O(16) for binary BCH codes. This means that you need, at most, 16 operations in GF(2) to encode the message. For decoding, we need to calculate the syndromes, find the error locator polynomial, find the error values, and correct the errors. The number of operations depends on the number of errors and the algorithm used. For binary BCH codes, the number of operations is O(m \(\cdot\) t\({}^{2}\)) for calculating the syndromes, O(m \(\cdot\) t\({}^{3}\)) for finding the error locator polynomial using [PERSON]'s algorithm or O(m \(\cdot\) t\({}^{2}\)) using the Euclidean algorithm, O(m \(\cdot\) t\({}^{2}\)) for finding the error values using [PERSON]'s algorithm, and O(m \(\cdot\) t) for correcting the errors. The total number of operations is O(m \(\cdot\) t\({}^{3}\)) for [PERSON]'s algorithm or O(m \(\cdot\) t\({}^{2}\)) for the Euclidean algorithm. In this example, m = 4 and t = 2, so the total number of operations is, at most, 128 for [PERSON]'s algorithm or 64 for the Euclidean algorithm (note that this is the maximum number of operations, meaning that the number of operations may be less than these numbers). On the other hand, to encode the message [1 0 1 0] using a convolutional code (2, 1, 2), it is necessary to utilize the State Transition Table and the encoder circuit illustrated in Figure 3. Subsequently, the following operations need to be performed:  
* Set all memory registers to zero. * Feed the input bits one by one and shift the register values to the right. * Calculate the output bits using the generator polynomials \(g_{1}\) = (1,1,1) and \(g_{2}\) = (1,0,1). * Append two zero bits at the end of the message to flush the encoder. For each input bit, we need to perform two additions and no multiplications. The total number of operations for encoding a message of length N plus m (m for the number of zeros that need to flush the shift registers) and, therefore, the total number of operations for encoding a message of length N is 2N + m.  
Figure 9 shows the encoding operation using a trellis diagram:  
Figure 10 shows the decoding operation using the Viterbi algorithm:  
For encoding a message of length N = 4, we need to perform 2N + 2 = 10 additions and no multiplications. For decoding a message of length N = 4 + 2 = 6 with four states in the trellis diagram, we need to perform approximately \(N\cdot 4^{2}\) = 96 additions and 48 comparisons (there are eight possible transitions per time step and six time steps for a message of length 4 + 2 = 6).