6

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.

  • 2
    Just for the record - is there a reason you skipped every other power of two in your example?!! – Fattie Jul 11 '11 at 8:34
  • 1
    Actually 4096 fits the pattern, because it's a power of 2. – Alenanno Jul 11 '11 at 8:58
  • 2
    @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
  • 9
    I'd call them round numbers, but that may be a programmers affliction. ;) – MSalters Jul 11 '11 at 10:16
  • 2
    @Alenanno Just for what it's worth. Read my comment again. It says "In your example", the example being: "8, 32, 128, 4096". OK? – Fattie Jul 11 '11 at 15:44
24

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)

  • 1
    Indeed. Any mathematical documentation I can find refers to them as powers of two. – Vincent McNabb Jul 11 '11 at 9:00
  • 7
    "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
8

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.

protected by ab2 Oct 22 '17 at 19:14

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.