June, 1974 the Project of Hyun-Sik Choi Is Approved
Total Page:16
File Type:pdf, Size:1020Kb
CALIFORNIA STATE UNIVERSITY, NORTHRIDGE GENERATION AND DECODING OF ERROR CORRECTING CODES 'I A project submitted in partial satisfaction of the requirements for the degree of Master of Science in Engineering by Hyun-sik Chci -/ June, 1974 The project of Hyun-Sik Choi is approved: Co~~ittee Chairman California State University, Northridge June, 1974 L---------------------------------------------~--------------J ii ~- ------------------------------·-·-···----------·---·-·--------·--······--··-------··-----· -- ·---·· ···-·-·-····-· ··: ! . TABLE OF CONTENTS Page LIST OF TABLES . • • • • • • • • $ e • • • • • • iv LIST OF FIGURES . v LIST OF SYMBOLS • • • 0 • • • • • • • • • • • • vi ABSTRACT . vii SECTION I OVERVIEW . e . 8 . 1 II THE ENCODER FOR A (7. 4) HAMMING CODE . 4 III THE DECODER FOR A (7. 4) HAMMING CODE . 11 1. Standard Array . 11 2. Syndrome Calculation . 11 3. General Decoder . 13 4. Meggitt Decoder . 15 5. Meggitt Decoder for a (7. 4) Hamming_ ~ Code . 19 IV BURST-ERROR-CORRECTING HAMMING CODE . 25 v DOUBLE-ERROE-CORRECTING BCH (15, 7) CODE 28 VI DISCUSSION . 35 A. BIBLIOGRAPHY . 36 iii ,--·--·---------~-----~--~----··---·--·---~----------·-·-~- -~--------·------~·--·-------·------·--·----~-------------------- ! LIST OF TABLES Table Page I Division of a j7,4) Hamming Code by 7 g(x) = l+x+x •••••••• . II Step-by-step operation of the parity check digit calculation in Figure II 9 III A (7, 4) Hamming code generated by 3 g(x) = l+x+x •••••••• 10 IV A standard array for the (7, 4) Hamming code (Error Pattern) • • • • • 12 V Calculation of syndrome and corresponding coset leader LReceived a (7. 4) Hamming Code J. 14 VI Step-by-step operation of the syndrome calculation of the circuit on figure III 17 VII Syndrome calculation for Meggitt decoder r a ( 7 • 4) Hamming code J. 21 • VIII Step-by-step operation for a (7.4) Hamming decoder of the circuit on figure V • • • • • • • • • • • • 23 IX Error correction procedures of the circuit on figure V • • • . • • 24 X The Galois field of 24 elements GF(24) with p(d)=~+ct+ 1=0 (or ~=~1) • • • • 29 iv LIST OF FIGURES Figure Page I Block diagram for a typical data communication . • • • • • • • . 1 II A (7. 4} Hamminj encoder generated by g (x} = l+x+x . 8 III A (7. 4} Hamminj decoder generated by g (x} = l+x+x . 16 IV Meggitt decoder • • $ • • • • • 18 v Meggitt decoder for a (7.4} Hamming code • • • • • • • • • • • • • 22 VI A (8, 4} Hamming encoder generated by g(X}=X4+X+l . • . • • • • • • • • 27 VII A (8, 4} Hamming decoder with single-burst- correction of length 2 • • • • • • 27 VIII The BCH {15,7} encoder generated by ; g(x}=l+x4+x6+x7+x8 .•.•• 33 ' IX Type I, one-step majority-logic decoder for the BCH (15,7) code generated by g(x)=l+x4+x6+x7+x8 •••.•.••. ~ 33 v LIST OF SYMBOLS n Code word length k Number of information digits m Number of transmitted message digits r Transmitted parity check symbols X Polynomial coefficient v Transmitted code word R Received code word m' Number of received message digits r' Received parity check symbols g (x) Primitive polynomial q (x) Quotient s Syndrom dmin Hamming code minimum distance 0 Modulo-2 adder -o-~ Shift register storage device k/n Code rate vi r-·------·------·--·-----··-----·-···---------·---- ·-·-------·------·-··------·--···-·--·-·--------·------ ·-- , ! ABSTRACT GENERATION AND DECODING OF ERROR CORRECTING CODE by Hyun-sik Choi Master of Science in Engineering June, 1974 The purpose of this project is to present error- correcting procedures and their encoding-decoding tech- niques . : All codes are based on the mathematical concept of error-correcting codes. The codes described in this pro- ject are a single-error-correcting Hamrrting (7,4) code, a burst-error-correcting Hamming (8,4) code with a burst of error of length 2, and a double-error-correcting Bose- Chaudhuri-Hocguenghem (15,7) code. The meggitt decoding (error-trapping decoding) is used to demonstrate practical application of the Hamming (7,4) and (8,4) codes. Also, one-step majority-logic decoding is used to demonstrate practical application of the Bose-Chaudhuri-Hocquenghem (15,7} code. These decodings are simple applications of a variety of mathe- matical proofs and relations. vii ]· SECTION I I OVERVIEW I The block diagram of a binary digital cormmmication system is shown in Figure I. The channel is a medium over which signals containing useful information are transmitted. Typical examples of transmission channels are telephone lines, high frequency radio links and space communication links. The channel is usually subject to various types of noise disturbance. Binary Binary Message ~ Encoder ~ Channel Decoder Message Input Output . T Noise Figure I Block diagrame of a typical data communication The coding problem is to design properly the encoder and decoder units so that the binary bits coming out of decoder match those that entered the encoder--even if errors occur within the noisy channel. The practical error-correcting codes can not I compensate for every conceivable error pattern, but they , can be designed to correct the most likely types of I 1 errors. I I . l L---~-··-----·~-·-------------~·-···-------------·----~-···--···-----------~---·--~----1 1 2 Block Codes In digital communication systems, nearly all of the codes used are block codes. A block code is one that uses fixed-length sequencing of code symbols. Each sequence, or block, represents a code word. The job of the encoder units is to form these code words properly. The decoder unit must correctly identify each code word. Cyclic Code One class of block codes that has desirable mathe- matical properties is the class of cyclic codes. These codes are the basis for many practical digital communi- cation coding systems. A cyclic code can be completely specified by a polynomial called a generator polynomial. Code Words can be generated by forming multiples of this polynomial. Code words can be identified as correct when division by the generator polynomial results in a zero reminder. Hamming Code This code is easily described in terms of its purity check matrix and requires the minimum number of check symbols for a single error correcting code. In general, a code with minimum Hamming distance (d min) contains error-correcting capability t. Error correcting capa- bility is. t = (d min - 1)/2. • n-k n-k Consider the (2 - 1 = 7, 2 - n-k- 1 = 4) Hamming code over the field elements l's and O's. The following is the relation between various parameters of the code; Code length; Number of parity check digits; n - k Number of information digits; k = 2 ~-~-k - 1 The (7, 4) Hamming code has a minimum distance of 3 and is capable of correcting all single errors. The code word has length 7 with 3 parity check digits, and 4 information digits. Section II will describe encoding techniques incorporated with the (7, 4) Hamming code. The encoder, according to some rule, transforms the input information sequence m into some longer binary sequence v, which is called the code word of m. Section III will describe decoding techniques . incorporated with the (7, 4) Hamming code. The decoder, (based on the received sequencer, the rule of encoding), does correct and detect the received code word r over a noisy channel. Section IV will describe decoding technique incorpo- rated with the (8, 4) Hamming code. The decoder does detect and correct a burst of error of length 2. 4 SECTION II THE ENCODER FOR A (7.4) HAMMING CODE Consider the (7.4) Hamming code generated by given primitive polynomial g(x) = l+x+x3 • The message to be encoded is: and the corresponding message polynomial of degree k-1 is; m(x) = m +m x+m x 2+m x 3 . 0 1 2 3 3 Given the generator polynomial g(x) = l+x+x of a (7.4) Hamming code, the code can be put into the systematic form. That is, first n-k = 3 digits of each code word are parity check digits; the last k = 4 digits are the unaltered information digits. We can multiply message polynomial m(x) by xn-k = x3 and divide it by g(x) to obtain systematic code words. x 3m(x) = m x 3+m x 4+m x 5+m x 6 (1) 0 1 2 3 Dividing x 3m(x) by g(x) = l+x+x3 we obtain: x 3m(x) = q(x)g(x)+r(x) where q(x) = quotient r(x) =remainder Since the degree of the generator polynomial g(x) is n-k = 3, the degree of r(x) must be n-k-1 = 2 or less. Then r(x) = r +r x+r s2 (2) 0 1 2 Rearranging Eq (2) , we obtain 5 r{x)+x3m(x) = q(x)g(x). This indicates that r(x) + x 3m(x) is a multiple of g(x) and has degree n-1 or less. Therefore, r(x) + x 3m(x) is a code polynomial of the (7.4) Hamming code generated by g(x). Writing out r(x)+x3m(x), using Eq (1) and (2); r(x) + x 3m(x) = r +4 x+r x 2 +m x 3 +m x 4 +m x 5 +m x 6 0 1 2 0 1 2 3 and the code word is: ( ro, rl, r2, mO,ml, m2' m3 ) Parity check Information digits digits where terms r and mj are l's or O's. Therefore, ~he 1 code word consists of unaltered k = 4 information digits followed by n-k = 3 parity check digits.· In connection with cyclic codes, the following convention will be used. The first n-k = 3 symbols, coefficients of l,x,x 2 , will be taken as parity check digits and the last k = 4 digits, coefficients of x 3 , x 4 , x 5 , x 6 , will be taken as informa- tion digits. Division of a (7.4) Hamming code by g(x) is shown in Table I and step-by-step operation encoding circuit is shown in Figure II and Table II, respectively.