Find minimum two’s-complement value with three ones | Bitkernel