not

Date:

02-08-2023

NAME

NOT, INOT, JNOT, KNOT - Perform a logical complement

SYNOPSIS

NOT ([I=]i)
INOT ([I=]i)
JNOT ([I=]i)
KNOT ([I=]i)

STANDARDS

Fortran

Fortran extensions: INOT, JNOT, KNOT

DESCRIPTION

The NOT, INOT, JNOT, and KNOT intrinsic functions perform a logical complement. They accept the following argument:

i

Must be of type integer. For INOT, must be of type integer (KIND=2). For JNOT, must be of type integer (KIND=4). For KNOT, must be of type integer (KIND=8).

These are elemental intrinsic functions. The names of these intrinsics cannot be passed as arguments.

RETURN VALUES

The result type and type parameter are the same as i.

The result has the value obtained by complementing i bit-by-bit according to the following truth table:

--------------------
i       NOT(i)
--------------------
1       0
0       1
--------------------

The bit model defines the interpretation of an integer value as a sequence of bits. For more information on the bit model, see the models(3i) man page.

EXAMPLES

If I is represented by the string of bits 01010101, NOT(I) has the binary value 10101010.

SEE ALSO

ftn(1)

models(3i)