# Hamming Code

1k views

0
What Is The Ans of this questions.

What is the answer?
option D.

only 1st parity bit incorrect.
 $D_{12}$ $D_{11}$ $D_{10}$ $D_9$ $P_8$ $D_7$ $D_6$ $D_5$ $P_4$ $D_3$ $P_2$ $P_1$ $1$ $0$ $1$ $0$ $0$ $0$ $0$ $0$ $1$ $0$ $1$ $0$

for $P_1$ we check $D_3D_5D_7D_9D_{11}=00000$ Hence $P_1$ should be $0$

for $P_2$ we check $D_3D_6D_7D_{10}D_{11}=00010$ Hence $P_2$ should be $1$

for $P_4$ we check $D_5D_6D_7D_{12}=0001$ Hence $P_4$ should be $1$

for $P_8$ we check $D_9D_{10}D_{11}D_{12}=0101$ Hence $P_8$ should be $0$

Hence the correct codeword should be

 $D_{12}$ $D_{11}$ $D_{10}$ $D_9$ $P_8$ $D_7$ $D_6$ $D_5$ $P_4$ $D_3$ $P_2$ $P_1$ $1$ $0$ $1$ $0$ $0$ $0$ $0$ $0$ $1$ $0$ $1$ $0$

Hence Option $1010\ 0000\ 1010$ is correct answer.

edited by
1

Why are we checking for D12 while checking for P1. shouldn't we consider D11 because it has 11 has 1 in LSB?

This link here says for P1 we need to check those bit positions which have 1 in them at LSB(3, 5, 7 9, 11), for P2, second from LSB(3, 6, 7, 10, 11) and so on. Using the this logic I got the same code for P2, P3 and P4. So answer turns out to be for me.

https://www.geeksforgeeks.org/hamming-code-in-computer-network/

0

@Aware1111

yes you are correct by mistake i took $D_{12}$ instead of $D_{11}$, rest were correct but now i am not getting $A$.

please check once more, i updated my answer.

## Related questions

1
132 views
plz tell the answer