bas7qck.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
AND Operator
                                                 Contents  Index  Back
──────────────────────────────────────────────────────────────────────────────
result = numeric-expression1 AND numeric-expression2
 
    ■ The AND logical-conjunction operator compares corresponding bits in two
      numeric expressions and sets the corresponding bit in the result to 1
      if both bits are 1. The AND operator uses this "truth table":
 
      ═══════════════════════   ════════════════════════   ═════════════
      Bit in first expression   Bit in second expression   Bit in result
      ═══════════════════════   ════════════════════════   ═════════════
                 1                         1                     1
                 1                         0                     0
                 0                         1                     0
                 0                         0                     0
      ═══════════════════════   ════════════════════════   ═════════════