Professional Documents
Culture Documents
Submitted By:
Farida Mohamed Ahmed 18P1474
Hagar Ahmed Mohamed 18P6623
Mariam Hany Wadie 18P5465
Nada Ayman Abd El Qader 18P3028
Rahma Ahmed Hesham 18P9374
Submitted To:
Dr. Fatma Newagy
Eng. Moustafa Mohamed
1
Main Concept
• Cyclic Code properties
• Encoding
• Decoding
Agenda Encoder & Decoder Circuit Design
Linearity property
Cyclic shifting of any codeword right or left by any number of bits gives another codeword
Encoding Decoding
Generator
Division Generator Multiplicatio
matrix
method matrix method n method
method
Non-systematic Codeword
In Non-Systematic codeword
, msg = 1010
msg polynomial =
c(x) = m(x)*g(x) =
R1 1 0 1 1 0 0 0
• G= R2 = 0 1 0 1 1 0 0
0 0 1 0 1 1 0
R3
0 0 0 1 0 1 1
R4
Cyclic code for non-systematic codeword
(Generator Matrix Method)
EX: construct Non-Systematic codeword (7,4) using cyclic codes, generator polynomial
g(x) = x3 + x + 1, msg = 1011
G= 1 0 1 1 0 0 0
0 1 0 1 1 0 0
0 0 1 0 1 1 0
0 0 0 1 0 1 1
1 0 1 1 0 0 0
C =m * G = [1011]
0 1 0 1 1 0 0
0 0 1 0 1 1 0
0 0 0 1 0 1 1
=1000101
Cyclic code for systematic codeword
(Division Method)
In Systematic codeword
codeword = [msg, parity]
How to get codeword?!
c(x) = xn-k m(x) + p(x) , p(x) = rem [/g(x)]
, m(x) message polynomial
, g(x) generator polynomial
, c(x) codeword polynomial
Cyclic code for systematic codeword
(Division Method)
Ex: construct Systematic codeword (7,4) using cyclic codes, generator polynomial
g(x) = x3 + x2 + 1, msg = 1010
msg polynomial = x3 + x
c(x) = xn-k m(x) + p(x) , p(x) = rem [/g(x)] , n= 7 & k =4
/g(x) = x3 (x3 + x ) / (x3 + x2 + 1 ) = ( x6 + x4) / (x3 + x2 + 1 )
x3 + x2 + 1
x3 + x2 + 1 x 6 + x4
x 6 + x5 + x 3
x5 + x4 + x3
x5 + x4 + x2
x3 + x 2
In Systematic codeword
codeword = [msg , parity]
How to get codeword?!
c= m* g , m message matrix
, g generator matrix
, c codeword matrix
Cyclic code for systematic codeword
(Generator Matrix Method)
Getting Generator matrix from generator polynomial:
• G = [I : P], G is of size nxk
• Identity matrix is of size kxk
• To get parity matrix → 1st row : rem [/g(x)]
→ 2.nd row : rem [/g(x)]
..
x4 + x2 + x
3rd row bits = 110 x2 + x
Cyclic code for systematic codeword
(Generator Matrix Method)
→ 4th row : rem [/ (x3 + x + 1)]] = x+1 1
x3 + x + 1 x3
x3 + x + 1
x+ 1
4th row bits = 011
1 0 0 0 1 0 1
G = [I : P] =
0 1 0 0 1 1 1
0 0 1 0 1 1 0
0 0 0 1 0 1 1
Cyclic code for systematic codeword
(Generator Matrix Method)
Ex: construct Systematic codeword (7,4) using cyclic codes, generator
polynomial g(x) = x3 + x + 1, msg = 1011
G= 1 0 0 0 1 0 1
0 1 0 0 1 1 1
0 0 1 0 1 1 0
0 0 0 1 0 1 1
C = m * G = 1011 1 0 0 0 1 0 1
0 1 0 0 1 1 1
0 0 1 0 1 1 0
0 0 0 1 0 1 1
= 1011000
Decoding of cyclic codes
a. Syndrome Decoding:
It’s used in cyclic codes in order to decode the sequence and to decode and
correct it.
Syndrome polynomial is obtained as
S(x)= Reminder of
If S(x) =0, then No errors
If S(x), there are some errors
Decoding of cyclic codes
a. Syndrome Decoding:
Ex: Consider received sequence is R=1011000 for (7,4) code dimension and
generator polynomial g(x)=
Find received sequence is valid or not?
S(x)=0 → No Error
Cyclic encoder Circuit design
Codewords could be generated using n-k flipflops
1 1 0 1
FF FF FF
P3 Input
P1 P2
MS message
LSB
B
Cyclic encoder Circuit Design
Construct codeword (7,4) using cyclic codes, generator polynomial
g(x) = x3 + x + 1, msg = 1011
Input B
P1 = inputi-1 xor P3i-1 P2 = inputi-1 xor P1i-1 xor P3i-1 P3 = P2i-1
1 0 0 0
After 1st clk cycle 0 1 1 0
After 2nd clk cycle 1 0 1 1
After 3rd clk cycle 1 0 0 1
After 4th clk cycle 0 0 0
P1 P2 P3
LSB MSB
Cyclic Decoder Circuit Design
b. Syndrome Calculator:
Ex: Consider a cyclic code with code dimension (7,4) and g(x)=. If the received codeword
is R=1001000. Determine the syndrome by using a syndrome calculator.
so, S=110
Advantages of cyclic code
Reed-Solomon codes have been widely used in mass storage systems to correct the
burst errors caused by media defects.
Special types of Reed-Solomon codes have been used to overcome the unreliable
nature of data transmission over erasure channels.
Several bar-code systems use Reed-Solomon codes to allow correct reading even if a
portion of a bar code is damaged.
Reed-Solomon codes were used to encode pictures sent by the Voyager spacecraft.
Other applications of cyclic code
Satellite & wireless communication :
The information sent digitally in satellite & wireless communication uses cyclic code
in the encoding and decoding process.
Compact discs(CD):
Since CD errors are burst errors, cyclic codes can be used in CDs to correct these
burst errors.
Error correction: