Box interview question

Simple bit manipulation coding question