Imp Operator

Language Items List

Definition:

Used to perform a bit-wise implication on two expressions.

Syntax:

result = expr1 Imp expr2

Details:

The implication operator performs a bit by bit comparison of two numeric expressions. It then applies rules of logic to determine whether the bit in expr1 "implies" the value of the bit in expr2 and sets the result bit accordingly. The following table illustrates how the result bit is determined.


expr1 expr2 result


0 0 1

0 1 1

  1. 0 0

  1. 1 1


Note: The only time this operator sets the result bit to off is when the first expression is on (1) and the second expression is off (0):

See Also:

Arithmetic Operators
Comparison Operators
Operator Precedence