BCH Codes Wireless Information Transmission System Lab Institute of Communications Engineering g National Sun Yat-sen University
Outline Binary Primitive BCH Codes Decoding of the BCH Codes Implementation of Galois Field Arithmetic Implementation of Error Correction Nonbinary BCH Codes and Reed-Solomon Codes
Preface The Bose, Chaudhuri, and Hocquenghem (BCH codes form a large class of powerful random error-correcting cyclic codes This class of codes is a remarkable generalization of the Hamming codes for multiple-error correction Binary BCH codes were discovered by Hocquenghem in 959 and independently by Bose and Chaudhuri in 960 Generalization of the binary BCH codes to codes in p m symbols (where p is a prime was obtained by Gorenstein and Zierler Among the nonbinary BCH codes, the most important subclass is the class of Reed-Solomon (RS codes Among all the decoding algorithms for BCH codes, Berlekamp s iterative algorithm, and Chien s search algorithm are the most efficient i ones
Description of the BCH Codes Wireless Information Transmission System Lab Institute of Communications Engineering g National Sun Yat-sen University
Binary Primitive BCH Codes m integer m, t <, a binary BCH codes with m n = Block length n k mt Number of parity-check digits dmin t Minimum distance Clearly, this code is capable of correcting any combination of t or fewer errors in a block of n = m digits We call this code a t-error-correcting BCH code The generator polynomial of this code is specified in terms of its roots from the Galois field GF( m m Let be a primitive element of GF( The generator poly g(x of the t-error-correcting BCH code of length m is the lowestdegree poly over GF( which has t as its roots 5
Binary Primitive BCH Codes t It follows from Theorem that g(x has,,, and their i conjugates as all its roots Let φi (x be the minimal poly of Then g(x must be the least common multiple (LCM of x, φ ( x,, φ (, that is, φ ( t x { φ φ φ } gx ( = LCM ( x, ( x, ( x t If i is an even integer, it can be expressed as a product of the following form : l i = i', ' l i i where i is an odd number and l Then = ( is a conjugate ' i i of and therefore and i have the same minimal poly, that is, φ ( x = φ ( x i i 6
Binary Primitive BCH Codes Hence, even power of has the same minimal poly as some preceding odd power of deg [ φ ( ] deg [ g( ] { } gx ( = LCM φ( x, φ( x, φt ( x i x m (Theorem 8 & 9 g x mt n k mt The BCH codes defined above are usually called primitive (or narrow-sense BCH codes 7
Binary Primitive BCH Codes The single-error-correcting BCH codes of length m is generated by gx ( = φ ( x since t = m is a primitive element of GF( φ ( is a primitive poly of degree x m 0 m (,,, = the single-error-correcting BCH codes of length Hamming code Ex 6 m is a 4 is a primitive element of GF( given by Table 8 such that 4 = 0 The minimal polynomials of,, 5 are 8
Binary Primitive BCH Codes φ ( x = x x 4 4 φ ( x = x x x x φ ( x = 5 x x 5 The double-error-correcting BCH code of length n= 4 = 5 is generated by g( x = LCM{ φ( x, φ( x} Since φ x and φ ( are two distinct irreducible polynomials, ( x g( x = ( x x = x 4 x 4 6 ( x x (5,7 cyclic code with d 5 x 7 x 8 min W ( g ( x = 5 d = 5 min x x 4 9
Binary Primitive BCH Codes The triple-error-correcting BCH code of length 5 is generated by gx ( = LCM φ ( x, φ ( x, φ ( x = { } 5 = 4 4 ( x x ( x x x x ( x x 4 5 8 0 = x x x x x x It s a (5,5 cyclic code with d 7Since W( g( x = 7, dmin min = 7 Let vx ( v0 vx v n n x be a poly t t = with v GF( If v( x has roots,,,, then v( x is divisible by φ ( x, φ ( x,, φ ( x (Theorem 4 t i v(x is a code poly because ( x g( x = LCM{ φ ( x, φ ( x,, φ ( } v t x 0
Binary Primitive BCH Codes We have a new definition for t-error-correcting BCH code: Abinaryn-tuple n v = ( v 0, v, v,, v n is a code word if and only if the poly ( ie v( i = v i i v v v n i 0 n = 0 i v, v, v,, v n = 0 for i ( n i ( 0 t
Binary Primitive BCH Codes Binary Primitive BCH Codes Let n ( ( n = H If v is a code word in the t error correcting BCH code ( ( n t t If v is a code word in the t-error-correcting BCH code, then 0 H v = T The code is the null space of the matrix H and H is the parity check matrix of the code 0 H v parity-check matrix of the code
Binary Primitive BCH Codes j i j i is a conjugate of, then v( = 0 iff v( = 0 j-th row of H can be omitted As a result H can be reduced to the following form : H n ( ( n = (t t t n ( ( (Thm 只剩下奇數的 Row EX 6 double-error-correcting BCH code of length n = 4 = 5, (5,7 4 code Let be a primitive element in GF(
Binary Primitive BCH Codes The parity-check matrix is (Note that the parity check matrix is not binary anymore 4 = H 6 4 Using 5 =, and representing each entry of H by its 4-tuple, 0000000 0000000 0000000 0000000 H = 000000000 000000000 000000000 000 4
Binary Primitive BCH Codes FACT: The t-error-correcting BCH code indeed has dmin t (pf: Suppose v 0 such that W(v = δ t Let v, v, v be the nonzero components of v (ie all ones j j jδδ p ( ( T ( ( 0 = vh = ( vjvj vj δ ( ( j j t j j j t j jδ jδ t jδ j j j t ( ( j j j t ( ( (,, = 0 jδ jδ jδ t ( ( 5
Binary Primitive BCH Codes j j j δ ( ( j j j δ ( ( (,, = 0 jδ jδ jδ δ ( ( ( t A, a δ δ square matrix δ A = 0 Taking out the common j ( δ j factor from each row of j ( δ j the determinant ( j j j δ = 0 ( jδ δ jδ 6
Binary Primitive BCH Codes The determinant in the equality above is a Vandermonde determinant which is nonzero The product on the left-hand side of can not be zero This is a contradiction and hence our assumption that there exists a nonzero code vector v of W(v =δ t is invalid dmin t t is the designed distance of the t-error-correcting BCH code The true minimum distance of a BCH code may or may not be equal to its designed distance m Binary BCH code with length n can be constructed in the same manner as for the case n = m (Theorem 9 m m Let β be an element of order n in GF (, n and g(x be the t binary polynomial of minimum degree that has β, β,, β as roots 7
Binary Primitive BCH Codes Let ψ( x, ψ ( x,, ψ t ( x be the minimal poly of respectively then g(x = LCM{ ψ ( x, ψ ( x,, ψ t ( x} n t n β =, β, β,, β are roots of x n gx ( ( x X We see that g(x is a factor of n β, β, β t The cyclic code generated by g(x is a t-error-correcting BCH code of length n The number of parity-check digits dmin t If βis not a primitive element of GF( m, the code is called a nonprimitive BCH code mt 8
General Definition of Binary BCH Codes General definition of binary BCH codes β GF( m, 0 be any nonnegative integer and consider l0 l0 l0 d 0 β, β,, β For 0 i< d0, let ψ i (x, ni be the 0 i minimal poly and order of β, respectively g( x = LCM{ ψ 0( x, ψ ( x,, ψ d ( x} and dthe length of fthe code is Note that: dmin d0 { } 0 n= LCM n, n, n d parity-check digits md ( 0 (Proof is omitted and left as an exercise 0 is capable of correcting ( d0 / or fewer errors 0 9
General Definition of Binary BCH Codes If we let l0 =, d0 = t and β be a primitive element of GF( m, the code becomes a t-error-correcting primitive BCH code of length m β If we let l0 =, d0 = t and be not a primitive element of GF( m, the code is a nonprimitive t-error-correcting BCH code of length n, which is the order of β For a BCH code with designed distance d0, we require g(x has d0 - consecutive powers of a field element β as roots This guarantees that the code has dmin d0 This lower bound on the minimum distance is called the BCH bound In the rest of this chapter, we consider only the primitive BCH codes 0
Decoding of the BCH Codes Wireless Information Transmission System Lab Institute of Communications Engineering g National Sun Yat-sen University
Decoding of the BCH Codes Decoding of the BCH Codes Suppose that a code word v(x = is transmitted and the transmission errors result : 0 n v n x x v x v v is transmitted and the transmission errors result : r(x = Let e(x be the error pattern Then 0 n r n x x r x r r For decoding, remember e(x v(x r(x = ( ( n n = ( ( H ( ( n t t ( (
Decoding of the BCH Codes The syndrome is t-tuple, S = ( S, S, S t = r H i i i n Let s = r ( = r r r ( for i i 0 n s can be evaluated by b ( x = R [ r( x] i i φ ( x i φ ( x is the minimal poly of i r( x = a ( x φ ( x b ( x s = r = b i i i i i i ( i( i T t
Decoding of the BCH Codes EX64 Consider the double-error-correcting error (5, 7 BCH code given in 8 (from Ex6 If r = (0000000000000 r( x = x s = b ( =, s = b ( = 4 4 φ ( x = φ ( x = φ4 ( x = x x φ ( x = x x x x 4 b ( x = R [ rx ( ] = x φ ( x φ ( x b ( x = R [ r( x] = x s 9 = b ( = 4 8 s = b( = 4 7 = = 4 7 8 s = (,,, (Note that syndrome is not binary anymore 4
Decoding of the BCH Codes i i i v( = 0 for i t s = r( = e( j j j Suppose ex ( = x x x v 0 j < j < j < n = j j jv s j j j s = ( ( ( v i j t jv t s tt = ( ( j j j where,, v are unknown Any method for solving these equations is a decoding algorithm for the BCH codes v 5
Decoding of the BCH Codes j j j Once,, v have been found, the powers j, j, j tell us the error locations in e( x v If the number of errors in e(x is t or less, the solution that yields an error pattern with the smallest number of errors is the right solution j For convenience, let β =, v be the error location numbers s s = β β β = β β β Power-sum v st = β β β t t t v v Symmetric function 6
Decoding of the BCH Codes Define σ ( x = ( β x ( β x ( β x = 0 σ σ x σ x σ x : error-location poly The roots of σ ( x are β, β, βv, which are the inverses of the error location numbers σ 0 = σ = β β β σ = ββ ββ β β v σ = β β v β v v v v v v 7
Decoding of the BCH Codes These coefficients are known as elementary symmetric functions σ i ' s are related to s ' s by Newton's identities s j σ = 0 s σ s σ = 0 s σs σs σ = 0 sv σsv σv s vσv = 0 s σ s σ s σ s = 0 v v v v Note that, for binary case, = = 0, we have σ i for odd i iσ i = 0 for even i 8
Decoding of the BCH Codes The equations may have many solutions We want to find the solution that yields a σ(x ofminimal degree This σ(x would produce an error pattern with minimum number of errors Decoding Procedure step Compute s ( s, s, s from r ( x = t step Determine σ ( x from step Determine the error-location number β, β, βv by finding the roots of σ( x and correct the errors in rx ( s 9
Decoding of the BCH Codes Iterative Algorithm for finding σ ( x (Berlekamps iterative algorithm i = i e ρ = ( i σ = s x s Y i = t σ ( t ( x = σ ( x N END D o es the coeficients ( i of satisfy the σ ( i th N e w to n s id en tity? σ Y = σ ( i ( i correction term σ N = σ ( i ( i i = i a 0
Decoding of the BCH Codes How to add a correction term to σ ( i? ( μ ( μ ( μ ( μ = Let σ σ x σ x σ x μ be the minimum-degree poly determined at the μth step ( μ To determine σ ( x => compute μth discrepancy ( μ ( μ ( μ σ σ σ dμ = sμ sμ sμ sμ μ μ = σ = σ ( ( If d 0 μ μ ( x ( x If d μ 0, go back to the steps prior to the μth step and determine ( ρ σ ( x st ρth discrepancy d ρ 0, and ρ ρ has the largest value ( ρ ( = deg [ σ ( x] Then ρ σ ( x = σ ( x d d x σ ( x ( μ ( μ ( μ ρ ( ρ μ ρ μ μ
Decoding of the BCH Codes is the minimum-degree poly whose coefficients satisfy the first Newton s identities To carry out the iteration of finding σ(x, we begin with the following table: ( μ μ σ ( x d μ μ μ μ 0-0 S 0 0 t
Decoding of the BCH Codes l μ is the degree of σ (μ (X If d μ =0, then σ (μ μ (X= σ (μ (X andl l μ = l μ If d μ 0, find another row ρ prior to the μth row such that d ρ 0 and the number ρ-l ρ in the last column of the table has the largest value Then σ (μ (X is given by σ ( x = σ ( x d d x σ ( x ( μ ( μ ( μ ρ ( ρ μ ρ and l μ = max(l μ, l ρ μ-ρ ρ ( μ ( μ In either case, dμ = sμ σ sμ σ s (t μ μ μ The polynomial σ (X in the last row should be the required σ(x
Decoding of the BCH Codes Ex 65 Consider (55 5 triple-error-correcting error BCH codes given in ex 6 (t= px ( = x x e v = 0 r = x x x 4 6 4 5 φ ( x = φ ( x = φ ( x = x x φ ( x = φ ( x = x x x x φ ( x = x x 5 4 4 4
Decoding of o f the t h e BCH Codeso d e s b ( x = R [ r ( x ] = φ ( x φ ( x b ( x = R [ r( x] = x x b ( x = R [ r( x] = x 5 φ5 ( x = = 4 = s s s s s 6 s5 = = 6 9 0 8 5 = = 0 = 0 0 5 s =(,,,,, ( μ ( μ ( μ ρ ( ρ μ ρ σ ( x = σ ( x d d x σ ( x 5
Decoding of the BCH Codes S = ( μ ( μ dμ = sμ σ sμ σ s μ μ μ μ=0; d 0 = 0 ( μ ( μ ( μ ρ ( ρ ρ=- σ ( x = σ ( x dμdρ x σ ( x σ ( (X= σ (0 (Xd 0 d - - X (0 σ (- (X= X =X X X l =max(l 0,l - μ-ρ=max(0,00= μ-ll μ =-l l =-=0 d =S σ ( S = =0 l μ = max(l μ, l ρ μ-ρ σ ( (X= σ ( (X=X l =l = μ-l μ =-l =-= d =S σ ( S = 0 =( = 5 6
Decoding of the BCH Codes d = 5 0 ρ=0 σ ( (X=σ ( (Xd d 0 - X (-0 σ (0 (X=X 5 X =X 5 X l =max(l,ll 0 μ-ρ=max(,0-0= 0 μ-l μ =-l =-= d S 5 =S 4 σ ( S σ ( S σ ( S = 0 5 0 =( ( =0 7
Decoding of the BCH Codes ( μ μ σ ( x d μ μ μ μ 0-0 0 0 x 0 0 5 x 5 x x 0 5 0 4 x x 5 5 x x 0 5 6 x x - - - σ( x = σ ( x = x x (6 5 = 0 ( x( x( x x =,, 0 8
Decoding of the BCH Codes error location numbers β = =, β = =, β = = 0 5 5 ex ( = x x x rx ( = rx ( ex ( = 0 If the number of errors in the received polynomial r(x is less than the designed error-correcting capability t of the code, it is not necessary to carry out the t steps of iteration to find the errorlocation polynomial σ(x It has been shown that if d μ and the discrepancies at the next t-l μ - steps are all zeros (ie successive t-l μ zeros, σ (μ (X is the errorlocation polynomial If v(v t errors occur, only vt steps of iteration are needed The iterative algorithm described above not only applies to binary BCH codes but also nonbinary BCH codes 9
Decoding of the BCH Codes Simplified Algorithm for finding σ ( x For a binary BCH code, it is only required to fill out a table with t empty rows Such a table is presented below ( μ μ σ ( x d μ -/ 0-0 S 0 0 t μ μ μ 40
Decoding of the BCH Codes ( ( If d 0, then μ μ = ( x = ( x μ σ σ If dμ 0, find another row ρ proceding the μth row, st ρ is as large as possible and d 0 ρ ( ( ( ( Then μ ( X μ ( X d d X μ σ = σ ρ ρ μ ρ σ ( X ( μ ( μ note that dμ = sμ σ sμ σ sμ ( μ σ s μ = ( μ μ deg [ σ ( x] μ μ ρ 4
Decoding of the BCH Codes The polynomial σ (t (X in the last row should be the required σ(x If it has degree greater than t, there were more than t errors, and generally it is not possible to locate them The computation required in this simplified algorithm is one-half of the computation required in the general algorithm The simplified algorithm applies only to binary BCH codes If the number of errors in the received polynomial r(x is less than the designed error-correcting capability t of the code, it is not necessary to carry out the t steps of iteration to find the errorlocation polynomial σ(x for a t-error-correcting binary BCH code 4
Decoding of the BCH Codes Remarks: If v t errors occur, only ( t v / steps needed If, for some μ, d μ and the discrepancies at the next (t-l μ -/ steps are zero, then σ ( X is the error-location poly EX66 The simplified table for finding σ(x for the code in ex65 is given below Thus, σ ( x = σ ( ( x = x 5 x ( μ μ σ ( x d μ I μ μ I μ -/ 0-0 S= 0 0 Sx=x 5 SS S== (take ρ = -/ x 5 x 0 (take ρ = 0 x 5 x ---- (take ρ = 4
Decoding of the BCH Codes Finding the Error-Location Numbers and Error Correction Consider ex66 6 The error-location poly has been found to be 5 σ ( x = x x By substituting 4 0,,,,, into it, we find that,, are the roots of σ(x Therefore, the error location numbers are 5 5,, => e( x = x x x Chien s procedure: The received vector n r( x = r0 r x r x r n x is decoded on a bit-by-bit basis The high-order bits are decoded first n To decode r n-, the decoder test whether is an error-location number; this is equivalent to test whether its inverse is a root of σ(x If is a root, then v σ σ σ v = 0 44
Decoding of the BCH Codes l l vl To decode rn l, the decoder forms σ, σ,, σ v and tests the sum l l σ σ If the sum is zero, then n-l is an error-location number and r n-l is an erroneous digit; otherwise, r n-l is a correct digit Cyclic error location search unit σ v vl σ σ σ t x x x i= t σ i A i t 45
Decoding of the BCH Codes The tσ -registers are initial stored with σ, σ,, σ t calculated in step of the decoding ( σv = σv = = σt = 0 for v < t Immediately before rn- is read out of the buffer, the t multiplier are pulsed once v The multiplications are performed and σ, σ,, σ v are stored in the σ -registers The output of the logic circuit A is if v and only if the sum σ otherwise, the σ σ v = 0; output tof fa is 0 The digit itrn- is read out of fthe buffer and corrected by the output of A Having decoded rn-,the t multipliers are pulsed 4 v again Now σ, σ,, σ v arestoredinthe the σ -registers The sum 4 v σ σ σ v is tested for 0 The digit rn- is read out of the buffer and corrected in the same manner as rn- is corrected 46
Implementation of Galois Field Arithmetic Wireless Information Transmission System Lab Institute of Communications Engineering g National Sun Yat-sen University
Implementation of Galois Field Arithmetic Galois field adder (GF( 4 given by Table 8 ADD a0 a a a Register A (accumulator a 0 b 0 a b b b 0 a b b a b b b Register B By adding their vector representations with modulo- addition 48
Implementation of Galois Field Arithmetic For multiplication, we first consider multiplying a field element by a fixed element from the same field Suppose that we want to multiply a field element β in the GF( 4 by the primitive element 4 whose minimal polynomial isφ ( x = x x β = b b b b 0 β = b ( b b b b 0 任一 β 要乘上定值 4 = b b b0 b b b Ex: let β = 7 = The vector representation of β is ( 0 Load it into the register After the register is pulsed, the new content in it will be ( 0 0 49
Implementation of Galois Field Arithmetic the above circuit can be used to generate all the nonzero elements of 4 by load (000 first into the register GF( Ex: as another example, multiply β by : β = b b b b 0 4 5 5 = b0 b b b = b0 b( b( b ( = b ( b b ( b b ( b0 b β b0 b b b 50
Implementation of Galois Field Arithmetic Ex: multiplying two arbitrary elements Steps: β = b b b b 0 r = c c c c 0 β r = c β c β c β c β 0 = ((( c β c β c β c β 0 multiply c β by and add the product to c β multiply ( c β c β by and add the product to c β multiply (( c β c β c β by and add the product to c β 0 5
Implementation of Galois Field Arithmetic The circuit in ex can be modified to carry out the computation given by ex b b b 0 b c0 c c c 5
Implementation of Galois Field Arithmetic Step : Register A are empty B ( b0 b b b C ( c0 c c c Step : Registers A C are shifted four times At the end of first shift, A (( cb 0, cb, cb, cb, the vector representation of cβ At the end of second shift, A (( cβ cβ At the end of third shift, A ((( cβ cβ cβ At the end of fourth shift, A βγ 5
Implementation of Galois Field Arithmetic If we express βγ = ((( c c β 0 β cβ cβ then we obtain a different multiplication circuit b0 b b b c c c c0 54
Implementation of Galois Field Arithmetic How to compute syndrome It can be done with a circuit for multiplying a field element by i Suppose that we want to compute si i r(? where is a primitive element in GF( 4 = r( = r r r r 4 0 4 =(((( r r r r 4 0 55
Implementation of Galois Field Arithmetic The computation of r( can be accomplished by adding an input to the circuit r (x input At the end of first shift ( r,0,0,0 000 4 At the end of nd shift r 4 r At the end of rd shift ( r4 r r 56
Implementation of Galois Field Arithmetic We can compute r( by adding an input to the circuit for multiplying by of figure in Ex rx ( input i There is another way of computing r( Let φ i (x be the minimal i poly of Let b(x be the remainder resulting from divding r(x by φ i (x Then i i r( = b( 57
Implementation of Galois Field Arithmetic Implementation of Galois Field Arithmetic Thus, computing r( is equivalent to computing b( Again we consider computation over GF( Suppose that we want to i i 4 consider computation over GF( Suppose that we want to compute r( The minimal poly of is 4 ( x x x x x = φ The remainder ( b x b x b b x b x = ( x x x x x φ Then 0 ( b x b x b b x b x = b( 9 6 0 b( b b b b = 0 0 ( ( ( b b b b b b b b b b = = 58
Implementation of Galois Field Arithmetic Such a circuit is shown below 59
Implementation of Galois Field Arithmetic Implementation of Galois Field Arithmetic Since is a conjugate of, it has the same minimum poly as 6 6 b( 8 6 0 6 b( b b b b = 0 0 ( ( ( ( ( b b b b b b b b b b b b = = Its circuit is shown in the next page 0 ( ( ( 60
Implementation of Galois Field Arithmetic 6
Implementation of Error Correction Wireless Information Transmission System Lab Institute of Communications Engineering g National Sun Yat-sen University
Implementation of Error Correction Syndrome computation circuit for the double-error-correcting (5,7 BCH code 6
Implementation of Error Correction Chien s searching circuit for the double-error correcting (5,7 BCH code 64
Nonbinary BCH Codes and Reed-Solomon Codes Wireless Information Transmission System Lab Institute of Communications Engineering g National Sun Yat-sen University
Nonbinary BCH Codes and Reed-Solomon Codes In addition to the binary codes, there are nonbinary codes If p is a prime number and q is any power of p (q=p p m thereare, codes with symbols from the Galois field GF(q These codes are called q-ary codes An (n, k linear code with symbols from GF(q is a k-dimensional subspace of the vector space of all n-tuples over GF(q A q-ary (n, k cyclic code is generated by a polynomial of degree (nk with coefficients from GF(q, which is a factor of X n - Encoding and decoding of q-ary y codes are similar to that of binary codes For any choice of positive integers s and t, there exists a q-ary BCH code of length n=q s -, which can correct any combinational of t or fewer errors and requires no more than st parity-check digits 66
Nonbinary BCH Codes and Reed-Solomon Codes Let be a primitive element in the Galois field GF(q s The generator polynomial g(x ofat t-error-correcting q-ary BCH is the polynomial of lowest degree with coefficients from GF(q for which,,,,, t are roots Let φ i (X be the minimal polynomial of i Then g(x=lcm{φ (X,φ (X,,φ t (X } The degree of each minimal polynomial is s or less Therefore, the degree of g(xisatmostst st, and hence the number of parity-check digits of the code generated by g(x is no more than st For q=,, we obtain the binary BCH codes 67
Nonbinary BCH Codes and Reed-Solomon Codes t-error-correcting Reed-Solomon code with symbols from GF(q: s =, Block length: n=q-, # parity-check digits: n-k =t, Minimum distance: d min =t Reed-Solomon codes with code symbols from GF( m (ie (ie, q= m Let be a primitive element in GF( m The generator polynomial of code length m -is g( x = ( x ( x ( x = g0 gx gt x x (n,n-t n cyclic code and coefficients of g(xisfromgf( m k Let Message: a( X = a0 ax ax ak X In systematic form, the t parity-check digits are coefficients of t ( ( ( t t t b t X = Rg X X a X = b0 bx bt X (Sec 5 68
Nonbinary BCH Codes and ReedReed-Solomon Codes Hardware implementation Encoding circuit of a q-ary RS code 69
Nonbinary BCH Codes and Reed-Solomon Codes Where m multiplier in GF( m adder in GF( bi storage device Decoding of RS code: v(x = v0 vx r(x = r 0 r x r n x v n x n n n ex ( = rx ( vx ( = e ex e x m e = r v, GF( i i i 0 n ex ( v( x rx ( 70
Nonbinary BCH Codes and Reed-Solomon Codes Suppose the error pattern e(x contains v errors (nonzero components, then j j j e( x = e x e x e x ν j j j j To determine e(x, we need error-locations x l s and the error values e s jl (ie vpairs( x, e ' s j l j l ν In decoding a RS code, the same three steps used for decoding a binary BCH code are required ; in addition, a fourth step involving calculation of error values is required 7
Nonbinary BCH Codes and Reed-Solomon Codes j Let β = = v s = r( = e β e β e β j j jv v s = r ( = e β e β j jv v s = r( = e β e β t t t t j jv v note: S = R [ r( x] = b i i ( x i ( ie r ( x = a ( x ( x b i i i 7
Nonbinary BCH Codes and ReedReed-Solomon Codes Syndrome computation circuit for R-S codes Division circuit (a over GF ( m (b in binary form 7
Nonbinary BCH Codes and Reed-Solomon Codes To find σ ( x : the error-location poly by Berlekamp s iterative algorithm σ ( x = ( β x ( β x ( β x v = σx σvx Once σ ( x is found, we can determine the error values Let ( = ( σ ( σ σ ( σ σ z x s x s s x s s x ν ν ν j It can be shown that the error value at location β = l is given by: e j l = ν Z ( β l ( ββ i l i= i l v l v 74
Nonbinary BCH Codes and Reed-Solomon Codes Ex: Consider a triple-error-correcting Reed-Solomon code with symbols from GF( 4 The generator polynomial of this code is: g( x = ( x ( x ( x 6 = x x x x x x 6 9 6 4 4 4 0 5 6 (5, 9, RS code, n =5 n k = 6, t = e x (000 r = (000 7 00 00000 4 00 rx ( = x x x 7 6 4 75
Nonbinary BCH Codes and ReedReed-Solomon Codes Step Using table 8 below to compute syndrome components: 76
Nonbinary BCH Codes and Reed-Solomon Codes S = r( = = S S S S S 4 5 6 0 9 = r = = ( = r ( = = 6 0 4 = r( = = 4 4 7 0 = r = = 5 7 4 ( 0 = r( = = 6 0 9 7 4 6 Step Findσ( x = x x x by filling out table in next slide 77
Nonbinary BCH Codes and Reed-Solomon Codes 78
Nonbinary BCH Codes and Reed-Solomon Codes Step By substituting 9 σ 4,,, into σ( x,, are roots of ( x 9 6 =, =, = are the error-location 6 numbers of ex ( ex ( = ex ex e x 6 Step 4 From 64, find z( x = x x x z( 6 7 e = = 6 ( ( e 6 z ( 6 = = 6 6 ( ( 79
Nonbinary BCH Codes and Reed-Solomon Codes e z( 6 = 4 ( ( = ex ( = x x x 7 6 4 vx ( = rx ( ex ( = 0 If β is not a primitive iti element of GF( m, then the m -ary code generated by t g ( x = ( x β ( x β ( x β is a nonprimitive t-error-correcting RS code The length n of this code is simply pythe order of β Decoding of a nonprimitive Reed-Solomon code is identical to the decoding of a primitive Reed-Solomon code 80
Nonbinary Nonbinary BCH Codes and Reed BCH Codes and Reed-Solomon Codes Solomon Codes Reed-Solomon codes are very effective for correcting multiple bursts of errors bursts of errors Two information symbols can be added to a RS code of length n without reducing its minimum distance g The extended RS code has length n and the same number of parity-check symbols as the original code For a t-error-correcting RS code, the parity-check matrix may take the form n ( ( H n n = H n t t t 8 ( ( n t t t
Nonbinary Nonbinary BCH Codes and Reed BCH Codes and Reed-Solomon Codes Solomon Codes The parity-check matrix of the extended RS code is 0 0 0 H 0 0 H = H 0 0 H 0 0 0 0 0 8