Numerical Representation
1. What is the binary representation of the decimal number 31?
2. Which of the following C statements sets the 0th bit of n to 1?
3. What is the result of left shifting the binary number 101 by 2 positions?
4. Which of the following is the correct way to check if the 3rd bit (from right, 0-indexed) of n is set in C?
5. What is the minimum number of bits required to represent the decimal number 1023 in binary?
6. Which of the following C statements clears the 2nd bit (from right, 0-indexed) of n?
7. Which of the following is the binary representation of the decimal number 512?
8. Which of the following best describes the effect of the XOR (^) operator in binary arithmetic?
9. What is the result of 14 ^ 9 in C? (where ^ is bitwise XOR)
10. Which of the following best describes the purpose of using binary representation in computers?