Broadcom interview question

Bit shifting and algorithms.