and (bitwise)

Description

As an extension to Standard Pascal, Irie Pascal supports using the and operator with two operands of integral type to perform bitwise AND. The result of the operation is of integral type, and has its bits set as follows: each bit is one (1) in the result if and only if the both of the bits in the corresponding position in the operands are one (1).

Example

   %11100 and %10111  results in %10100

Binary notation is used in the example above so that you can clearly see the individual bits in the operands and the result. The example above could have been written as

   28 and 23   results in  20

which is the same thing, but is probably not as clear.