I have been recently reading this book, "Supercharged Javascript Graphics", and it is just awesome. It has some really interesting concepts and examples using html5 canvas element and other graphics. It also uses the jquery library and teaches how to create own plugins. In most of his examples however he uses bitwise operators
and I am having trouble understanding them. He does explain their use but not entirely. The most used in his examples are:
x >> 0
x << y
x >>> 0
x & y
x | y
x^y
I am having some trouble understanding their use and their benefit, so I just want to know what is their equivalent using regular operators. How can I replace x >> y
with something using like x%y
or something in that sort.