The IAND function performs a bit-wise logical AND operation on two integer arguments.
Syntax
IAND (i, j)
i is an INTENT(IN) scalar or array of type INTEGER.
j is an INTENT(IN) INTEGER of the same kind as i.
If both i and j are arrays, they must be conformable.
The result is of type INTEGER. Its value is the result of performing a bit-wise logical AND operation on i and j.
Example
i=53 ! i=00110101 binary (lowest order byte) j=45 ! j=00101101 binary (lowest order byte) k=iand(i,j) ! k=00100101 binary (lowest order byte) ! k=37 decimal