Basic Bitwise Operators

0 minute read

NOT

Flips the bits; zeros become ones and ones become zeros. Works on a single number.

AND

If both bits in the comparing position are ones, the result is one; otherwise, it’s zero.

OR

If at least one of the bits in the comparing position is one, the result is one.

XOR

If just one of the bits in the comparing position is one, the result is one; otherwise, its zero.

Convert from HEX to decimal

Convert decimal to HEX