Power of Two Checker
Check whether a whole number is a power of 2 and find its exponent. If it is not a power of 2, the tool shows the nearest powers of 2 below and above it.
1 Fill in the box
2 Your answer
Your answer shows here as you type.
How to use the Power of Two Checker
- Type a whole number into the box.
- Read whether it is a power of 2 and its exponent.
- If it is not a power of 2, use the previous and next powers shown below it.
Frequently asked questions
What is a power of 2?
A power of 2 is a number written as 2 raised to a whole number exponent k, where k is 0 or more. Examples are 1, 2, 4, 8, 16, 1024.
How can I tell if a number is a power of 2 in binary?
In binary, a power of 2 is a single 1 followed by zeros, such as 1000 (8). For a positive integer n, n AND (n minus 1) equals 0 exactly when n is a power of 2.
Is 1 a power of 2?
Yes. 2 raised to the power of 0 is 1.
Is 0 a power of 2?
No. No power of 2 equals 0, because 2 raised to any whole number is at least 1.
Wrote something with AI? Slop Monkey rewrites it so it sounds like you, and keeps your facts.