Math Fundamentals18 sections · 814 units
Open in Course

Common Exponent Values

Powers of 2

You'll see certain powers of 22 again and again in programming. Memorize these:

28=2562^8 = 256, 210=10242^{10} = 1024, 216=655362^{16} = 65536, 2201062^{20} \approx 10^6, 2301092^{30} \approx 10^9, 2324×1092^{32} \approx 4 \times 10^9.

Why do these matter? 2311=21474836472^{31} - 1 = 2147483647 is the max signed 3232-bit integer. 26312^{63} - 1 is the max signed 6464-bit integer. When a problem says n109n \leq 10^9, you know it fits in 3232 bits. When n1018n \leq 10^{18}, you need 6464 bits.

Also useful: 10321010^3 \approx 2^{10}. This shortcut converts between powers of 1010 and powers of 22 quickly.