← Bit Manipulation Quiz: all 8 questions
Bit Manipulation Quiz · Question 6 of 8
Which numbers are powers of two? (select all that apply)
Which numbers are powers of two? (select all that apply)
- A.1
- B.64
- C.0
- D.12
Answer & explanation
Correct answer: 1 · 64
A power of two has exactly one set bit (n > 0 and n & (n − 1) == 0). 0 has none; 12 = 1100 has two.
Can you get the rest right without peeking?
Take the timed Bit Manipulation Quiz quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →