Menu

Bit Manipulation

Bitwise operations are a very weak spot for me. ANDing, ORing, and XORing (huh?) bits hasn't really been anything I can say I've needed to do, except for one company that used bitfields to save space. And << and >> have had little practical use for me.

By the end of the day, these will all be second nature. I'll be shifting and ^= with no problem.

To start myself off right, I made a method to show the bit representation of any word size: