Learn
Introduction to Bitwise Operators
See? This is NOT That Hard!

The bitwise NOT operator (~) just flips all of the bits in a single number. What this actually means to the computer is actually very complicated, so we’re not going to get into it. Just know that mathematically, this is equivalent to adding one to the number and then making it negative.

And with that, you’ve seen all of the basic bitwise operators! We’ll see what we can do with these in the next section.

Instructions

1.

Click Run and observe what the console prints out.

Folder Icon

Take this course for free

Already have an account?