I noticed an odd behavior with Javascript: when I execute 1967779 << 11
I get a negative result: -264955904
However, if I run that same line in a Python interpreter, I get the correct answer: 4030011392
Note that both Firefox's and Chrome's Javascript consoles returned the same negative number, so it must be an issue with Javascript itself and not the engine.
Why am I getting different values between Python and Javascript? What can I do to work around this? How does the Javascript left shift operator work?