The NOT function returns the bit-wise logical complement of an INTEGER argument.
Syntax
NOT (i)
i is an INTENT(IN) scalar or array of type INTEGER.
The result is an INTEGER of the same kind as i. Its value is the value of i with each of its bits complemented (zeros changed to ones and ones changed to zeros).
Example
integer :: ia(3)=(/-1,0,1/) write(*,*) not(-1) ! writes 0 write(*,*) not(0) ! writes -1 write(*,*) not(ia) ! writes 0 -1 -2