Vous êtes sur la page 1sur 4

Section B: Coding

For this activity, I have paired up with my friend Choo Leong Fook to send 3
codeword with length 6 and in modulus 2 to each other. We have chosen the Slepians
Standard Array method to decode the codeword. To start this activity, I start by being the
person who sends the codeword to my partner.
Encoding:
To choose a code word:
1st Codeword, C = [c1 c2 c3 c4 c5 c6]
[c1 c2 c3] = message digits; I set it as [110], [c4 c5 c6] = check digits
c4 = c1 + c2
c5 = c1
c6 =

(mod 2)
+ c3

(mod 2)

+ c2 + c3

(mod 2)

So, c4 = 1 + 1 = 0 (mod 2); c5 = 1 + 0 = 1(mod 2); c6 = 1 + 0 = 1 (mod 2)


The original codeword, C = [110 011]
I choose an error, E with weigth1, E = [001000]
Therefore, the codeword to send is R, which is R = C + E is equal to,
R = 110011 + 001000
= 111011
2nd Codeword, C = [c1 c2 c3 c4 c5 c6]
[c1 c2 c3] = message digits; I set it as [010] , [c4 c5 c6] = check digits
c4 = c1 + c2
c5 = c1
c6 =

(mod 2)
+ c3

(mod 2)

+ c2 + c3

(mod 2)

So, c4 = 0 + 1 = 1 (mod 2); c5 = 0 + 0 = 0(mod 2); c6 = 1 + 0 = 1 (mod 2)


The original codeword, C = [010101]
I choose no error, E = [000000]
Therefore, the codeword to send is R, which is R = C + E is equal to,
R = 010101 + 000000

= 010101
3rd Codeword, C = [c1 c2 c3 c4 c5 c6]
[c1 c2 c3] = message digits; I set it as [100], [c4 c5 c6] = check digits
c4 = c1 + c2
c5 = c1
c6 =

(mod 2)
+ c3

(mod 2)

+ c2 + c3

(mod 2)

So, c4 = 1 + 0 = 1 (mod 2); c5 = 1 + 0 = 1(mod 2); c6 = 0 + 0 = 0 (mod 2)


The original codeword, C = [100110]
I choose an error, E with weight 2, E = [000101]
Therefore, the codeword to send is R, which is R = C + E is equal to,
R = 100110 + 000101
= 100011
I then send this 3 codeword to be decoded by my partner, the 3 codes are:
i) R = [111011]

ii) R = [010101]

iii) R = [100011]

Decoding:
After I have sent my codeword to my partner, I also received 3 codeword from him to be
decoded. The 3 codeword are:
i) R = [110111]

ii) R = [110001]

iii) R = [011110]

I start by decoding the first codeword R = [110111].


Steps:
R = [r1 r2 r3 r4 r5 r6]
Find syndrome of R, s = [s1 s2 s3]
s1 = r1 + r2
s2 = r1
s3 =

+ r4
+ r3

+ r2 + r3

(mod 2)

+ r5
+ r6

Therefore, s1 = 1 + 1 + 1 = 1;

(mod 2)
(mod 2)
s2 = 1 + 0 + 1 = 0; s3 = 1 + 0 + 1 = 0

I get syndrome, s = [100]


Using Slepians Standard Array, I found that in s = [100], the word with the least number
of 1s is 010000.
I then take this word as error, E = [010000]
Then, let C = R E
= 110111 010000
= 100111
Through my decoding, for i) R = [110111] the codeword, C is [100111].

Next is to decode ii) R = 110001


Steps:
R = [r1 r2 r3 r4 r5 r6]
Find syndrome of R, s = [s1 s2 s3]
s1 = r1 + r2
s2 = r1
s3 =

+ r4
+ r3

(mod 2)

+ r5

+ r2 + r3

+ r6

Therefore, s1 = 1 + 1 + 0 = 0;

(mod 2)
(mod 2)
s2 = 1 + 0 + 0 = 1; s3 = 1 + 0 + 1 = 0

I get syndrome, s = [010]


Using Slepians Standard Array, I found that in s = [010], the word with the least number
of 1s is 010000.
I then take this word as error, E = [000010]
Then, let C = R E
= 110001 000010
= 110011
Through my decoding, for i) R = [110001] the codeword, C is [110011].

The last codeword is iii) R = 011110


Steps:

R = [r1 r2 r3 r4 r5 r6]
Find syndrome of R, s = [s1 s2 s3]
s1 = r1 + r2
s2 = r1
s3 =

+ r4
+ r3

(mod 2)

+ r5

+ r2 + r3

+ r6

Therefore, s1 = 0 + 1 + 1 = 0;

(mod 2)
(mod 2)
s2 = 0 + 1 + 1 = 0; s3 = 1 + 1 + 0 = 0

I get syndrome, s = [000]


According to Slepians Standard Array, if s = [000], this means that the codeword does
not have any error.
This means that C = R E
= 011110 000000
= 011110
The decoded codeword is the same as the received codeword, R =C = 011110

After this activity, I and my partner compared our results. We found that when the
received codeword contains no or only one error, we can successfully decode it. But
when the codeword contains more than one error, we cannot decode the codeword
successfully. This can be seen in our results:
I sent R = [100011] to my partner. He decoded it and got C = [110011] but the original
codeword that I set was C = [100110]
The codeword that my partner sent was R = [110001]. I decoded it and got C = [110011]
but the original codeword that my partner set was C = [111000].
This shows that only codeword that have no or only one error can be corrected using
the Slepians Standard Array method.

Vous aimerez peut-être aussi