Hamming Distance Calculator

Your details

Choose the type of strings you want to compare.
First string. For binary, only 0 and 1 are accepted. For hex, 0-9 and A-F.
Second string. Must be the same length as String 1 (binary and hex will be zero-padded if needed).
Hamming distanceModerately different
4

Number of positions at which the two strings differ

Similarity50%
String length8
Errors detectable3
Errors correctable1
50% %
Very different<50%Moderately different50%-70%Moderately similar70%-90%Very similar90%+

Hamming distance is 4 - the strings differ at 4 positions.

  • 4 of 8 bits differ, meaning the strings are 50.0% similar.
  • In error-coding theory, a minimum Hamming distance of 4 means a code can detect up to 3 errors and correct up to 1 error per codeword.
  • For binary sequences, each differing position represents a single bit flip - the most common type of transmission error.

Next stepTo bring these strings closer together you would need to flip or change exactly 4 positions.

= Powered by OnlyCalculators