Converting bitstring to 32-bit signed integer yields wrong result
问题 I am trying to solve a challenge on this site. I have everything correct except I can't properly convert a bitstring to its 32-bit signed integer representation. For example I have this bitstring: block = '10101010001000101110101000101110' My own way of converting this bitstring to 32-bit signed integer: I partially remember from school that first bit is the sign bit. If it is 1 we have negative number and vice versa. when I do this, it gives me the number in base 10. It just converts it to