IMP operator

Purpose

The IMP operator works as both a logical and a bitwise arithmetic operator.

Syntax

p IMP q

Remarks

IMP as a logical operator

The IMP operator returns FALSE (zero) if and only if its first operand is TRUE (non-zero), and its second operand is FALSE.  In all other cases, it returns TRUE.

Truth table

x

y

x IMP y

T

T

T

T

F

F

F

T

T

F

F

T

Using IMP as a bitwise arithmetic operator

IMP is seldom used as a bitwise arithmetic operator, but here is a sample:

See also

Arithmetic OperatorsAND, EQV, ISFALSEISTRUENOT, OR, XOR