trying out bitwise operations in ruby