And Operator

Language Items List

Definition:

Performs a bit-wise comparison on two expressions.

Syntax:

result = expr1 And expr2


Syntax Description


expr1, expr2 Any numeric expression

Details:

The And operator does a bit by bit comparison of identically positioned bits in two numeric expressions and sets the corresponding result bit as follows:


expr1 expr2 result


0 0 0

  1. 0 0

0 1 0

  1. 1 1

See Also:

Operator Precedence

Example:

Print
The lower eight bits of X are: ; X And &hFF