Since binary numbers can have only two symbols either 0 or 1 for each position or bit, so it is not possible to add minus or plus symbols in front of a binary number.

We represent negative binary numbers using a minus symbol in front of them. In computer number representation, these numbers can be distinguishable with the help of an extra bit or flag called sign bit or sign flag in the Binary number representation system for signed numbers. This extra bit is called sign bit or sign flag which has a value of sign bit is 0 for positive numbers and 1 for negative binary numbers.

The representation of magnitude of positive numbers is easy and does not need any changes.

The representation of magnitude of negative numbers is changed accordingly to represent it.

**Ways to represent magnitudes :**

These are: Sign-Magnitude method, 1’s Complement method, and 2’s complement method. These are explained as follows using examples.

**Signed Magnitude Method :**

We only add an extra sign bit to recognize negative and positive numbers. Sign bit has 1 for negative number and 0 for positive number.**Range of Numbers :**

For n bits register, MSB will be sign bit and (n-1) bits will be magnitude. Then,

Negative lowest number that can be stored is -(2^{(k-1)}-1)and positive largest number that can be stored is (2^{(k-1)}-1) .But, this (sign) representation has an ambiguous representation of number 0. It means 0 has two different representation one is -0 (e.g., 1 00000 in six bit register) and second is +0 (e.g., 0 00000 in six bit register).

**1’s Complement Method :**

Please note that MSB is always Sign bit, if it 0, then there are no changes. MSB is always 1 in case of negative numbers. We only take 1’s complement of negative numbers to represent in the computer.**Range of Numbers :**

For n bits register, negative lowest number that can be stored is -(2^{(n-1)}-1) and positive largest number that can be stored is (2^{(n-1)}-1) .

But, this (sign) representation has an ambiguous representation of number 0. It means 0 has two different representations one is -0 (e.g., 1 1111 in five bit register) and second is +0 (e.g., 0 0000 in five bit register).

**2’s Complement Method :**

Please note that MSB is always Sign bit, if it 0, then there are no changes. MSB is always 1 in case of negative numbers. We only take 2’s complement of negative numbers to represent in the computer.Since, there is only one representation of +0 and -0, so this 2’s complement representation is better than sign representation and 1’s complement representation.

**Range of Numbers :**

For n bits register, negative lowest number that can be stored is -(2^{(n-1)}) and positive largest number that can be stored is (2^{(n-1)}-1) .

Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.

## Recommended Posts:

- How the negative numbers are stored in memory?
- Floating Point Representation - Basics
- Introduction of Floating Point Representation
- Representation of Boolean Functions
- How to create a COVID19 Data Representation GUI?
- Complexity of different operations in Binary tree, Binary Search Tree and AVL tree
- Construction of the machines to produce residue modulo ‘2’ of binary numbers
- Basics of Signed Binary numbers of ranges of different Datatypes
- Find the numbers present at Kth level of a Fibonacci Binary Tree
- Arithmetic Operations of Binary Numbers
- Program for Binary To Decimal Conversion
- Program for Decimal to Binary Conversion
- Code Converters - Binary to/from Gray Code
- Binary Decoder in Digital Logic
- Relationship between number of nodes and height of binary tree
- Overflow in Arithmetic Addition in Binary Number System
- Binary Representations in Digital Logic
- Construct DFA which interpreted as binary number is divisible by 2, 3, 4
- 4-bit binary Adder-Subtractor
- Conversion of Binary number to Base 4 system

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.