Cyclic_Code2004/3/17Yuh-Ming Huang, CSIE NCNU1 v = (v 0, v 1,..., v n-1 ) : code vector v (1) = (v n-1, v 0, v 1, …, v n-2 ) v (i) = (v n-i, v n-i+1, …,

Slides:



Advertisements
Similar presentations
Error Control Code.
Advertisements

296.3Page :Algorithms in the Real World Error Correcting Codes II – Cyclic Codes – Reed-Solomon Codes.
L. J. Wang 1 Introduction to Reed-Solomon Coding ( Part I )
Information and Coding Theory
CHANNEL CODING REED SOLOMON CODES.
II. Linear Block Codes. © Tallal Elshabrawy 2 Last Lecture H Matrix and Calculation of d min Error Detection Capability Error Correction Capability Error.
Wireless Mobile Communication and Transmission Lab. Chapter 2 Block code ----BCH The Theory and Technology of Error Control Coding.
DIGITAL COMMUNICATION Coding
Error detection/correction FOUR WEEK PROJECT 1 ITEMS TO BE DISCUSSED 1.0 OVERVIEW OF CODING STRENGTH (3MINS) Weight/distance of binary vectors Error detection.
EEE377 Lecture Notes1 EEE436 DIGITAL COMMUNICATION Coding En. Mohd Nazri Mahmud MPhil (Cambridge, UK) BEng (Essex, UK) Room 2.14.
Chapter 11 Error-Control CodingChapter 11 : Lecture edition by K.Heikkinen.
Chapter 11 Algebraic Coding Theory. Single Error Detection M = (1, 1, …, 1) is the m  1 parity check matrix for single error detection. If c = (0, 1,
DIGITAL COMMUNICATION Coding
Error Detection and Correction Rizwan Rehman Centre for Computer Studies Dibrugarh University.
Linear Codes.
DIGITAL COMMUNICATION Error - Correction A.J. Han Vinck.
Cyclic codes 1 CHAPTER 3: Cyclic and convolution codes Cyclic codes are of interest and importance because They posses rich algebraic structure that can.
USING THE MATLAB COMMUNICATIONS TOOLBOX TO LOOK AT CYCLIC CODING Wm. Hugh Blanton East Tennessee State University
1 S Advanced Digital Communication (4 cr) Cyclic Codes.
Channel Coding and Error Control
Part.7.1 Copyright 2007 Koren & Krishna, Morgan-Kaufman FAULT TOLERANT SYSTEMS Part 7 - Coding.
1 Channel Coding (II) Cyclic Codes and Convolutional Codes.
Application of Finite Geometry LDPC code on the Internet Data Transport Wu Yuchun Oct 2006 Huawei Hisi Company Ltd.
Convolutional Codes. p2. OUTLINE  [1] Shift registers and polynomials  [2] Encoding convolutional codes  [3] Decoding convolutional codes  [4] Truncated.
BCH_Code 2004/5/5Yuh-Ming Huang, CSIE, NCNU1 BCH Code a larger class of powerful random error-correcting cyclic codes a remarkable generalization of the.
Cyclic Codes for Error Detection W. W. Peterson and D. T. Brown by Maheshwar R Geereddy.
1 SNS COLLEGE OF ENGINEERING Department of Electronics and Communication Engineering Subject: Digital communication Sem: V Cyclic Codes.
MIMO continued and Error Correction Code. 2 by 2 MIMO Now consider we have two transmitting antennas and two receiving antennas. A simple scheme called.
Chapter 3 Digital Transmission Fundamentals Line Coding Error Detection and Correction.
Linear Feedback Shift Register. 2 Linear Feedback Shift Registers (LFSRs) These are n-bit counters exhibiting pseudo-random behavior. Built from simple.
§6 Linear Codes § 6.1 Classification of error control system § 6.2 Channel coding conception § 6.3 The generator and parity-check matrices § 6.5 Hamming.
DIGITAL COMMUNICATIONS Linear Block Codes
1 Introduction to Quantum Information Processing CS 667 / PH 767 / CO 681 / AM 871 Richard Cleve DC 2117 Lecture 20 (2009)
EE 430 \ Dr. Muqaibel Cyclic Codes1 CYCLIC CODES.
ADVANTAGE of GENERATOR MATRIX:
Information and Coding Theory Cyclic codes Juris Viksna, 2015.
Information Theory Linear Block Codes Jalal Al Roumy.
10.1 Chapter 10 Error Detection and Correction Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
The parity bits of linear block codes are linear combination of the message. Therefore, we can represent the encoder by a linear system described by matrices.
Some Computation Problems in Coding Theory
Error Detection and Correction
Digital Communications I: Modulation and Coding Course Term Catharina Logothetis Lecture 9.
Abstract Algebra 2004/9/29Yuh-Ming Huang, CSIE NCNU1 Introduction to Algebra Def 2.0 ( G, * ) G: a set A binary operation * on G : a * b  G  a,b  G.
Error Control Coding. Purpose To detect and correct error(s) that is introduced during transmission of digital signal.
Richard Cleve DC 2117 Introduction to Quantum Information Processing QIC 710 / CS 667 / PH 767 / CO 681 / AM 871 Lecture (2011)
Reed-Solomon Codes Rong-Jaye Chen.
MEGGIT DECODER. PROBLEM STATEMENT To correct all single errors in n-bit codeword, n error patterns of single errors and their corresponding syndromes.
CHAPTER 8 CHANNEL CODING: PART 3 Sajina Pradhan
Exercise in the previous class (1) Define (one of) (15, 11) Hamming code: construct a parity check matrix, and determine the corresponding generator matrix.
Cyclic Linear Codes. p2. OUTLINE  [1] Polynomials and words  [2] Introduction to cyclic codes  [3] Generating and parity check matrices for cyclic.
II. Linear Block Codes. © Tallal Elshabrawy 2 Digital Communication Systems Source of Information User of Information Source Encoder Channel Encoder Modulator.
ECE 442 COMMUNICATION SYSTEM DESIGN LECTURE 10. LINEAR BLOCK CODES Husheng Li Dept. of EECS The University of Tennessee.
Channel Coding: Part I Presentation II Irvanda Kurniadi V. ( ) Digital Communication 1.
Class Report 林格名 : Reed Solomon Encoder. Reed-Solomom Error Correction When a codeword is decoded, there are three possible outcomes –If 2s + r < 2t (s.
V. Non-Binary Codes: Introduction to Reed Solomon Codes
Information and Coding Theory
Yuh-Ming Huang, CSIE NCNU
CHAPTER 3: Cyclic and convolution codes
II. Linear Block Codes.
IV. Cyclic Codes.
Chapter 3 Digital Transmission Fundamentals
Lecture 3 Digital Transmission Fundamentals
Cyclic Code.
Yuh-Ming Huang, CSIE NCNU
IV. Cyclic Codes.
Yuh-Ming Huang, CSIE, NCNU
CHAPTER 3: Cyclic and convolution codes
عنوان درس نام استاد
III. Cyclic Codes.
Chapter 10 Error Detection and Correction
Presentation transcript:

Cyclic_Code2004/3/17Yuh-Ming Huang, CSIE NCNU1 v = (v 0, v 1,..., v n-1 ) : code vector v (1) = (v n-1, v 0, v 1, …, v n-2 ) v (i) = (v n-i, v n-i+1, …, v n-1, v 0, v 1, …, v n-i-1 ) v(x) = v 0 + v 1 x + … + v n-1 x n-1 : code polynomial v (i) (x) = x i v(x)/x n -1 Ⅲ Cyclic Code shift registers with feedback connections inherent algebraic structure  Algorithmic technique random-error correction burst-error correction Def : Cyclic Code (i) one linear code ( subset of GF(q)[x]/x n -1 ) (n, k) (ii) x c(x) mod x n -1  C(x) if c(x)  C(x) Shift right i  Shift left n-i

Cyclic_Code2004/3/17Yuh-Ming Huang, CSIE NCNU2 ( note : multiply by a field element to make it monic ) g(x) = g 0 + g 1 x + … + g r-1 x r-1 + x r g(x) is unique In GF(2), g 0 = 1 We claim : r = n - k For (n, k) cyclic code v(x) = u 0 g(x) + u 1 xg(x) + u 2 x 2 g(x) + … + u n-r-1 x n-r-1 g(x) = ( u 0 + u 1 x + u 2 x 2 + … + u n-r-1 x n-r-1 )g(x) = u(x)g(x) is also a code polynomial Consider : g(x), xg(x), x 2 g(x), …, x n-r-1 g(x) g (1) (x)g (2) (x)g (n-r-1) (x) = = = code polynomials Def : generator polynomial : The nonzero monic code polynomial of minimum degree in a cyclic code C Note If r = n–k, deg u(x) = k-1 u(x) : information polynomial

Cyclic_Code2004/3/17Yuh-Ming Huang, CSIE NCNU3 (i)  v(x) = a(x)g(x) + b(x) ∴ b(x) = v(x) + a(x)g(x) and deg b(x)<deg g(x) (ii)  v(x) = (a 0 +a 1 x +…+a n-r-1 x n-r-1 )g(x)= a 0 g(x)+ a 1 xg(x)+…+a n-r-1 x n-r-1 g(x) g(x) = 1 + g 1 x + g 2 x 2 + … + g n-k-1 x n-k-1 + x n-k Every code polynomial is a multiple of g(x) and every binary polynomial of degree n-1 or less that is a multiple of g(x) is a code polynomial. Thm : Let g(x) = 1 + g 1 (x) + … + g r-1 x r-1 + x r be the generator polynomial in an (n, k) cyclic code. A binary polynomial of degree n-1 or less is a code polynomial iff it is a multiple of g(x). Proof: # of binary polynomial with degree ≤ n-1 that are multiples of g(x) = 2 n-r 2 n-r = 2 k  r = n-k Thm : In an (n,k) cyclic code, there exists one and only one code polynomial of degree n-k Q: g(x), xg(x), x 2 g(x), …, x k-1 g(x) are linear independent ?

Cyclic_Code2004/3/17Yuh-Ming Huang, CSIE NCNU4  0 = Q(x)g(x)/x n -1 + s(x) Q: Thm : g(x) | x n +1 (x n -1 ) Thm : If g(x) is a polynomial of degree n-k and is a factor of x n +1(x n -1), then g(x) generate an (n, k) cyclic code pf: x n – 1 = Q(x)g(x) + s(x)  兩邊 mod x n -1 pf: (1) v(x) = u 0 g(x) +u 1 xg(x) +…+u k-1 x k-1 g(x) = (u 0 +u 1 x +…+u k-1 x k-1 )g(x)= v 0 +v 1 x+…+v n-1 x n-1 there exists 2 k code polynomials  (n,k) linear code (2) If v(x) is a code polynomial, then xv(x) = v n-1 (x n -1)+v (1) (x)  v (1) (x) is a multiple of g(x)  v (1) (x) is also a code polynomial

Cyclic_Code2004/3/17Yuh-Ming Huang, CSIE NCNU5 v(x) = x n-k u(x) + t(x) where t(x) is chosen st. (i) deg t(x) < n-k (ii) v(x)/g(x) = 0 ∴ t(x) = - x n-k u(x)/g(x)  t 0 + t 1 x + … + t n-k-1 x n-k-1 v = (t 0, t 1, …, t n-k-1, u 0, u 1, …,u k-1 ) Q: t(x) physical mean? Q: For large n, x n +1 may have many factors of degree n-k. How to select g(x)? Non-Systematic Encoding  v(x) = u(x)g(x) Systematic Encoding x n-k u(x) =a(x)g(x)+ t(x)  t(x)+ x n-k u(x) = a(x)g(x) & deg[ t(x)+ x n-k u(x)]  n-1 ∴ It’s a code polynomial

Cyclic_Code2004/3/17Yuh-Ming Huang, CSIE NCNU6 non-systematic 1+x 3 +x 5 +x 6 = (1+x+x 2 +x 3 )g(x) ( ) x+x 5 +x 6 = (x+x 2 +x 3 )g(x) ( ) 1+x+x 2 +x 3 +x 4 +x 5 +x 6 = (1+x 2 +x 4 )g(x) ( ) x 2 +x 4 +x 5 +x 6 = (x 2 +x 3 )g(x) ( ) 1+x 2 +x 6 = (1+x+x 3 )g(x) ( ) x+x 2 +x 3 +x 6 = (x+x 3 )g(x) ( ) 1+x+x 4 +x 6 = x 3 g(x) ( ) x 3 +x 4 +x 6 = x 3 g(x) ( ) 1+x 4 +x 5 = (1+x+x 2 )g(x) ( ) x+x 3 +x 4 +x 5 = (x+x 2 )g(x) ( ) 1+x+x 2 +x 5 = (1+x 2 )g(x) ( ) x 2 +x 3 +x 5 = x 2 g(x) ( ) 1+x 2 +x 3 +x 4 = (1+x)g(x) ( ) x+x 2 +x 4 = xg(x) ( ) 1+x+x 3 = 1g(x) ( ) 0 = 0g(x) ( ) Code polynomialsCode VectorsMessages TABLE 4.1 A (7, 4) CYCLIC CODE GENERATED BY g(x) = 1+x+x 3

Cyclic_Code2004/3/17Yuh-Ming Huang, CSIE NCNU7 systematic 1+x+x 2 +x 3 +x 4 +x 5 +x 6 = (1+x 2 +x 5 )g(x) ( ) x 2 + x 4 +x 5 +x 6 = (x 2 +x 3 )g(x) ( ) 1+x 3 +x 5 +x 6 = (1+x+x 2 +x 3 )g(x) ( ) x+x 5 +x 6 = (x+x 2 +x 3 )g(x) ( ) x 3 +x 4 +x 6 = x 3 g(x) ( ) 1+x+x 4 +x 6 = (1+x 3 )g(x) ( ) x+x 2 +x 3 +x 6 = (x+x 3 )g(x) ( ) 1+x 2 +x 6 = (1+x+x 3 )g(x) ( ) x+x 3 +x 4 +x 5 = (x+x 2 )g(x) ( ) 1+x 4 +x 5 = (1+x+x 2 )g(x) ( ) x 2 + x 3 +x 5 = x 2 g(x) ( ) 1+x+x 2 +x 5 = (1+x 2 )g(x) ( ) 1+x 2 +x 3 +x 4 = (1+x)g(x) ( ) x+x 2 +x 4 = xg(x) ( ) 1+x+x 3 = 1g(x) ( ) 0 = 0g(x) ( ) Code polynomialsCode VectorsMessages TABLE 4.1 A (7, 4) CYCLIC CODE GENERATED BY g(x) = 1+x+x 3 X 3 (x 2 +1) X 3 +x+1) = x 2

Cyclic_Code2004/3/17Yuh-Ming Huang, CSIE NCNU8 v = u G v(x) = (u 0 + u 1 x + … + u k-1 x k-1 )g(x) x n +1 = g(x)h(x) where h(x) = h 0 + h 1 x + … + h k x k : parity polynomial  x k h(x -1 ) = h k + h k-1 x + … + h 0 x k ∵ x k h(x -1 ) | x n +1 ∴ x k h(x -1 ) generate an (n, n-k) cyclic code Q: (一)(一) G = k x n Generator & Parity-check Matrices Q: GH T =0

Cyclic_Code2004/3/17Yuh-Ming Huang, CSIE NCNU9 ∵ deg a(x) ≤ k-1 deg = j 項係數 H = (n-k) x n Note If v(x) = a(x)g(x) v(x)h(x) = a(x)g(x)h(x) = a(x)(x n +1) = a(x) + x n a(x) 0 1 …k-1 n n+1 …n+k-1

Cyclic_Code2004/3/17Yuh-Ming Huang, CSIE NCNU10 (二)(二) consider each i corresponding to an information place x n-k+i = a i (x)g(x) + b i (x) 0 ≤ i ≤ k-1 x n-k, x n-k+1, …, x n-1 where b i (x) = b i0 + b i1 x + … + b i,n-k-1 x n-k-1  b i (x) + x n-k+i are code polynomials Q: (1) linear independent? (2) 與 x n-k u(x)/g(x) 之 關係 ? H = (n-k) x n (3) check VH T =0 G = k x n (4) ( 一 )G 與 ( 二 )G 之關係 ?

Cyclic_Code2004/3/17Yuh-Ming Huang, CSIE NCNU11 Ans (2) x n-k u(x) = u 0 x n-k + u 1 x n-k+1 + … + u k-1 x n-1 g(x) g(x) = u 0 b 0 (x) + u 1 b 1 (x) + … + u k-1 b k-1 (x) = t 0 + t 1 x + … + t n-k-1 x n-k-1 Ans (3) V = (v 0,v 1,…,v n-k-1,v n-k,v n-k+1,…,v n-1 ) = (t 0,t 1,…,t n-k-1,u 0,u 1,…,u k-1 ) VH T =V 0 + V n-k b 00 + V n-k+1 b 10 +…+ V n-1 b k-1,0 = t 0 + u 0 b 00 + u 1 b 10 +…+ u k-1 b k-1,0

Cyclic_Code2004/3/17Yuh-Ming Huang, CSIE NCNU12 ( 一 ). b(x) mod g(x) g(x) = x 2 + g 1 x + g 0 b(x) = b 3 x 3 + b 2 x 2 + b 1 x + b 0 Ax + B (=s(x)) b 0,b 1,b 2,b 3 g0g0 g1g1 = = BA n-k = deg[g(x)] = 2 (i)b 3 在第 3clock 啟動前位 於 -1 下方 (ii)i.e. 就 b 3 x 3 單獨而言, 在 第 4clock 後,registers 內 容為 b 3 x 3 mod g(x) G

Cyclic_Code2004/3/17Yuh-Ming Huang, CSIE NCNU13 ( 二 ). x 2 b(x) mod g(x) b 0,b 1,b 2,b 3 g0g0 g1g1 (i) 就 b 3 x 3 單獨而言, 在第 4 clock 結 束後, registers 內容為 b 3 x 5 mod g(x). i.e. 相當於 ( 一 ), b 3 由左方輸 入但需 6 個 clock. (ii) 同理 for b 2, b 1, b 0 Q: (1)xb(x)/g(x) (i) while complete the computation b(x)/g(x)  s(x) (ii) G disable (iii) one right shift (iv) result = xs(x)/g(x) xb(x)  input 0, b 0, b 1, b 2, b 3 (2) x 2 b(x)/g(x) input 0, 0, b 0, b 1, b 2, b 3

Cyclic_Code2004/3/17Yuh-Ming Huang, CSIE NCNU14 step (i) x n-k u(x) (ii) x n-k u(x)/g(x) = b(x) (iii) b(x) + x n-k u(x) n-k stage Figure 4.1 Encoding circuit for an (n, k) cyclic code with generator polynomial g(X) = 1 + g 1 X + g 2 X 2 + … + g n-k-1 X n-k-1 + X n-k … Message X n-k u(X)Code word Parity-check digits g1g1 g2g2 g n-k-1 Gate b n-k-1 b2b2 b1b1 b0b0 Encoding

Cyclic_Code2004/3/17Yuh-Ming Huang, CSIE NCNU15 Example 4.5 Consider the (7, 4) cyclic code generated by g(X) = 1 + X + X 3. The encoding circuit based on g(X) is shown in Figure 4.2. Suppose that the message u = ( ) is to be encoded. As the message digits are shifted into the register, the contents in the register are as follows: InputRegister contents (initial state) (first shift) (second shift) (third shift) (fourth shift) After four shifts, the contents of the register are (1 0 0). Thus, the complete code vector is ( ) and the code polynomial is 1 + X 3 + X 5 + X 6. ( ) Figure 4.2 Encoder for the (7, 4) cyclic code generated by g(X) = 1 + X + X 3 Message X n-k u(X) Code word Gate Parity digits

Cyclic_Code2004/3/17Yuh-Ming Huang, CSIE NCNU (1)  given k information digits (v n-k, v n-k+1, …, v n-1 ) = (u 0, u 1, …, u k-1 ) By (1), to determine the n-k parity-check digits (v 0, v 1, …, v n-k-1 ) v n-k-1 = h 0 v n-1 + h 1 v n-2 + … + h k-1 v n-k = u k-1 + h 1 u k-2 + … + h k-1 u 0 v n-k-2 = h 0 v n-2 + h 1 v n-3 + … + h k-1 v n-k-1 = u k-2 + h 1 u k-3 + … + h k-2 u 0 + h k-1 v n-k-1 Figure 4.3 Encoding circuit for an (n, k) cyclic code based on the parity polynomial h(x) = 1 + h 1 X + h 2 X 2 + …+ h k-1 X k-1 +X k Gate2 Gate1 u0u0 u1u1 U k-2 U k-1 h1h1 h2h2 h k-2 h k k stage ° Output to channel

Cyclic_Code2004/3/17Yuh-Ming Huang, CSIE NCNU17 Suppose that the message to be encoded is ( ). Then v 3 = 1, v 4 = 0, v 5 = 1, v 6 = 1. The first parity-check digit is v 2 = v 6 + v 5 + v 4 = = 0 The second parity-check digit is v 1 = v 5 + v 4 + v 3 = = 0 The third parity-check digit is v 0 = v 4 + v 3 + v 2 = = 1 Thus, the code vector that corresponds to the message ( ) is ( ). h 0 = 1 Q: 觀察 Method Ⅰ, Ⅱ 結果相同 Gate 2 Gate 1 p Output Input Figure 4.4 Encoding circuit for the (7, 4) cyclic code based on its parity polynomial h(x) = 1 + X + X 2 + X 4

Cyclic_Code2004/3/17Yuh-Ming Huang, CSIE NCNU18 r(x) = r 0 + r 1 x + … + r n-1 x n-1 = a(x)g(x) + s(x)deg s(x) ≤ n-k-1 s(x) = 0 r(x) is a code polynomial syndrome r(x)/g(x) ≈ Figure 4.5 An (n-k)-stage syndrome circuit with input from the left end. g1g1 s0s0 s1s1 … Gate g2g2 g n-k-1 s n-k-1 r(X) Received vector Syndrome Computation & Error Detection

Cyclic_Code2004/3/17Yuh-Ming Huang, CSIE NCNU19 pf: Thm : Let s(x) be the syndrome of a receive polynomial r(x) Then s (1) (x) ( = x s(x)/g(x) ) is the syndrome of r (1) (x) (= x r(x)/x n +1)

Cyclic_Code2004/3/17Yuh-Ming Huang, CSIE NCNU20 Ref : pp. 10 & 11 r = (r 0, r 1, …,r n-k-1, r n-k, …, r n-1 ) = (t 0, t 1, …, t n-k-1, u 0, u 1, …,u k-1 ) rH T = (s 0, s 1, …, s n-k-1 ) s 0 = r 0 + r n-k b 00 + r n-k+1 b 10 + … + r n-1 b k-1,0 = r 0 + t 0 s 1 = r 1 + r n-k b 01 + r n-k+1 b 11 + … + r n-1 b k-1,1 = r 1 + t 1 … s n-k-1 = r n-k-1 + r n-k b 0, n-k-1 + r n-k+1 b 1, n-k-1 + … + r n-1 b k-1, n-k-1 ∵ r(x) = r 0 + r 1 x + … + r n-k-1 x n-k-1 + x n-k u(x) u(x) = u 0 + u 1 x + … + u k-1 x k-1 ∴ r(x)/g(x) = r 0 + r 1 x + … + r n-k-1 x n-k-1 + x n-k u(x)/g(x) = t 0 + t 1 x + … + t n-k-1 x n-k-1 ( r n-k, r n-k+1, …, r n-1 )G = ( t 0, t 1, …, t n-k-1, r n-k, r n-k+1, r n-1 ) Syndrome is simply the vector sum of the received parity digits and the parity-check digits recomputed from the received information digits

Cyclic_Code2004/3/17Yuh-Ming Huang, CSIE NCNU21 Example 4.7 A syndrome circuit for the (7, 4) cyclic code generated by g(X) = 1 + X + X 3 is shown in Figure 4.6. Suppose that the receive vector is r = ( ). The syndrome of r is s = (1 0 1). As the received vector is shifted into the circuit, the contents in the register are given in Table 4.3. Figure 4.6 Syndrome circuit for the (7, 4) cyclic code generated by g(X) = 1 + X + X Gate 1 input ShiftInput Register contents (initial state) (syndrome s) (syndrome s (1) ) (syndrome s (2) ) Table 4.3 CONTENTS OF THE SYNDROME REGISTER SHOWN IN FIGURE 4.6 WITH r = ( ) AS INPUT

Cyclic_Code2004/3/17Yuh-Ming Huang, CSIE NCNU22 Figure 4.7 An (n-k)-stage syndrome circuit with input from the right end. Note : 1.x n-k r(x)/g(x) = [x n-k r(x)/x n +1]/g(x) = r (n-k) (x)/g(x) = s (n-k) (x) 2.r(x) = v(x) + e(x) ∴ s(x) = r(x)/g(x) = e(x)/g(x) g1g1 s0s0 s1s1 … Gate g2g2 g n-k-1 s n-k-1 r(X) Received vector Cor : The contents of the registers form the syndrome s (n-k) (x) of r (n-k) (x), which is the (n-k) th cyclic shift of r(x) x n-k r(x) = Q(x)(x n +1) + R(x) = Q(x)p(x)g(x) + q(x)g(x) + s(x) = [Q(x)p(x) + q(x)]g(x) + s(x) x n-k r(x)/g(x) ≈

Cyclic_Code2004/3/17Yuh-Ming Huang, CSIE NCNU23 Decoding 1.syndrome 2.error pattern 3.correct Meggitt decoder received digits are decoded one at a time and each digit is decoded with the same circuitry (i)r 1 (x) = r(x) + x n-1 (ii)s 1 (X) = s(x) + x n-1 /g(x) (iii)s 1 (1) (x) = xs 1 (x)/g(x) = xs(x)/g(x) + [xx n-1 /g(x)]/g(x) = xs(x)/g(x) + x n /g(x) = s (1) (x) + 1 r(x) r (1) (x) r 1 (x) r 1 (1) (x) syndrome s(x) s (1) (x) s 1 (x) s 1 (1) (x) x n -1 = Q(x)g(x)  x n = Q(x)g(x) + 1 Note : If Syndrome register ≠ 0’s at the end of decoding ( n shifts ) uncorrectable error pattern

Cyclic_Code2004/3/17Yuh-Ming Huang, CSIE NCNU24 Gate Buffer registers Syndrome register Error pattern detection circuit Syndrome modification r(X) Received vector Corrected vector Feedback connection riri eiei Figure 4.8 General cyclic code decoder with received polynomial r(X) shifted into the syndrome register from the left end s(x) --- r(x) s (1) (x) --- r (1) (x) (r 0, r 1, …, r n-1 ) =

Cyclic_Code2004/3/17Yuh-Ming Huang, CSIE NCNU25 Example 4.9 Consider the decoding of the (7, 4) cyclic code generated by g(X) = 1 + X + X 3. This code has minimum distance 3 and is capable of correcting any single error over a block of seven digits. There are seven single-error patterns. These seven error patterns and the all-zero vector form all the coset leaders of the decoding table. Thus, they form all the correctable error patterns. Suppose that the received polynomial r(X) = r 0 + r 1 X + r 2 X 2 + r 3 X 3 + r 4 X 4 + r 5 X 5 + r 6 X 6 is shifted into the syndrome register from the left end. The seven single-error patterns and their corresponding syndromes are listed in Table 4.4. TABLE 4.4 ERROR PATTERNS AND THEIR SYNDROMES WITH THE RECEIVED POLYNOMIAL r(x) SHIFTED INTO THE SYNDROME REGISTER FROM THE LEFT END (1 0 1) (1 1 1) (0 1 1) (1 1 0) (0 0 1) (0 1 0) (1 0 0) s(X) = 1 + X 2 s(X) = 1 + X + X 2 s(X) = X + X 2 s(X) = 1 + X s(X) = X 2 s(X) = X s(X) = 1 e 6 (X) = X 6 e 5 (X) = X 5 e 4 (X) = X 4 e 3 (X) = X 3 e 2 (X) = X 2 e 1 (X) = X 1 e 0 (X) = X 0 Syndrome vector (s 0, s 1, s 2 ) Syndrome s(X) Error pattern e(X)

Cyclic_Code2004/3/17Yuh-Ming Huang, CSIE NCNU26 Gate Multiplexer 010 r(X) Input Buffer register r’(X) Output Figure 4.9 Decoding circuit for the (7, 4) cyclic code generated by g(X) = 1 + X + X 3.

Cyclic_Code2004/3/17Yuh-Ming Huang, CSIE NCNU Initial 1st shift 2st shift 3rd shift Syndrome register Buffer register Pointer Correction

Cyclic_Code2004/3/17Yuh-Ming Huang, CSIE NCNU Error corrected Corrected word th shift 5th shift 6th shift 7th shift Figure 4.10 Error-correction process of the circuit shown in Figure 4.9

Cyclic_Code2004/3/17Yuh-Ming Huang, CSIE NCNU29 (i)s (n-k) (x) : syndrome of r (n-k) (x) (ii)If e n-1 = 1 In r (n-k) (x), the digit r n-1 is at the location x n-k-1 r 1 (n-k) (x) = r (n-k) (x) + x n-k-1  s 1 (n-k) (x) = s (n-k) (x) + x n-k-1 Error-pattern detection circuit Syndrome register Buffer register r(X) Gate r(X) Corrected vector Received vector Feedback connection riri eiei (Syndrome modification) (r 0, r 1, …,r n-1 ) = Figure 4.11 General cyclic code decoder with received polynomial r(X) shifted into the syndrome register from the right end. Note: circular shift 後考量 circular shift 前考量

Cyclic_Code2004/3/17Yuh-Ming Huang, CSIE NCNU30 Example 4.10 Again, we consider the decoding of the (7, 4) cyclic code generated by g(X) = 1 + X + X 3. Suppose that the received polynomial r(X) is shifted into the syndrome register from the right end. The seven single-error patterns and their corresponding syndromes are listed in Table 4.5. We see that only when e(X) = X 6 occurs, the syndrome is (0 0 1) after the entire received polynomial r(X) has been shifted into the syndrome register. If the single error occurs at the location X i with i ≠ 6, the syndrome in the register will not be (0 0 1) after the entire received polynomial r(X) has been shifted into the syndrome register. However, another 6 – i shifts, the syndrome register will contain (0 0 1). Based on this fact, we obtain another decoding circuit for the (7, 4) cyclic code generated by g(X) = 1 + X + X 3, as shown in Figure We see that the circuit shown in Figure 4.9 and the circuit shown in Figure 4.12 have the same complexity.

Cyclic_Code2004/3/17Yuh-Ming Huang, CSIE NCNU31 (0 0 1) (0 1 0) (1 0 0) (1 0 1) (1 1 1) (0 1 1) (1 1 0) s (3) (X) = X 2 s (3) (X) = X s (3) (X) = 1 s (3) (X) = 1 + X 2 s (3) (X) = 1 + X + X 2 s (3) (X) = X + X 2 s (3) (X) = 1 + X e(X) = X 6 e(X) = X 5 e(X) = X 4 e(X) = X 3 e(X) = X 2 e(X) = X 1 e(X) = X 0 Syndrome vector (s 0, s 1, s 2 ) Syndrome s (3) (X) Error pattern e(X) TABLE 4.5 ERROR PATTERNS AND THEIR SYNDROMES WITH THE RECEIVED POLYNOMIAL r(x) SHIFTED INTO THE SYNDROME REGISTER FROM THE RIGHT END

Cyclic_Code2004/3/17Yuh-Ming Huang, CSIE NCNU32 Gate Multiplexer r(X) Input Buffer register r’(X) Output Figure 4.12 Decoding circuit for the (7, 4) cyclic code generated by g(X) = 1 + X + X 3.