So i am confused on why i am getting this error.
Operator '<<' cannot be applied to operands of type 'int' and 'uint'
Everything is a uint type but it won't accept it.
This is the algorithm:
public void Test(uint[] arr, uint b)
{
for (uint x = 0; x < arr.Length; x++)
{
uint reverse = 0;
for (uint i = 0; i < bits; i++)
{
reverse |= (((x & (1 << i)) >> i) & 1) << (b - 1 - i);
}
arr[x] = reverse;
}
}
Why is this not allowed, what am i doing wrong?