This is exactly what the left shift operator does. With this in mind, take another look at the decision maker logic. This is fast for the computer for the same reason multiplying by powers of ten is fast for your brain. So, all in all, this process costs virtually nothing. Right shift Right shift isn't relevant to the decision maker example, but it's still useful in many JavaScript applications.
Right shift is to division what left shift is to multiplication.
Excess bits shifted off to the right are thrown away. I'm not going to open right now. But if you're curious, check out the section on bitwise operators in Netscape's JavaScript Reference for more information. Bitwise operators are an easier, less processor-intensive way to handle certain math functions. And they can make a big difference in speeding up your code.