There is code on javascript
const a = 2654435769;
const b = 7562089;
console.log(a ^ b); // answer -1639703856
When you try to rewrite this code on C #, I ran into a problem.
long a = 2654435769;
long b = 7562089;
var result = a ^ b; // result = 2655263440;
Why do you get answers in different languages? And how to get the same answer on C # on JavaScript


intinstead of along(don't know C#). JS uses 32bit signed integer bitwise operations.