title: -128 and 128 in 2's complement
body: <p>In 2's complement, 0-127 is represented as 00000000 to 01111111. In case of negative numbers, we invert all bits in the unsigned representation and add 1 to get the 2's complement.</p>
  
  <p>(Reference: <a href="http://en.wikipedia.org/wiki/Signed_number_representations#Two.27s_complement">http://en.wikipedia.org/wiki/Signed_number_representations#Two.27s_complement</a>)</p>
  
  <p>so -1 in 2's complement will  be:</p>
  
  <pre>
  
   unsigned 1 =      00000001
  
   invert all bits = 11111110
  
   add 1 =           11111111
  </pre>
  
  <p>But for -128, if we follow the same steps:</p>
  
  <pre>
  
   unsigned 128 =    10000000
  
   invert all bits=  01111111
  
   add 1=            10000000
  
  </pre>
  
  <p>so -128 and 128 have the same representation in 2's complement notation? Why isn't the range of 2's complement for 8 bits given as -127 to 128? In short, why is -128 preferred over representing unsigned 128 using the same number of bits?           </p>