Sign-bit in JavaScript

The highest bit (32) in JavaScript is the sign bit but user does not have direct access to it. In other words:
var mask = 0x80000000;

((mask & mask) == mask) ==> is FALSE

But

((mask & mask) >> 1) == (mask >> 1) ==> is TRUE

JavaScript does use standard two's complement representation. Positive numbers are changed to negative numbers by (~Positive + 1). For example,
1 == ...0001 => ...1110 + 1 => ...1111 == -1 

Ichiro Fujinaga 1998.09.20