Kademlia is a peer-to-peer Distributed Hash Table (DHT) based on the XOR metric.
id1
id2
id1 XOR id2
distance(1, 4) = d(0b001, 0b100) = 0b001 XOR 0b100 = 0b101 = 5