Spójrz na operatory bitowe w MySQL po pierwsze:https://dev.mysql.com/doc /refman/5.0/en/bit-functions.html
Następnie masz lewą zmianę:
https://dev.mysql.com /doc/refman/5.0/en/bit-functions.html#operator_left-shift
I przesunięcie w prawo:
https://dev.mysql.com /doc/refman/5.0/en/bit-functions.html#operator_right-shift