blokhead is right, you really want to do a bitwise and (&) BEFORE you shift.
You may also wish to check out Bit operations for beginners or Re: Re: What A Wonderful World: Bitmasks! for more information on bitwise operations.
--
"To err is human, but to really foul things up you need a computer." --Paul Ehrlich
In reply to Re: popped bit in right shift operation
by LTjake
in thread popped bit in right shift operation
by vasu
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |