title: Bitshift operator on unsigned short in NodeJS
body: <p>I am trying to performe a <code>Bitwise NOT</code> on an unsigned int in nodeJS/javascript. In my understanding every bitwise operator is done on a signed 32bit integer which makes it confusing for me when I want to do it on an unsigned 16bit integer (short). This is what I want to do:</p>
  
  <pre><code>c#
  ushort value = 41003;
  value = (ushort)~value;
  //Value is now 24532 which is correct
  
  nodeJS
  var value = 41003;
  value = ~value;
  //value is now -41004 wich is NOT correct
  </code></pre>
  
  <p>How do I convert the last value to an unsigned 16bit int in nodeJS/javascript?</p>