IAND(I, J)

Purpose

Performs a bitwise AND on two integers.

Class

Elemental function

Argument type and attributes

I
An INTENT(IN) INTEGER
J
An INTENT(IN) INTEGER with the same kind type parameter as I.

Result type and attributes

Same as I.

Result value

The result has the value obtained by combining I and J bit-by-bit according to the following table:
ith bit  ith bit        ith bit
 of I     of J        of IAND(I,J)
-------------------------------
  1        1             1
  1        0             0
  0        1             0
  0        0             0

The bits are numbered from 0 to BIT_SIZE(I)-1, from right to left.

Examples

IAND (1, 3) has the value 1. See Integer bit model.

Specific Name Argument Type Result Type Pass As Arg?
IAND  1  any integer same as argument yes
AND  1  any integer same as argument yes
Note:
  •  1  IBM extension