Bitwise interview question

Also asked about my final year project