Sun Studio 12: Fortran Library Reference

3.3.1 Bit Manipulation ¤

None of these functions are part of the FORTRAN 77 Standard.

Table 3–6 Fortran 77 Bitwise Functions

Bitwise Operations  

No. of Args.  

Specific Name  

Argument Type  

Function Type  

Complement 

NOT

INTEGER

INTEGER

And 

22 

AND IAND

INTEGER

INTEGER

Inclusive or 

22 

OR IOR

INTEGER

INTEGER

Exclusive or 

22 

XOR IEOR

INTEGER

INTEGER

Shift See Note (14).

ISHFT

INTEGER

INTEGER

Left shift See Note (14).

LSHIFT

INTEGER

INTEGER

Right shift See Note (14).

RSHIFT

INTEGER

INTEGER

Logical right shift See Note (14).

LRSHFT

INTEGER

INTEGER

Circular shift 

ISHFTC

INTEGER

INTEGER

Bit extraction 

IBITS

INTEGER

INTEGER

Bit set 

IBSET

INTEGER

INTEGER

Bit test 

BTEST

INTEGER

LOGICAL

Bit clear 

IBCLR

INTEGER

INTEGER

The above functions are available as intrinsic or extrinsic functions. See also the discussion of the library bit manipulation routines in the Fortran Library Reference manual.