title: C# NOT (~) bit wise operator returns negative values
body: <p>Why does C#'s bitwise <code>NOT</code> operator return <code>(the_number*-1)-1</code>?</p>
  
  <pre><code>byte a = 1;
  Console.WriteLine(~a); //equals -2
  byte b = 9;
  Console.WriteLine(~b); //equals -10
  // Shouldn't a=0 and b=6?
  </code></pre>
  
  <p>How would I do this in C#?</p>
  
  <pre><code>9 = 0b1001 -&gt; NOT
    = 0b0110 = 6
  </code></pre>