oh great /prog/!
share your sagely wisdom with me and please explain what bitwise operators are for and how they work
Name:
Anonymous2008-03-28 1:53
They iterate through a set of bits and apply a boolean operation to each pair. For instance, if you have
a | b
where both a and b are bytes with the values 01010011 and 11001100, respectively, it takes the first bit of a and the first bit of b and applies the OR operation, then the second bits, then the third, and so on.
The result is another byte, the value of which is 11011111.
This doesn't just work with bytes, but with most datatypes, depending on the language.