In mathematics, negative numbers in any base are represented in the usual way, by prefixing them with a "−" sign. However, on a computer, there are various ways of representing a number's sign. Now we discuss the following methods for representing signed numbers in a computer.
Sign-and-magnitude
The first approach for representing a number's sign