Bit Manipulations Functions Starting with version 3.1 of gawk, the following bit manipulation functions are available. They work by converting double-precision floatingpoint values to unsignedlong integers, doing the operation,and thenconverting the result back to floating point. The functions are:
and(v1, v2)Return the bitwise AND of the values provided by v1and v2.
compl(val)Return the bitwise complement of val.
lshift(val,count)Return the value of val, shifted left by countbits.
or(v1, v2)Return the bitwise OR of the values provided by v1and v2.
rshift(val,count)Return the value of val, shifted right by countbits.
xor(v1, v2)Return the bitwise XOR of the values provided by v1and v2.