I am not familiar with bitwise operator. I have these code:
var value= -2145643504;
value = (value << 1) | (value >> 27);
//result: -16
Both C# and JavaScript result the same -16 But in JavaScript there is another operator >>> which C# has not. Code in JavaScript:
var value= -2145643504;
value = (value << 1) | (value >>> 27);
//result: 3680304 //wanted result in C#
Any solutions to get it in C#?
value = (value << 1) | (int)((uint)value >> 27);