Other

Hamming Distance Calculator

Count the differing bits between two numbers.

Parameters Live Compute
Calculated Output
Hamming distance 8
XOR (binary) 11111111
Formula: Count the 1 bits in A XOR B
Step-by-Step Breakdown
1. Values used:
2. Value A = 156
3. Value B = 99
4.
5. Hamming distance = 8
6. XOR (binary) = 11111111
Did this calculator solve your problem today?
Report issue to loopingon.com
Sponsored

The Hamming distance is the number of bit positions where two values differ.

The math behind it

XOR the two numbers and count the 1 bits in the result.

Worked Example

156 (10011100) vs 99 (01100011) differ in 8 bits.

Frequently Asked Questions

Where is it used?

Error detection and correction, and comparing binary codes.

Advertisement