Anonymous user
Bitwise operations: Difference between revisions
→{{header|Lua}}
Line 962:
assert(bit.bor(1,2,4,8,16,32,64,128) == 255)
32-bit integers as the default number type. It provides binary operations
& (and), | (or), ^^ (xor), << (logical shift left), >> (logical shift right)
and a unary operation ~ (negate).
</lang>
|