written 2.9 years ago by | • modified 2.9 years ago |
7-bits even parity Hamming code is received as 1100010
In 7-bits Hamming code 4-bits (D3, D5, D6 & D7) represents data bits and 3-bits (P1, P2, & P4) are parity bits.
This 7-bit Hamming code is represented as follows:
Bit Position | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
---|---|---|---|---|---|---|---|
Hamming Code Representation | P1 | P2 | D3 | P4 | D5 | D6 | D7 |
Received Hamming Code | 1 | 1 | 0 | 0 | 0 | 1 | 0 |
To check whether the received Hamming code is correct or not let's perform the following operations:
Take the bits present at the below-mentioned places
Parity bit-1 covers all the bits positioned at bit-position 1, 3, 5, 7, 9, 11,.. etc.
Therefore,
C1 = Even_Parity(1, 3, 5, 7) = 1 0 0 0 = 1 (Odd number of 1,s, which means error is present)
Parity bit-2 covers all the bits positioned at 2, 3, 6, 7, 10, 11,... etc.
Therefore,
C2 = Even_Parity(2, 3, 6, 7) = 1 0 1 0 = 0 (Even number of 1's, which means No error is present)
Parity bit-4 covers all the bits positioned at 4–7, 12–15, 20–23,... etc.
Therefore,
C4 = Even_Parity(4, 5, 6, 7) = 0 0 1 0 = 1 (Odd number of 1's, which means error is present)
Therefore,
C = C4 C2 C1 = 1 0 1 = It represent decimal number 5
That means a Single bit error is present at the $5^{th}$ position of received Hamming code 1100010.
Now, remove the $5^{th}$ position single bit error.
The $5^{th}$ bit holds 0 which creates an error in a Hamming encoded 7-bit number. Hence, to remove this error 0 is replaced with 1.
Therefore,