[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Bitwise operations and binary number
- From: nerurin@...
- Date: Tue, 18 Sep 2001 23:47:56 -0000
Hi all,
I wonder if Lua supports binary number and bitwise operations or not.
I am play with an idea using a variable in binary to describe other
data structures.
for example
params_to_be_used{ a, b, c, d, e }
i_should_use = 10101 -- binary number
you_should_use = 10001 -- binary number
by having this,
I can simply using bitwise-AND, and find out what parammeter to be
used for different objects in order to avoid using too much memory
(using a array) or using too much computational time (using a lot of
if-elses).
I do aware there is alternative to archive this. But I am just
interested in whether binary number works in Lua or not.
Thanks!!
Nelson