Advertisement

how would I .....

Started by May 03, 2001 03:39 PM
10 comments, last by SCRUB 23 years, 6 months ago
& == % for power of 2 numbers - 1
eg
num%32 is the same as num&31


http://members.xoom.com/myBollux
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.

This topic is closed to new replies.

Advertisement