What is the easiest way to access the individual bits in the 4bit value this function returns?
Example: I want to know if the 2nd bit is a 0. How can this be done without a lot of if statements?
What is the easiest way to access the individual bits in the 4bit value this function returns?
Example: I want to know if the 2nd bit is a 0. How can this be done without a lot of if statements?
Bitwise AND.
[font="Courier New"]Screen->ComboS[n] & 0010b[/font]
It's been a while, but I think that's the right syntax. The result of that will be 0 if the bit is 0 and 10b if it's not.
Bitwise and.... *smacks forehead*. Thank you very much.