Bit-wise 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. & | expression1 AND expression2
expression1 .AND. expression2 expression1 & expression2 |
Bit-wise and. See AND and & operators. |
OR .OR. | | expression1 OR expression2
expression1 .OR. expression2 expression1 | expression2 |
Bit-wise or. See OR and | operators. |
XOR .XOR. ^ | expression1 XOR expression2
expression1 .XOR. expression2 expression1 ^ expression2 |
Bit-wise exclusive or. See XOR and ^ operators. |