Question

In: Computer Science

create and submit your own example of the use of a Hamming code to detect and...

create and submit your own example of the use of a Hamming code to detect and correct a single-bit error.

Solutions

Expert Solution

Hamming code is a liner code that is useful for error detection up to two immediate bit errors. It is capable of single-bit errors.In Hamming code, the source encodes the message by adding redundant bits in the message. These redundant bits are mostly inserted and generated at certain positions in the message to accomplish error detection and correction process.

Single Bit Errors:-The change made in one bit in the entire data sequence is known as "Single bit error". However, the occurrence of single-bit error is not that common. Moreover, this error only occurs in a parallel communication system because data is transferred bitwise in a single line. Therefore, there is more chances that a single line can be noisy.

Let's say you have received a 7-bit Hamming code which is 1011011.The redundant bits are some extra binary bits that are not part of the original data, but they are generated & added to the original data bit. All this is done to ensure that the data bits don't get damaged and if they do, we can recover them.

We use the formula, 2r >= m+r+1; where r = redundant bit & m = data bit.

From the formula we can make out that there are 4 data bits and 3 redundancy bits, referring to the received 7-bit hamming code.

As we go through the example, the first step is to identify the bit position of the data & all the bit positions which are powers of 2 are marked as parity bits (e.g. 1, 2, 4, 8, etc.). The following image will help in visualizing the received hamming code of 7 bits.

First, we need to detect whether there are any errors in this received hamming code.

Step 1: For checking parity bit P1, use check one and skip one method, which means, starting from P1 and then skip P2, take D3 then skip P4 then take D5, and then skip D6 and take D7, this way we will have the following bits,

As we can observe the total number of bits are odd so we will write the value of parity bit as P1 = 1. This means error is there.

Step 2: Check for P2 but while checking for P2, we will use check two and skip two method, which will give us the following data bits. But remember since we are checking for P2, so we have to start our count from P2 (P1 should not be considered).

As we can observe that the number of 1's are even, then we will write the value of P2 = 0. This means there is no error.

Step 3: Check for P4 but while checking for P4, we will use check four and skip four method, which will give us the following data bits. But remember since we are checking for P4, so we have started our count from P4(P1 & P2 should not be considered).

As we can observe that the number of 1's are odd, then we will write the value of P4 = 1. This means the error is there.

So, from the above parity analysis, P1 & P4 are not equal to 0, so we can clearly say that the received hamming code has errors.

Hamming Code: Error Correction

Since we found that received code has an error, so now we must correct them. To correct the errors, use the following steps:

Now the error word E will be:

Now we have to determine the decimal value of this error word 101 which is 5 (22 *1 + 21 * 0 + 20 *1 = 5).

We get E = 5, which states that the error is in the fifth data bit. To correct it, just invert the fifth data bit.So the correct data will be:

********************************************************************************************************************

Hope I answer your query.In case of any doubt do ask in the comment section.Thank you


Related Solutions

create and submit your own example, using the CRC-8 polynomial (x8+ x7 + x6 + x4...
create and submit your own example, using the CRC-8 polynomial (x8+ x7 + x6 + x4 + x2 +1) to show that an error does or does not occur.
The data to be sent : 11011100110, how to create the Hamming code with even parity?...
The data to be sent : 11011100110, how to create the Hamming code with even parity? If the right most bit is changed due to noise during transmission, how does the receiver to correct the incorrect bit. Assume only one bit is altered during transmission.  
Create your own example of a misleading statistic.
Create your own example of a misleading statistic. Explain the context of the data, the source of the data, the sampling method that you used (or would use) to collect the data, and the (misleading) conclusions that would be drawn from your example. Be specific in explaining how the statistic is misleading.
Use Python to Complete the following on a single text file and submit your code and...
Use Python to Complete the following on a single text file and submit your code and your output as separate documents. For each problem create the necessary list objects and write code to perform the following examples: Sum all the items in a list. Multiply all the items in a list. Get the largest number from a list. Get the smallest number from a list. Remove duplicates from a list. Check a list is empty or not. Clone or copy...
Differentiate between parity code and hamming code with examples
Differentiate between parity code and hamming code with examples
please submit the C code( no third party library). the C code will create output to...
please submit the C code( no third party library). the C code will create output to a file, and iterate in a loop 60 times and each iteration is 1 second, and if any key from your keyboard is pressed will write a 1 in the file, for every second no key is pressed, will write a 0 into the output file.
Construct an even parity Hamming code for 1101010
Construct an even parity Hamming code for 1101010
Create your own probability example of compound events please explain logic and approach. Example must be...
Create your own probability example of compound events please explain logic and approach. Example must be unique and easy to follow i.e. colors, numbers, age, size, etc.
(PLEASE TYPE THE ANSWERS) create your own example of a misleading statistic. Explain the context of...
(PLEASE TYPE THE ANSWERS) create your own example of a misleading statistic. Explain the context of the data, the source of the data, the sampling method that you used (or would use) to collect the data, and the (misleading) conclusions that would be drawn from your example. Be specific in explaining how the statistic is misleading.
Explain the term identity abuse and create your own example as to how this can happen...
Explain the term identity abuse and create your own example as to how this can happen to someone.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT