Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Please making this in different format but same matiral and make it as one perso

ID: 3574626 • Letter: P

Question

Please making this in different format but same matiral and make it as one person work instead of two person work. so read it to know what I am talking about.

"Hamming Codes"

Hamming codes are used to identify and correct the error bit in the data stream. Its encoding scheme includes following steps:

1- Find out the no. of bits needed for hamming code using 2n > m+n+1

2- Then insert these hamming codes in the message bit stream anywhere you want.

3- Now value of these hamming codes will be determined using XOR operation.

4- Final result be the actual hamming codes.

Part a:

As per given task, let’s consider a message stream of 4 bits 1110.

Using formula:                    2n > m+n+1

23 > 4+3+1

8 > 8

So it is clear that no. of bits used for hamming codes will be 3.

Inserting 3 hamming bits in the given message stream:

                  7               6               5               4               3               2               1

H               1               H               1               H               1               0

Consider all those bits of message stream which are 1. XOR the binary value of their bit number and find out actual result.

Position code 2                                    010        

Position code 4                                    100

XOR sum 110

Position code 6                                    110

XOR sum 000

The resulting sum is that hamming code bits from left to right. Position code 7 is 0, position code 5 is 0 and position code 3 is 0.

The final 7-bit transmitted code word is

                  0               1               0               1               0               1               0

If during transmission error occurred at bit 1 and changed it from 0 to 1. Not the transmitted stream is              

                  0               1               0               1               0               1               1

I emailed the above error containing stream to my friend. He decoded the stream and sent me the corrected stream which is

                  0               1               0               1               0               1               0

And the error bit is correctly identified.

Part b:

My friend sent me a bit stream encoded by hamming codes. This stream has suffered to an error during transmission and its one bit has been flipped. Now my task is to find out that bit which has been changed during transmission.

Received data stream is:              1               1               1               0               1               0               0              

The receiver recognizes the hamming bits and treats them as a code word, in this case 100. The circuitry then adds (XOR) this code with the bit number if each position in the word containing a binary 1, positions 3, 5 and 7.

The hamming code is then added to the binary numbers representing each position with a 1.

Hamming code 100

Position code 3 011

XOR Sum 111

Position code 5 101

XOR Sum 010

Position code 7 111

XOR Sum 101

This final sum is a code that identifies the bit position of this error in this case bit 5(101). To correct the bit, it is simply complemented from 1 to 0. If there would have been no error, then XOR sum would be zero.

Note that Hamming code does not work if an error occurs in one of the hamming bits itself.

I emailed the corrected bit stream to my friend which is

1               1               0               0               1               0               0              

Feedback

His feedback was that I have sent him the correct bit stream. Hence the bit identified and corrected is bit 5 which is rightly identified

Explanation / Answer

Hamming codes are used to identify and correct the error bit in the data stream.

Part a:

As per given task, let’s consider a message stream of 4 bits 1110.

Using formula:                    2n > m+n+1

2*3> 4+3+1

8 > 8

So it is clear that no. of bits used for hamming codes will be 3.

Inserting 3 hamming bits in the given message stream:

7               6               5               4               3               2               1

H               1               H               1               H               1               0

Consider all those bits of message stream which are 1.

XOR the binary value of their bit number and find out actual result.

Position code 2                                    010        

XOR sum is 110

Position code 4                                    100

XOR sum 110

Position code 6                                    110

XOR sum 000

The resulting sum is that hamming code bits from left to right. Position code 7 is 0, position code 5 is 0 and position code 3 is 0.

The final 7-bit transmitted code word is

                  0               1               0               1               0               1               0

If during transmission error occurred at bit 1 and changed it from 0 to 1. Not the transmitted stream is              

                  0               1               0               1               0               1               1

The stream is decoded the stream

                  0               1               0               1               0               1               0

And the error bit is correctly identified.

Part b:

A stream is encoded by hamming codes. This stream has suffered to an error during transmission and its one bit has been flipped. Now my task is to find out that bit which has been changed during transmission.

Received data stream is:              1               1               1               0               1               0               0              

The receiver recognizes the hamming bits and treats them as a code word, in this case 100. The circuitry then adds (XOR) this code with the bit number if each position in the word containing a binary 1, positions 3, 5 and 7.

The hamming code is then added to the binary numbers representing each position with a 1.

Hamming code 100

Position code 3 011

XOR Sum 111

Position code 5 101

XOR Sum 010

Position code 7 111

XOR Sum 101

This final sum is a code that identifies the bit position of this error in this case bit 5(101). To correct the bit, it is simply complemented from 1 to 0. If there would have been no error, then XOR sum would be zero.

Note that Hamming code does not work if an error occurs in one of the hamming bits itself.

The corrected bit stream is

1               1               0               0               1               0               0              

Feedback

I have sent the correct bit stream. Hence the bit identified and corrected is bit 5 which is rightly identified

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote