---
# System prepended metadata

title: How Computers Store Negative Numbers (Using -11 as a Case Study).

---

___
# How Computers Store Negative Numbers (Using -11 as a Case Study).
>[name=dabaq0x]
>[time=Sat, Jun 12, 2025 6:36 AM]

## Brief Introduction:
Computers are electronic devices that have become quite indispensable over the years and have continued to evolve as our knowledge and technology improve as a species. Computers basically compute data in a language called binary which is basically a sequence of ones and zeros (1&0). Every input be it, information or instruction given to the computer (including alphabets, numbers and symbols) has to be converted into binary before the computer can process it and subsequently give and output. 
## Sign & Magnitude:
This is a way both positive and negative integers can be represented in binary. The most significant bit represents the sign while the rest of the figures represent the magnitude also known as the absolute value. The most significant bit representing positive sign is 0 while 1 represents the negative sign.
For example;
+11 in 8 bits is 00001011 where the first 0 represents the + while the remaining digits 0001011 represent the magnitude.
-11 in 8 bits is 11110100 where the first 1 represents the - while the remaining digits 1110100 represent the magnitude.
## One’s Complement:
This is a way negative integers are represented in binary by flipping the bits of the positive counterpart. This is basically done by replacing the ones with zeros and the zeros with ones.
For example; 
+11 in 8 bits is 00001011, so to represent -11 in ones complement, it becomes 11110100.
## Two’s Complement:
This is very similar to one’s compliment, only that in this case, 1 is added to the result of the one’s complement to make it two’s complement. The whole process to convert from binary to two’s complement is basically inverting the bits of the positive integers binary and adding a 1 to it.
For example;
Converting -11 to two’s complement:
First convert 11 to binary:
2÷11=5R1
2÷5=2R1
2÷2=1R0
2÷0=0R1
Binary = 00001011
Invert the bits by flipping 1s to 0s and vice versa:
11110100
Then add 1 to the result:
11110100 + 1 = 11110101

Let’s try something a little different;
Convert 11110101 to it’s corresponding hexadecimal value
Well start by separating the bits into two nibbles
[1111]  [0101]
[1x2³ + 1x2² + 1x2¹ + 1x2⁰]    [0x2³ + 1x2² + 0x2¹ + 1x2⁰]
[8+4+2+1]    [0+4+0+1]
[16]    [5]
16 on the hexadecimal index is F
 Therefore; 11110101 in hexadecimal is 0xF5.
## Conclusion:
The formats for the representation of negative integers are quite similar and interconnected and were all created in a bid to make computing faster and communication between humans and computers easier.
|Format|Negative Representation|
|:----:|:----------------------|
|Sign and Magnitude|Sign bit & magnitude|
|One's Complement|Invert all bits|
|Two's Complement|Invert all bits +1|