汉明距離

計算两个等長序列中不同位置的數量,可選擇按位或按位元組比较。

輸入: 文本結果: 文本

文本輸入

工具選項

範例

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 等跳脫序列
單位位元組位元組, 位
輸入類型Raw 字串Raw 字串, 十六進位

相关工具

實用工具

操作参考

查看原始技术文檔 (English)