title: C bitwise negation creates negative output:
body: <p>I am trying REALLY hard to flip the bits in a C int variable. I am doing it like so:</p>
  
  <pre><code>input = 15;
  
  input = ~input;
  
  printf("%d", input);
  </code></pre>
  
  <p>BUT IT ALWAYS SHOWS UP as <code>-16</code>. It should be <code>0</code>! if <code>15</code> is written as <code>1111</code>, why is it returning <code>10000</code>?! This is maddening! Can somebody PLEASE help me!?</p>