Bitwise operations: Difference between revisions
Content added Content deleted
Line 961: | Line 961: | ||
assert(bit.bxor(1,2) == 3) |
assert(bit.bxor(1,2) == 3) |
||
assert(bit.bor(1,2,4,8,16,32,64,128) == 255) |
assert(bit.bor(1,2,4,8,16,32,64,128) == 255) |
||
⚫ | |||
== The RiscLua dialect == for [http://lua.riscos.org.uk/ RISC OS] has |
== The RiscLua dialect == for [http://lua.riscos.org.uk/ '''RISC OS'''] has |
||
32-bit integers as the default number type. It provides binary operations |
32-bit integers as the default number type. It provides binary operations |
||
& (and), | (or), ^^ (xor), << (logical shift left), >> (logical shift right) |
& (and), | (or), ^^ (xor), << (logical shift left), >> (logical shift right) |
||
and a unary operation ~ (negate). |
and a unary operation ~ (negate). |
||
⚫ | |||
=={{header|LSE64}}== |
=={{header|LSE64}}== |