I have a function written in JavaScript that deals with unsigned longs (guess you could call them since JS has no var types). Anyhow I'm porting the project to Java and the same bitshifting operations are not working as expected. Here is an example.
JavaScript:
1509786213^3738585502=-2027172869
Java
1509786213^3738585502=2267794427
I can't get any bitshift operation to change the number so the right number. Any ideas? Thanks ahead of time.

