20.04.2013, 05:35
Quote:
whats the point of left shifting a bit?
i know what it does but how is it useful |
E.g. a << b it's equal to a * 2^b
If you right bit shift a number, you divide it by a power of 2.
E.g. a >> b it's equal to a / 2^b
Read these articles for more:
http://www.gamedev.net/page/resource...ons-in-c-r1563
http://lab.polygonal.de/?p=81