Operations with a mask

set bit 2 to 1 → OR 00000100

You can also choose a level by clicking a star.

About the course

Description
Which bitwise operation and mask sets, clears or flips a bit (bits are numbered from the right, starting at 0)
More information
Bitwise operations work with each bit of a number separately.
Sample question
set bit 2 to 1 → OR 00000100
Author
Jiří Preisler
Version
1.0