I've come up with several manual ways of doing this, but i keep wondering if there is something built-in .NET that does this.
Basically, i want to reverse the bit order in a byte, so that the least significant bit becomes the most significant bit.
For example: 1001 1101 = 9D would become 1011 1001 = B9
On of the ways to do this is to use bitwise operations if following this pseudo code:
for (i = 0; i<8; i++)
{
Y>>1
x= byte & 1
byte >>1
y = x|y;
}
I wonder if there is a function somewhere that will allow me to do all this in one single line. Also, do you know the term for such an operation, i'm sure there is one, but i can't remember it at the moment.
Thanks