How to rotate the first n bits in C?

Viewed 41

I'm trying to use masks and rotate the first n amount of bits in a byte by 1. For example:

If I have "10101000" and want to rotate the first "3" bits to the left, I would then have "01101000."

How can I rotate these bits?

0 Answers
Related