Is there an efficient way to remove the first bit of a number in C++ / Python, assuming you don't know how large the number is or its datatype?
I know in Python I can do it by getting the bin(n), truncating the string by 1, and then recasting it to an int, but I am curious if there is a more "mathematical" way to do this.
e.g. say the number is 6, which is 110 in binary. Chop the first bit and it becomes 10, or 2.