| parrotcode: bitwise operations library | |
| Contents | Language Implementations | Lua |

lib/bitlib.pir - bitwise operations library

bitlib is a library for Lua 5.1 that provides bitwise operations.
See original on http://luaforge.net/projects/bitlib/
The library provides the constant bit.bits that gives the number of bits that can be used in bitwise operations,
and the following functions:

bit.cast (a)a to the internally-used integer typebit.bnot (a)abit.band (a, ...)bit.bor (a, ...)bit.bxor (a, ...)bit.lshift (a, b)a shifted left b placesbit.rshift (a, b)a shifted right b placesbit.arshift (a, b)a shifted arithmetically right b places
Francois Perrad
|
|
|