I have some difficulties in computing Hamming distance in following example:


I know the definition of Hamming distance (in case of two codewords) but how to proceed in above example. Can someone shed some light on how to compute d_min in above example?


  • 1
    $\begingroup$ What is d_min? If it's just the minimum Hamming distance between any pair of codewords, then you just need to compute all the distances and choose the smallest. $\endgroup$ Jan 8, 2018 at 19:30
  • $\begingroup$ Welcome to Computer Science! The title you have chosen is not well suited to representing your question. Please take some time to improve it; we have collected some advice here. Thank you! $\endgroup$
    – Raphael
    Jan 8, 2018 at 21:41

1 Answer 1


Denote the codewords as $a_1,...a_4$. Remember that the hamming distance is the number of different bits between two codewords.

  1. $d(a_1,a_2) = 6$
  2. $d(a_1,a_3) = 4$
  3. $d(a_1,a_4) = 4$
  4. $d(a_2,a_3) = 4$
  5. $d(a_2,a_4) = 4$
  6. $d(a_3,a_4) = 6$

Thus $d=4$.


Not the answer you're looking for? Browse other questions tagged or ask your own question.