Distance de Hamming

Compte les positions différentes entre séquences de même longueur, par bits ou octets.

Entrée: TexteRésultat: Texte

Saisie de texte

Options

Exemples

Count three substitutions in the classic string example

Byte distance counts changed positions, not insertions or deletions.

Entrée

karolin

kathrin

Expected answer

3
Délimiteur
Unité
Byte
Type d'entrée
Raw string
Find a one-bit change in a two-byte packet

FF versus FE changes one bit in the second byte.

Entrée

00ff|00fe

Expected answer

1
Délimiteur
|
Unité
Bit
Type d'entrée
Hex
Compare every bit in opposite byte values

Two opposite bytes differ in all 16 bit positions.

Entrée

0000|ffff

Expected answer

16
Délimiteur
|
Unité
Bit
Type d'entrée
Hex
Count changed bytes in two IPv4-style headers

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

Entrée

45000014|45000028

Expected answer

1
Délimiteur
|
Unité
Byte
Type d'entrée
Hex
Separate byte changes from bit changes in ASCII

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

Entrée

A|a

Expected answer

1
Délimiteur
|
Unité
Bit
Type d'entrée
Raw string

Paramètres

ParamètreValeur par défautEntrée et choix
Délimiteur"\\n\\n"Les séquences d’échappement comme \n, \r et \t sont acceptées
UnitéOctetOctet, Bit
Type d'entréeChaîne bruteChaîne brute, Hex

Outils associés

Utilitaires

Référence de l’opération

Voir la documentation technique originale (English)