レーベンシュタイン距離
A more general way of measuring the number of bit errors is the Levenshtein distance.