Anyone knows why javascript Number.toString function does not represents negative numbers correctly?
//If you try (-3).toString(2); //shows \"-11\" // but if
var binary = (-3 >>> 0).toString(2); // coerced to uint32 console.log(binary); console.log(parseInt(binary, 2) >> 0); // to int32
on jsfiddle
output is
11111111111111111111111111111101 -3