Logical Operators

The values returned by the logical operators are defined in Results of Logical Operators.

Table 10. Results of Logical Operators

Operand

A

Operand

B

NOT

A

A

AND

B

A

CAND

B

A

OR

B

A

COR

B

A

IMP

B

A

EQV

B

TRUE

TRUE

FALSE

FALSE

TRUE

FALSE

TRUE

FALSE

FALSE

FALSE

TRUE

TRUE

TRUE

FALSE

FALSE

FALSE

TRUE

FALSE

FALSE

FALSE

TRUE

TRUE

TRUE

FALSE

TRUE

TRUE

TRUE

FALSE

TRUE

FALSE

TRUE

TRUE

TRUE

FALSE

FALSE

TRUE


The Boolean operations defined in this table are performed on all 48 bits of the Boolean primaries on a bit-by-bit basis. For example, the constant TRUE (4"000000000001") does not have the same bit pattern as the Boolean expression NOT FALSE, because NOT complements all 48 bits of the constant FALSE (4"000000000000"), generating 4"FFFFFFFFFFFF". Even so, the constant TRUE and the Boolean expression NOT FALSE have the same Boolean value of TRUE because the Boolean value of a Boolean primary is based upon the value of the low-order bit (bit 0) of the Boolean primary (0 is FALSE; 1 is TRUE).

Note: Exception: When NOT operates on an arithmetic relation, the low-order bit (bit zero) is complemented; however, the other 47 bits are not necessarily complemented. For example, if X = Y evaluates to TRUE, then NOT(X = Y) evaluates to FALSE, not necessarily to NOT TRUE as would be expected.