title: Bitwise operator gave me a negative number
body: <p>I just learned. How Bitwise operators work but when i try to use it in the c code i doesnt work.</p>
  <pre><code>#include &lt;stdio.h&gt;
  
  int main()
  {
      int a = 7;
  
      printf(&quot;%d\n&quot;, (int)~a);
  
      return 0;
  }
  </code></pre>
  <p>The expected output is 8 but it comes -8.</p>
  <p><code>~0111</code></p>
  <p>=</p>
  <p><code>1000</code></p>