Bitwise interview question

Mostly related to sql