0
Bitwise
Could anyone tell me what is a bit mask and how to use it in setting, clearing, and testing a bit? -Thanks!
5 odpowiedzi
+ 2
coip
To set a bit, use bitwise OR operator.
<mask> | = <bit>
To clear a bit, use bitwise XOR operator.
<mask> ^= <bit>
To check a bit, use bitwise AND operator.
<mask> & <bit>
https://code.sololearn.com/cP1BMeK7G3LR/?ref=app
+ 1
Begin here 👇
https://www.sololearn.com/learn/4070/?ref=app
0
thanks Abol