Bitwise | Sololearn: Learn to code for FREE!

0

Bitwise

Could anyone tell me what is a bit mask and how to use it in setting, clearing, and testing a bit? -Thanks!

2/10/2021 4:15:09 AM

feof

5 Answers

New Answer

+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

+1

I have already known about bitwise. What I am asking is about bitmask Abol Ipang but thanks.

0

thanks Abol