4.7.1.20. Logical Operators

Definitions

Table 4.11 Operators

Operator

Definition

||

Logical OR

&&

Logical AND

Example

Table 4.12 Example for Logical Operators

The Value of A||B

A is true

A is false

B is true

1

1

B is false

1

0

Table 4.13 Example for Logical Operators

The Value of A&&B

A is true

A is false

B is true

1

0

B is false

0

0

  • If A or B is true, the value is not expressed as 0.

  • If A or B is false, the value is expressed as 0.