'How to define negative binary number?

How to exactly determine wether the binary number is negative or positive ? For example number 100101 is positive 37 or, for example, in 2s-complement -27 ? What exact algorithm for determination?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source