← All topics
Bit Manipulation Quiz: questions with answers
8 questions, each with the answer and a short explanation.
Take the timed quiz + get a certificate →- Q1. What is 5 ^ 3 (XOR)?
- Q2. What is 6 & 3 (AND)?
- Q3. What is 1 << 4?
- Q4. Every number appears twice except one. Which operation finds the single number in O(1) space?
- Q5. What does n & (n − 1) do?
- Q6. Which numbers are powers of two? (select all that apply)
- Q7. How many 1 bits does 13 have?
- Q8. In Java, which shift fills with 0s even for negative numbers?