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?
Bitwise Operators?
This post was published more than a few years ago (on 2004-08-14) and may contain inaccurate technical information, outmoded thoughts, or cringe takes. Proceed at your own risk.