🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← 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)

  1. A.1
  2. B.64
  3. C.0
  4. 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 →