Bitwise Interview Question

basics related to SQL,JAVA,C++