next up previous contents index
Next: Error Reporting Up: Main Functions 2 Previous: Arrays   Contents   Index

Bitwise Logic

All numerical data are stored internally in double-precision floating point representation. These functions convert the internal values to unsigned integer data, apply the operation, and return the floating-point representation of the result. This should be invisible to the user, but assumes well-behaved numerics in the host computer.

(unsigned int) ShiftBits(bits, val)
This function will shift the binary representation of the unsigned integer bits by the integer val. If val is positive, the bits are shifted to the right, or if negative the bits are shifted to the left. The function returns the shifted value.

(unsigned int) AndBits(bits1, bits2)
This function returns the bitwise AND of the two arguments, which are taken as unsigned integers.

(unsigned int) OrBits(bits1, bits2)
This function returns the bitwise OR of the two arguments, which are taken as unsigned integers.

(unsigned int) XorBits(bits1, bits2)
This function returns the bitwise exclusive-OR of the two arguments, which are taken as unsigned integers.

(unsigned int) NotBits(bits)
This function returns the bitwise NOT of the argument, which is taken as an unsigned integer.


next up previous contents index
Next: Error Reporting Up: Main Functions 2 Previous: Arrays   Contents   Index
Stephen R. Whiteley 2022-05-28