Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - In C language, if we know the two's complement of negative integer (1000,000,000,000,000,000,000), how to calculate its decimal? Important process
In C language, if we know the two's complement of negative integer (1000,000,000,000,000,000,000), how to calculate its decimal? Important process
1000 0000 0000 0000

Most significant bit stands for symbol, 1 stands for negative number.

Take 15 bit "000 0000 0000 0000" and add one to get 1000 0000 0000 0000, which corresponds to 32768 in decimal.

So 1000 0000 0000 0000 means -32768 in decimal.