jueves, 9 de mayo de 2013

Homework 5 - Error Correction

This week, it was made a code to correct errors, implementing the Hamming code.

Functionality

The hamming code allows us to find errors in a received text.

The technique used is applied the hamming code

This indicates that will be a string of 4 bits to represent numbers, letters, etc., and will be accompanied by "parity bits".

Then, with 4 bits are limited to using only 16 combinations, this means that we can only apply this technique only to 16 numbers.


Code
Code + Paraty bit
0
0000
0000000
1
0001
0001111
2
0010
0010110
3
0011
0011001
4
0100
0100101
5
0101
0101010
6
0110
0110011
7
0111
0111100
8
1000
1000011

Now, we take the bits paraty:

P1 = d2 + d3 + d4
P2 = d1 + d3 + d4
P3 = d1 + d2 + d4

Example:

We took the code + parity bits of "0111" would be as follows:

0 = D1, 1 = D2, 1 = D3, 1 = D4

We do the operation "exor":

B1 = 1 +1 +1 = 1 (1 +1) = 0 (0 +1) = 1
B2 = 0 +1 +1 = 0 (0 +1) = 1 (1 +1) = 0
B3 = 0 +1 +1 = 0 (0 +1) = 1 (1 +1) = 0

Have "0111" + "100" and is equal to "01111000".

Now, we generate our matrix "G":

D1 = 1000 -> 011
D2 = 0100 -> 101
D3 = 0010 -> 110
D4 = 0001- > 111

Now, the code

***This code, I took a page I found the internet in order to do my job, but I could not finish it

Code:

Now, the results

Results:

:(

Analysis:

:(

Repository:

References: 

1 comentario: