- Documentation
- Bitwise operations
Category
Bitwise operations
All Lua functions and events in the Bitwise operations category, on the server and the client.
Shared functions 12
bitBitwise AND of two or more numbers. Numbers are treated as unsigned 32-bit.And bitArithmetic right shift: keeps the highest bit (the sign of a 32-bit number).Ar Shift bitExtractsExtract countbits starting at positionstart(0 is the lowest bit). The position and length must fit in 32 bits.bitRotates bits left: bits leaving on the left come back on the right.LRotate bitShifts bits left by the given count. Bits pushed beyond 32 are lost.LShift bitBitwise NOT of a 32-bit number.Not bitBitwise OR of two or more numbers.Or bitWritesReplace replaceintocountbits starting atstart, leaving the other bits unchanged.bitRotates bits right: bits leaving on the right come back on the left.RRotate bitLogical right shift (unsigned): zeros come in from the left.RShift bitChecks whether the bitwise AND of all arguments is non-zero, i.e. whether they share a set bit.Test bitBitwise XOR of two or more numbers. Useful for toggling flags.Xor