title: What is the bitwise negation for an integer?
body: <p>I have homework assignment with a piece to compute the bitwise negation of integer value. It say 512 go into -513.</p>
  
  <p>I have a solution that does <code>x = 512 y = 512*(-1)+(-1)</code>. </p>
  
  <p>Is that correct way?</p>