Bitwise Not operator in javascript
Anonymous
var num1 = 25 // binary 11001
var num2 = ~num1 // binary 111111111111111100110
alert(num2) = -26;
In the above scenario I am applying bitwise not operator to num1, but after alerting the value I am getting -26 which is totally different from the binary value