Bitshift help.

Pavilion1984:
I have just tested that and yes it does work, great. What is the -1 doing in this if you don't mind me asking (i have not used these functions before so this is new to me)? If am going to use it i need to know what it is doing lol but thanks a bunch to WizenedEE and Grumpy_Mike.

1<<5 = 00100000
00100000 -1 = 00011111
~00011111 = 11100000