This is because the representation of signed integer to negative number is 2- complement, that is, the bit is inverted and the last bit is added with 1.
So-1 is expressed as 0000000000 1, and then the last digit is added with1,which is.
1 1 1 1 1 1 1 1 1 1 1 1 1 1 10 + 1 = 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
The latter is converted into an unsigned integer, that is, 2 32-1.