remaining (non-message) terms to ensure that is divisible by . This encoding method leverages the fact that subtracting the remainder from a dividend results in a multiple of the divisor. Hence, if we take our message polynomial as before and multiply it by (to "shift" the message out of the way of the remainder), we can then use Euclidean division of polynomials to yield: Here, we see that is a valid codeword. As is always of degree less than (which is the degree of ), we can safely subtract it from without altering any of the message coefficients, hence we have our as Over (i.e. with binary BCH codes), this process is indistinguishable from appending a cyclic redundancy check, and if a systematic binary BCH code is used only for error-detection purposes, we see that BCH codes are just a generalization of the mathematics of cyclic redundancy checks. The advantage to the systematic coding is that the receiver can recover the original message by discarding everything after the first coefficients, after performing error correction. Decoding There are many algorithms for decoding BCH codes. The most common ones follow this general outline: Calculate the syndromes sj for the received vector Determine the number of errors t and the error locator polynomial Λ(x) from the syndromes Calculate the roots of the error location polynomial to find the error locations Xi Calculate the error values Yi at those error locations Correct the errors During some of these steps, the decoding algorithm may determine that the received vector has too many errors and cannot be corrected. For example, if an appropriate value of t is not found, then the correction would fail. In a truncated (not primitive) code, an error location may be out of range. If the received vector has more errors than the code can correct, the decoder may unknowingly produce an apparently valid message that is not the one that was sent. Calculate the syndromes The received vector is the sum of the correct codeword and an unknown error vector The syndrome values are formed by considering as a polynomial and evaluating it at Thus the syndromes are for to Since are the zeros of of which is a multiple, Examining the syndrome values thus isolates the error vector so one can begin to solve for it. If there is no error, for all If the syndromes are all zero, then