I have a quick question about masking bits. If I want to turn two 8 bit streams on, do I
use the AND
logic against the two:
10101010
AND 01101001
________
00101000
or do I actually change one of the bits in the stream to turn the bits on? I guess my question is when I'm turning on (using AND
) or turning off (using OR
) do I actually change any of the bits, or just comparing the two using the AND/OR
logic?