I don’t use C++ or bitwise operations at my current job but I’m thinking of applying to companies where it is a requirement to be fluent with them (on their tests anyway).
So my question is: Can anyone suggest a project which will require gaining a fluency in bitwise operations to complete?
On a side note, is there a canonical book on optimization techniques using bitwise operations since that seems to be an important use of them?
1
There’s no mystery to bitwise operations. Perhaps you’re thinking of some of the crazy bit twiddling tricks that people have come up with over the years? For example, Stanford has a page with a long list of such tricks. Your best bet there is to just start with a list such as the one I linked and go through a number of them. Step through them in a debugger if it helps. Once you understand a handful of them, you’ll get more comfortable thinking in those terms.
1
You’d hardly need a book to figure this out, only to know how numbers are represented in binary. Buy yourself a pad and pencil and draw some Truth Tables
As for a project, how about writing an algorithm that takes an image bitmap and draws/blits it transparently onto another image using masks. Allow the user to select the transparent colour.
2