16 January 2022

Making Friends with Powers of 2

In the manga/anime series "Chihayafuru," the protagonist mentions that she "makes friends" with the universe of playing cards in her sport, Karuta, to help build a connection in hopes of achieving better results.

Note that all 2^n will be "the smallest positive even nth power," so I will omit from their descriptions. In combinatorics, 2^n is the size of the powerset for a size-N set.

1: self explanatory

2: self explanatory; the one and only even prime number; base 2/binary

4: self explanatory; all squares modulo 4 give residues 0 or 1 (prove it!); typical word size of a 32-bit Intel/AMD computer

8: number of ounces in a cup (go USA); typical word size of a 64-bit Intel/AMD computer; base 8/octal

16: 0xF + 1; base 16/hexadecimal; bits in a 2-byte integer

32: bits in a 4-byte integer; number of ounces in 1/4-gallon (smaller carton of milk)

64: bits in an 8-byte integer; number of ounces in half-gallon (larger carton of milk)

128: number of ounces in a gallon (jug of milk); amount of memory (in MB) in the first iPhone

256: 0xFF + 1; how much memory in MB my first Mac had

512: how much memory in MB my first computer had

1024: approximately interchangeable with 1000 = 10^3 for fast log2 and log10 computation; MB in a GB (or KB in a MB, or B in a KB, etc)

2048: seen in computer hardware flyers

4096: max memory (in MB) supported by 32-bit computers; seen in computer hardware flyers; pixel width of a true 4k screen

8192: seen in computer hardware flyers

16384: seen in computer hardware flyers

32768: one more than the largest positive value representable by a signed 16-bit integer

65536: bits in a 16-byte integer

131072: smallest power of 2 larger than 10^5 (common constant in programming problems)

262144: number of colours representable by a 18-bit panel when PC laptop makers were too cheap to use 24-bit panels in the 2000s; smallest power of 2 larger than 2*10^5 (common constant in programming problems)

[...]

1048576: smallest power of 2 greater than 10^6

[...]

16777216: number of colours representable by a 24-bit panel (before 10-bit "high colour" panels became popular)

[...]

1073741824: number of colours representable by a 30-bit panel (e.g. a "high colour" or "photography/video" panel); smallest power of 2 greater than 10^9

2147483648: one more than the largest positive value representable by a signed 32-bit integer

4294967296: number of different values representable by 32 bits

[...]

Something that starts with 9223 and has a lot of digits: 2^63 or 2^63-1, the latter is the largest positive value representable by a signed 64-bit integer

For these large values, e.g. 2^30 and up, I only know the first handful of digits, which is usually sufficient.

---

Writing these out, there are a few things that stand out to me:

  • much of these numbers are from computer-related activities, e.g. programming problems or browsing computer hardware brochures
  • the powers of 2 less than 100, especially those less than 10 (1, 2, 4), come up regularly for me in my day-to-day life

If you find special meaning to a power of two, leave a comment below! I may also write about other numbers, so stay tuned.