The whole ONES... HASZERO shenanigans is somewhat explained here: https://graphics.stanford.edu/~seander/bithacks.html#ZeroInW... as well as the entry after it.
Edit: And most likely in the excellent book "Hacker's Delight" as well.
Edit: And most likely in the excellent book "Hacker's Delight" as well.
No comments yet.