ハミング距離

同じ長さの列で異なる位置を、ビットまたはバイト単位で数えます。

入力: テキスト結果: テキスト

テキスト入力

ツールの設定

使用例

Count three substitutions in the classic string example

Byte distance counts changed positions, not insertions or deletions.

入力

karolin

kathrin

Expected answer

3
区切り文字
単位
Byte
入力タイプ
Raw string
Find a one-bit change in a two-byte packet

FF versus FE changes one bit in the second byte.

入力

00ff|00fe

Expected answer

1
区切り文字
|
単位
Bit
入力タイプ
Hex
Compare every bit in opposite byte values

Two opposite bytes differ in all 16 bit positions.

入力

0000|ffff

Expected answer

16
区切り文字
|
単位
Bit
入力タイプ
Hex
Count changed bytes in two IPv4-style headers

Only the final byte differs; this is a short synthetic header fragment.

入力

45000014|45000028

Expected answer

1
区切り文字
|
単位
Byte
入力タイプ
Hex
Separate byte changes from bit changes in ASCII

ASCII A and a differ by the single 0x20 bit.

入力

A|a

Expected answer

1
区切り文字
|
単位
Bit
入力タイプ
Raw string

パラメーター

パラメーター既定値入力と選択肢
区切り文字"\\n\\n"\n、\r、\t などのエスケープシーケンスに対応
単位バイトバイト, ビット
入力タイプ生の文字列生の文字列, 16進数

関連ツール

ユーティリティ

操作の参考資料

元の技術文書を見る (English)