Skip to content
BetterDL

Powers of 2

Also called: powers of two, power of 2, power of two

The numbers 1, 2, 4, 8, 16, … (2⁰, 2¹, 2², …). They are the place weights of binary and set how many patterns n bits can make.

The powers of 2 run 2⁰ = 1, 2¹ = 2, 2² = 4, 2³ = 8, each one double the last. They appear everywhere in digital logic:

  • they're the place weights of binary
  • n bits make 2ⁿ patterns, so they set every range
  • memory sizes come in powers of 2, because n address bits reach 2ⁿ locations

Worth knowing by heart:

  • 2⁰ = 1, 2¹ = 2, 2² = 4, 2³ = 8
  • 2⁴ = 16, 2⁵ = 32, 2⁶ = 64, 2⁷ = 128
  • 2⁸ = 256, 2⁹ = 512, 2¹⁰ = 1024
  • 2¹⁶ = 65,536

A handy landmark: 2¹⁰ = 1024 is about a thousand, so 2²⁰ is about a million.

One property explains a lot: each power is one more than all the smaller powers combined. 1 + 2 + 4 + 8 = 15 = 16 − 1. That's why 1111 is one less than 10000, why the largest n-bit unsigned value is 2ⁿ − 1, and why subtracting the largest power first always works.

In binary, a power of 2 is a single 1 followed by zeros: 2⁵ = 100000.

1
32
0
16
0
8
0
4
0
2
0
1

Worked example

Example

Estimating with powers of 2

Powers of 2 answer most "how many bits" questions quickly.

  1. 1.

    To count up to 1,000: 2⁹ = 512 is too small and 2¹⁰ = 1024 is enough, so 10 bits (0 to 1023).

  2. 2.

    2¹²: double 2¹⁰ twice, 1024 → 2048 → 4096.

  3. 3.

    16 bits: 2¹⁶ = 65,536 patterns, so unsigned values 0 to 65,535.

Common mistakes

  • Thinking 2⁰ = 0. Any nonzero number to the power 0 is 1.

  • Confusing 2ⁿ (the number of patterns) with 2ⁿ − 1 (the largest unsigned value).

  • Treating 2¹⁰ as exactly 1000. It's 1024.

Practice Powers of 2

Interactive questions with instant feedback and a worked solution for every wrong answer.

Learn it step by step

Powers of 2 is taught in Number Systems.