Qualcomm interview question

They asked me for a function to do a bit wise operation