bit manipulation subtract and lowest set bit