bitop: Bitwise operations

This module provides basic bitwise operations. All operations expect integer arguments, and all operations are performed assuming signed 2's complement binary representations of integers. In the 2's complement representation negative integers have an infinite number of leading 1 bits, i.e. -1 is "...11111111" in binary, -2 is "...1111110", and so on.

See also: std::Int, string::IntToStr

Functions

And(x as Int, y as Int) as Int
Return the bitwise and of two integers.
Or(x as Int, y as Int) as Int
Return the bitwise or of two integers.
Xor(x as Int, y as Int) as Int
Return the bitwise xor of two integers.
Neg(x as Int) as Int
Return the bitwise complement of an integer.
Shl(x as Int, y as Int) as Int
Return the integer x shifted left bitwise y positions.
Shr(x as Int, y as Int) as Int
Return the integer x shifted right bitwise y positions.