How do you rotate bits in C++?
I think i know a bitshift ( >> ) right? But that clips off the edges dont it?
Any help would be appreciated! Thanks!
This is a discussion on Bit rotation... within the C++ Programming forums, part of the General Programming Boards category; How do you rotate bits in C++? I think i know a bitshift ( >> ) right? But that clips ...
How do you rotate bits in C++?
I think i know a bitshift ( >> ) right? But that clips off the edges dont it?
Any help would be appreciated! Thanks!
"Anyone can aspire to greatness if they try hard enough."
- Me
Catch the bits which would fall off the end, then add them back in yourself.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
I support http://www.ukip.org/ as the first necessary step to a free Europe.
They have to be rotated every 5,000 miles or they will wear prematurely. Also be sure to keep your bits properly inflated for better fuel efficiency.
Huh?