The Optical

Learn about movie magic and VFX on my podcast, The Optical.

Subscribe today, free on iTunes.

Bitwise Operators?

So, I’m working through Programming in Objective-C, and I come to the second half of Chapter 4: Data Types and Expressions, and I am totally stumped with the section on bitwise operators. I mean, I guess I understand what they’re doing, but the question I have at the moment is what use are they? I mean, if I’m working with char and int and float and all the other data types that I expect to be working with, why would I want to use these operators that work at the bit level… and if I do AND, OR or XOR, it’s not going to give me a useful result, at least as a human-readable value. I’m guessing maybe they’re valuable to folks who are doing deeper system level stuff… but I’m not quite sure I get it just yet. Any suggestions about resources where I could go to understand more about these operators, and why they’re useful?

Update: Just found this web article that does a really good job explaining just why bitwise operators are useful. To me, the most useful application they brought up was modifying Hex color values, but there’s a lot more there as well.

You should check out my podcast about movie magic and VFX: The Optical.