Question

In: Computer Science

Differentiate between parity code and hamming code with examples

Differentiate between parity code and hamming code with examples

Solutions

Expert Solution

When we transmit data over a channel it is always susceptible to getting changed due to noise. So we need some method that can help us to detect these changes in bits.

Here comes in the Parity codes. Here we place an extra bit at the end of each data stream. This bit can be a 1 or a 0. We can work with an even parity or an odd parity. The parity here means the no. of one's. If after adding the parity bit we want no. of 1's to be even then it is called even parity else it is called odd parity. The sender and the receiver both know the type of parity used for the transmission. If there is a change in the parity then the receiver will know that there is an error. But there is no method to find out where the error is, also if there is an error in an even no. of bits then the error will go undetected. For this, we can use 2d parities, but still, there are cases where the errors may get undetected.

Eg. of an even parity:-

The data string:- 01101101.

The total message with even parity that will be transmitted 011011011.

for Odd parity, the message would have been 011011010.

Now Hamming codes are a combination of parity bits which can help us to detect which bits got flipped & then we can correct them. Hamming codes are a family of linear error-correcting codes. They can detect up to 2-bit errors or correct 1-bit errors. In the hamming code, we place some redundant bits for the purpose of detecting errors.

For a 7 bit no. there will be 4 redundant bits which give a total of 11 bits message.

Let the message be 1011001.

11 10 9 8 7 6 5 4 3 2 1
D7 D6 D5 R8 D4 D3 D2 R4 D1 R2 R1

The first line represents the bits locations, the R shows the redundant terms. Now we already know the data bits, we only need to determine the parity bits.

R1 will check the parity with all those bits whose positions binary representation includes a 1 in LSB. Here, 1, 3, 5, 7, 9, 11

R2 will check the parity with all those bits whose positions binary representation includes a 1 in the second position from the LSB. Here, 2, 3, 6, 7, 10, 11

R4 will check the parity with all those bits whose positions binary representation includes a 1 in the third position from the LSB. Here, 4-7.

R8 will check the parity with all those bits whose positions binary representation includes a 1 in the fourth position from the LSB. Here, 8-15

For even parity the bits will

R1 = 0; R2 = 1; R4 = 1; R8 = 0.

So the data to be transferred will be 10101001110.

Now similarly the receiver can check the parity in same manner and check for errors.

Hope this helps. If you have any queries or suggestions regarding the answers please leave them in the comments section so I can update and improve the answer. Thank you.


Related Solutions

Construct an even parity Hamming code for 1101010
Construct an even parity Hamming code for 1101010
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.  
Construct an even parity Hamming code with a total of 7 bits (4 data bits and...
Construct an even parity Hamming code with a total of 7 bits (4 data bits and 3 check bits).
Construct a generator matrix and a parity check matrix for a ternary Hamming code Ham(2, 3)....
Construct a generator matrix and a parity check matrix for a ternary Hamming code Ham(2, 3). Assume a codeword x from for the ternary Hamming code Ham(2, 3)$ was sent and the word y was received. Use the partiy check matrix you constructed in part (a) to decode y in each part using syndrome decoding: (b) y = ( 1 , 1 , 1 , 0 ), (c) y = ( 2 , 2 , 2 , 2 ), (d)...
write and explain two dimensional parity check code and hamming codes in simple way please
write and explain two dimensional parity check code and hamming codes in simple way please
An 8-bit byte with binary value 11001101 is to be encoded using an even-parity Hamming code....
An 8-bit byte with binary value 11001101 is to be encoded using an even-parity Hamming code. What is the binary value after encoding? A bit stream 10101010 is transmitted using the standard CRC method. The divisor is 1011. Show the actual bit string transmitted. Suppose the second bit from the left is inverted during transmission. Show that how this error is detected by the receiver? What is the maximum size of the sender window and receiver windows for each of...
Given the data-bits m = 11010110, determine the number of k (parity-bits) by using Hamming Code...
Given the data-bits m = 11010110, determine the number of k (parity-bits) by using Hamming Code requirements. Illustrate the error detection and correction scheme using Hamming code method, for both the sender and receiver to detect an error at the following positions: a.6thbit position. b.11thbit position.Assume an odd-parity scheme for this problem.
Given the data-bits m = 11010110, determine the number of k (parity-bits) by using Hamming Code...
Given the data-bits m = 11010110, determine the number of k (parity-bits) by using Hamming Code requirements. Illustrate the error detection and correction scheme using Hamming code method, for both the sender and receiver to detect an error at the following positions: a. 6th bit position. b. 11th bit position. Assume an odd-parity scheme for this problem.
Given the 21-bit even-parity Hamming code: 0 1010 0111 0011 0000 0101 and assuming there is...
Given the 21-bit even-parity Hamming code: 0 1010 0111 0011 0000 0101 and assuming there is one incorrect bit. a. Which bit is incorrect? My educated guess for what the incorrect bit maybe has me thinking it is the '1' bit at the end of the '0111' byte, but I have no full proof as to why it is that specific bit. Am I in the right area to think that? b. After the error is corrected, what decimal number...
A 12-bit Hamming code word containing 8 data bits and 4 parity bits is read from...
A 12-bit Hamming code word containing 8 data bits and 4 parity bits is read from memory. What was the original 12-bit word written into memory, if the 12-bit word read were the following? (i) 000011101010 (ii) 101110000110 (iii) 101111110100
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT