title: One' s Complement of a number
body: <p>suppose i have a variable</p>
  
  <p>int a=512</p>
  
  <p>Now when i apply ~a which means one's complement in c.How i am getting -513 as the output.</p>
  
  <p>int is minimum 16 bits in size and binary equivalent of 512 is</p>
  
  <p>0000 0010 0000 0000 And now when you do its one's complement it becomes</p>
  
  <p>1111 1101 1111 1111. Now could someone tell me why the output is -513.</p>
  
  <p>Can I now Hope that guys in this forum understood my question.</p>