Comment Comment by hairtuq Slightly simpler: c = x ^ y; return popcount(((c >> 1) | 0x8080808080808080) - c) & 0x8080808080808080); parent hairtuq 5 years ago