Powers of 2 table

2^0 to 2^64, exact values and hex.

65 rows
n2ⁿHexNotes
00x1
10x2
20x4
30x8
40x10
50x20
60x40
70x80
80x100Values in 1 byte
90x200
100x4001 KiB (kibibyte)
110x800
120x1000
130x2000
140x4000
150x8000
160x10000Values in 16 bits
170x20000
180x40000
190x80000
200x1000001 MiB (mebibyte)
210x200000
220x400000
230x800000
240x1000000
250x2000000
260x4000000
270x8000000
280x10000000
290x20000000
300x400000001 GiB (gibibyte)
310x80000000
320x100000000Values in 32 bits (IPv4 addresses)
330x200000000
340x400000000
350x800000000
360x1000000000
370x2000000000
380x4000000000
390x8000000000
400x100000000001 TiB (tebibyte)
410x20000000000
420x40000000000
430x80000000000
440x100000000000
450x200000000000
460x400000000000
470x800000000000
480x1000000000000
490x2000000000000
500x40000000000001 PiB (pebibyte)
510x8000000000000
520x10000000000000
530x20000000000000
540x40000000000000
550x80000000000000
560x100000000000000
570x200000000000000
580x400000000000000
590x800000000000000
600x10000000000000001 EiB (exbibyte)
610x2000000000000000
620x4000000000000000
630x8000000000000000
640x10000000000000000Values in 64 bits

Click a highlighted value to copy it.

Type in the box to filter, or press / to jump to it.

Runs in your browser. Nothing uploaded.

How to use the powers of 2 table

  1. Scroll to the power you want, or type the exponent (16), the power (2^16), a value (65536) or a size (1 GB) into the filter box.
  2. Check the Notes column for the powers that matter in computing, such as 2^10 (1 KiB) and 2^32 (every IPv4 address).
  3. Click a value to copy it as plain digits, without the commas.

Why computers use powers of two

A bit has two states, so every extra bit doubles the number of values you can store: 8 bits give 256, 16 bits give 65,536. Memory is addressed in binary too, which is why RAM sizes, cache sizes and many file format limits land on a power of two. In hexadecimal every power of two looks round, a 1, 2, 4 or 8 followed by zeros, which is why programmers write sizes in hex. The number base converter shows any value in binary, hex and decimal side by side.

KiB vs kB

Unit Bytes Unit Bytes
kB (kilobyte) 1,000 KiB (kibibyte) 1,024
MB (megabyte) 1,000,000 MiB (mebibyte) 1,048,576
GB (gigabyte) 1,000,000,000 GiB (gibibyte) 1,073,741,824
TB (terabyte) 1,000,000,000,000 TiB (tebibyte) 1,099,511,627,776

Drive makers use the decimal units, but Windows counts in the binary ones while still labelling them GB. That’s why a new 1 TB drive shows up as about 931 GB: nothing is missing, it’s the same number of bytes divided by 1,024 three times instead of 1,000.

Values worth knowing

  • 256 (2^8): the values in one byte. Each RGB colour channel and each part of an IPv4 address runs from 0 to 255.
  • 1,024 (2^10): one KiB, the step between each binary unit.
  • 65,536 (2^16): the values in 16 bits. Network ports go from 0 to 65,535, and old versions of Excel stopped at 65,536 rows.
  • 2,147,483,648 (2^31): a signed 32-bit integer holds up to one less than this. Unix time stored that way runs out in January 2038.
  • 4,294,967,296 (2^32): every IPv4 address, and the 4 GiB of memory a 32-bit program can address.
  • 2^64: the range of a 64-bit integer, large enough that counters and IDs of that size are very unlikely to ever run out.