Let’s call it “<<<“
int32variable <<< numberOfBits
equals
(int32variable << numberOfBits) | (int32variable >> (32 - numberOfBits))
(Assuming << and >> discards overflown bits)
There is such an operator?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
That would be a called a bit rotate and C# does not have such an operator.
Here’s an interesting post:
Is there a way to perform a circular bit shift in C#?
Note that your int32integer should be of type
uint(unsigned int).I believe bit rotate is an instructions in the Intel instruction set but as far as I know the CLR does not have bit rotate instructions.