# What do you call a number that is a power of 2?

I know there is a term for a number that is the power of 2, such as 8, 32, 128, 4096 -- but it slipped my mind.

-
Just for the record - is there a reason you skipped every other power of two in your example?!! – Joe Blow Jul 11 '11 at 8:34
Actually 4096 fits the pattern, because it's a power of 2. – Alenanno Jul 11 '11 at 8:58
@Alenanno: I think the pattern Joe meant was the standard sequence of powers of two are 2,4,8,16,32,64,128,256,512 .. and Jen used alternate powers in the post 8,32,128 and then jumped to 4096. – JoseK Jul 11 '11 at 9:40
I'd call them round numbers, but that may be a programmers affliction. ;) – MSalters Jul 11 '11 at 10:16
@Alenanno Just for what it's worth. Read my comment again. It says "In your example", the example being: "8, 32, 128, 4096". OK? – Joe Blow Jul 11 '11 at 15:44

## 3 Answers

A "power of two" seems like a good name.

Although 'exponent' has been suggested, it is not correct

The relationship is quite simple, though:

3 is the exponent which generates the power of two   8       (23 = 8)

12 is the exponent which generates the power of two 4096  (212 = 4096)

-
Indeed. Any mathematical documentation I can find refers to them as powers of two. – Vincent McNabb Jul 11 '11 at 9:00
"It's more precise than saying an exponent." - No, "exponent" would simply be wrong here, not just less precise. Why did you even mention it? It just muddies the waters. I could understand it if Jen had suggested it, and you were making a correction - but you're just correcting yourself here. – MT_Head Jul 12 '11 at 10:00
@MT_Head, I agree. What I typed yesterday was just fastest gun in the west syndrome. I could edit my answer, but it seems a little late now. – pavium Jul 12 '11 at 11:33
@pavium - Feel free to edit your answer! Remember, the whole reputation-points thing is (supposed to be) secondary to giving correct answers, not just for the OP but for future Googlers. In this case, a straight edit would make your answer identical with @Digital Powers', but perhaps an explanatory note? Future Googlers might not read the comments. – MT_Head Jul 12 '11 at 16:39

You simply call them "powers of two"; there is no other name.

-

In programming, especially graphics programming (textures), powers of two are sometimes referred to as POT, and non-powers of two as NPOT.

But obviously the word "pot" has strong connotations, and so this term can be used only in such a context unambiguously. Anywhere else, "power of two" is a much better choice.

-
Fascinating, @nikai, I have never heard that one. Can you see any examples of that online, just out of curiosity? Cheers – Joe Blow Jul 12 '11 at 8:00
Sure, here are two OpenGL specifications using it for texture dimensions: opengl.org/registry/specs/ARB/texture_non_power_of_two.txt opengl.org/registry/specs/NV/texture_rectangle.txt Here it is used in papers in context of ordering policy: or.journal.informs.org/cgi/content/abstract/58/2/492 ieeexplore.ieee.org/xpl/freeabs_all.jsp?arnumber=4737780 – Nicolas Kaiser Jul 12 '11 at 9:20
FANTASTIC REFERENCE, Nikai! Awesome. @Jen, @Nikai has a great term, even though little arcane. I mentioned 3D graphics in my answer -- there's the term!! How awesome. Great stuff. – Joe Blow Jul 12 '11 at 10:35