title: Using tilde to get MAX value for int
body: <p>I tryed to get MAX value for int, using tilde.But output is not what I have expected.
  When I run this:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;limits.h&gt;
  int main(){
      int a=0;
      a=~a;
      printf("\nMax value: %d",-a);
      printf("\nMax value: %d",INT_MAX);
      return 0;
  }
  </code></pre>
  
  <p>I get output:</p>
  
  <p><strong>Max value: 1</strong></p>
  
  <p><strong>Max value: 2147483647</strong></p>
  
  <p>I thought,(for exemple) if i have <strong>0000</strong> in RAM (i know that first bit shows is number pozitiv or negativ).After ~ <strong>0000</strong> => <strong>1111</strong> and after -(<strong>1111</strong>) => <strong>0111</strong> ,that I would get MAX value. </p>