Friday, 10 December 2010

Bitwise operators

JavaScript Bitwise operators

Operator Meaning Example
& AND 1111 & 0011 = 0011
~ NOT ~0011=1100
| OR 1111 | 0011 = 1111
^ exclusive OR 1111 ^ 0011 = 1100
<< Left shift 1111<<2=1100
>> Right shift 1111>>2=0011
>>> Right shift, fill with zeros 1111>>>2=0011

0 comments: