مسافة هامنج

يحسب المواضع المختلفة في تسلسلين متساويي الطول بحسب البتات أو البايتات.

المدخلات: نصالنتيجة: نص

إدخال نصي

خيارات الأداة

أمثلة

Count three substitutions in the classic string example

Byte distance counts changed positions, not insertions or deletions.

المدخلات

karolin

kathrin

Expected answer

3
محدد
Unit
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
محدد
|
Unit
Bit
نوع الإدخال
Hex
Compare every bit in opposite byte values

Two opposite bytes differ in all 16 bit positions.

المدخلات

0000|ffff

Expected answer

16
محدد
|
Unit
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
محدد
|
Unit
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
محدد
|
Unit
Bit
نوع الإدخال
Raw string

المعاملات

المعاملالقيمة الافتراضيةالمدخلات والخيارات
محدد"\\n\\n"تدعم تسلسلات الإفلات مثل \n و\r و\t
Unitبايتبايت, بت
نوع الإدخالسلسلة خامسلسلة خام, سداسي عشري

أدوات ذات صلة

أدوات مساعدة

مرجع العملية

عرض الوثائق التقنية الأصلية (English)