Bitwise operators perform logical operations on each bit of an expression. Don’t confuse these operators with processor instructions having the same names--these operators are used on expressions at assembly time or link time, not at run time.

Operator Syntax Description
NOT .NOT. ~ NOT expression
.NOT. expression
~ expression
Bit-wise complement. See NOT and ~ operators.
AND .AND. & expression 1 AND expression 2
expression 1 .AND. expression 2
expression 1 & expression 2
Bit-wise and. See AND and & operators.
OR .OR. | expression 1 OR expression 2
expression 1 .OR. expression 2
expression 1 | expression 2
Bit-wise or. See OR and | operators.
XOR .XOR. ^ expression 1 XOR expression 2
expression 1 .XOR. expression 2
expression 1 ^ expression 2
Bit-wise exclusive or. See XOR and ^ operators.