Basically, it's easy. With integer in LSL, you may operate 32 distinct bits (as the integer is stored in 4 bytes). To set a bit, pick its position (starting from right to left, 0 to 31) and power 2 to the position, then apply the 'bitwise or' operator, for example:
integer b = 0;
b = b | 0x8; // 0x8 (8 decimal) is 2 power 3, hence we're setting here the 4th bit (remember, the position is counted from 0)
b = b | 0x40; // 0x40 (64 decimal) is 2 power 6, so the set bit is 7th.
To check if a bit is set, simply apply the 'bitwise and':
integer b = 0x48;
if ( b & 0x20 == 0x20 ) { } // false (think why
if ( b & 0x8 == 0x8 ) { } // true
if ( b & 0x40 == 0x40 ) { } // true aswell
Good luck!