& == % for power of 2 numbers - 1
eg
num%32 is the same as num&31
http://members.xoom.com/myBollux
how would I .....
The & operator is the bitwise (i think that''s the term) ''and'' operator as opposed to && which is the logical ''and'' operator. essentially what it does is ''and'' the two binary numbers together. In other words, each bit in the result is equal to the logical and of the bits in the two numbers. For example, 1101 & 0101 = 0101.
J.W.
J.W.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement