インテル® Fortran コンパイラー 19.0 デベロッパー・ガイドおよびリファレンス

NOT

Elemental Intrinsic Function (Generic): Returns the logical complement of the argument.

result = NOT (i)

i

(Input) Must be of type integer.

Results

The result type and kind are the same as i. The result value is obtained by complementing i bit-by-bit according to the following truth table:

  I   NOT (I)
  1      0
  0      1

The model for the interpretation of an integer value as a sequence of bits is shown in Model for Bit Data.

Specific Name

Argument Type

Result Type

BNOT

INTEGER(1)

INTEGER(1)

INOT1

INTEGER(2)

INTEGER(2)

JNOT

INTEGER(4)

INTEGER(4)

KNOT

INTEGER(8)

INTEGER(8)

1Or HNOT.

Example

If I has a value equal to 10101010 (base 2), NOT (I) has the value 01010101 (base 2).

The following shows another example:

 INTEGER(2) i(2), j(2)
 i = (/4, 132/)          ! i(1) = 0000000000000100
                         ! i(2) = 0000000010000100
 j = NOT(i)              ! returns (-5,-133)
                         ! j(1) = 1111111111111011
                         ! j(2) = 1111111101111011

See Also