ABSTRACT

Fortran contains a number of intrinsics to manipulate a single bit or a group of bits. These include bit testing, bit setting, shifting of bits, logical operations such as 'and' and 'or' and transferring bits from one location to another. The function tests the bit of the first argument whose position is specified by the second argument pos. Inclusive or (ior) may be used to switch on a particular bit of an integer, keeping the other bits untouched under the influence of a mask. Four library functions have been provided for bit sequence comparison: bge(greater than or equal), bgt(greater than), ble(less than or equal) and blt(less than). All these functions take two integers or boz constants as arguments. If the size of the bit sequence of the arguments is not equal, the smaller one is made equal to the other one by adding zeros to the left.