title: How to calculate Hamming code of (31,26)?
body: <p>I need to construct the (31,26) hamming code of 0x444.</p>
  
  <p>After reading Wikipedia and the algorithm shown in GeeksForGeeks I still can't understand how this works as my construction ended up different than the result of a calculator I found on the internet.</p>
  
  <p>My result is: 0100 0100 0010 0010 or 0x4422
  is it correct?</p>
  
  <p>As I understand:
  P1 = Bitwise XOR(C1,C3,C5,C7,C9,C11,C13.C15,C17..) = 0</p>
  
  <p>P2 = Bitwise XOR(C2,C3,C6,C7,C10,C11,C14,C15..) = 1</p>
  
  <p>P3 = Bitwise XOR(C4,C5,C6,C7,C12,C13,C14,C15..) = 0</p>
  
  <p>P4 = Bitwise XOR(C8,C9,C10,C11,C12,C13,C14,C15..) = 0</p>
  
  <p>P5 = Bitwise XOR(C16,C17..) = 0</p>
  
  <p>Another thing I can't understand.. if (31,26) hamming code is supposed to output a 31 bit result with 5 parity bits and 26 data bits.. why (7,4) hamming code transforms <strong>each</strong> 4 bits to 7 bits representation and not just 1 representation of 7 bits with 3 parity bits?</p>
  
  <p>Thanks.</p>