I have been programming for over an year now. I still don't get why bitwise OR and AND operators are used. They seem to return random numbers.
What mathematical purpose do they have?
Be sure to click 'more' and select 'suggest as answer'!
If you're the thread creator, be sure to click 'more' then 'Verify as Answer'!
I have been programming for over an year now. I still don't get why bitwise OR and AND operators are used. They seem to return random numbers.
What mathematical purpose do they have?
Sometimes one operand word is data and the other is a mask. Let's say that three separate binary events in I/O land are required to draw a conclusion. By using the mask we can check the conditions in parallel, rather than sequentially. Saves time.
Easier to modify.
Sometimes one operand word is data and the other is a mask. Let's say that three separate binary events in I/O land are required to draw a conclusion. By using the mask we can check the conditions in parallel, rather than sequentially. Saves time.
Easier to modify.