Power of two#Powers of 1024

{{short description|Two raised to an integer power}}

{{other uses}}

Image:powers_of_two_cuboids.svg ]]

A power of two is a number of the form {{math|2n}} where {{mvar|n}} is an integer, that is, the result of exponentiation with number two as the base and integer {{mvar|n}} as the exponent. In the fast-growing hierarchy, {{math|2n}} is exactly equal to f_1^n(1). In the Hardy hierarchy, {{math|2n}} is exactly equal to H_{\omega{n}}(1).

Powers of two with non-negative exponents are integers: {{math|1=20 = 1}}, {{math|1=21 = 2}}, and {{math|2n}} is two multiplied by itself {{mvar|n}} times.{{cite book |title=Schaum's Outline of Theory and Problems of Essential Computer Mathematics |first=Seymour |last=Lipschutz |year=1982 |isbn=0-07-037990-4 |page=3 |publisher=McGraw-Hill |location=New York}}{{cite book |title=Mathematics Masterclasses |first=Michael J. |last=Sewell |year=1997 |isbn=0-19-851494-8 |page=[https://archive.org/details/mathematicsmaste0000unse/page/78 78] |publisher=Oxford University Press |location=Oxford |url=https://archive.org/details/mathematicsmaste0000unse/page/78 }} The first ten powers of 2 for non-negative values of {{mvar|n}} are:

:1, 2, 4, 8, 16, 32, 64, 128, 256, 512, ... {{OEIS|A000079}}

By comparison, powers of two with negative exponents are fractions: for positive integer {{mvar|n}}, {{math|2n}} is one half multiplied by itself {{math|n}} times. Thus the first few negative powers of 2 are {{sfrac|1|2}}, {{sfrac|1|4}}, {{sfrac|1|8}}, {{sfrac|1|16}}, etc. Sometimes these are called inverse powers of two because each is the multiplicative inverse of a positive power of two.

Base of the binary numeral system

Because two is the base of the binary numeral system, powers of two are common in computer science. Written in binary, a power of two always has the form 100...000 or 0.00...001, just like a power of 10 in the decimal system.

Computer science

Two to the power of {{math|n}}, written as {{math|2n}}, is the number of values in which the bits in a binary word of length {{math|n}} can be set, where each bit is either of two values. A word, interpreted as representing an integer in a range starting at zero, referred to as an "unsigned integer", can represent values from 0 ({{math|000...0002}}) to {{math|2n − 1}} ({{math|111...1112}}) inclusively. An alternative representation, referred to as a signed integer, allows values that can be positive, negative and zero; see Signed number representations. Either way, one less than a power of two is often the upper bound of an integer in binary computers. As a consequence, numbers of this form show up frequently in computer software. As an example, a video game running on an 8-bit system might limit the score or the number of items the player can hold to 255—the result of using a byte, which is 8 bits long, to store the number, allowing the representation of 256 distinct values from {{math|0}} to {{math|1=28 − 1 = 255}}. For example, in the original Legend of Zelda the main character was limited to carrying 255 rupees (the currency of the game) at any given time, and the video game Pac-Man famously has a kill screen at level 256.

Powers of two are often used to define units in which to quantify computer memory sizes. A "byte" now typically refers to eight bits (an octet), resulting in the possibility of 256 values (28). (The term byte once meant (and in some cases, still means) a collection of bits that was defined by the hardware context, typically of 5 to 32 bits, rather than only an 8-bit unit.) The prefix kilo, in conjunction with byte, has been used by computer scientists to mean {{val|1,024}} (210). However, in general, the term kilo has been used in the International System of Units to mean {{val|1,000}} (103). Binary prefixes have been standardized, such as kibi (Ki) meaning {{val|1,024}}. Nearly all processor registers have sizes that are a power of two bits, 8, 16, 32 or 64 bits being very common, with the last two being most common except for very small processors.

Powers of two occur in a range of other places as well. For many disk drives, at least one of the sector size, number of sectors per track, and number of tracks per surface is a power of two.{{citation needed|reason=The sector size is commonly a power of two; there are practical reasons why the others two have no specific reason to be related to a power of two.|date=December 2024}} The logical block size is almost always a power of two.

Numbers that are closely related to powers of two occur in a number of computer hardware designs, such as with the number of pixels in the width and height of video screens, where the number of pixels in each direction is often the product of a power of two and a small number. For example, {{math|1=640 = 128 × 5}}, and {{math|1=480 = 32 × 15}}.

Mersenne and Fermat primes

A prime number that is one less than a power of two is called a Mersenne prime. For example, the prime number 31 is a Mersenne prime because it is 1 less than 32 (25). Similarly, a prime number (like 257) that is one more than a positive power of two is called a Fermat prime—the exponent itself is a power of two. A fraction that has a power of two as its denominator is called a dyadic rational. The numbers that can be represented as sums of consecutive positive integers are called polite numbers; they are exactly the numbers that are not powers of two.

Euclid's ''Elements'', Book IX

The geometric progression 1, 2, 4, 8, 16, 32, ... (or, in the binary numeral system, 1, 10, 100, 1000, 10000, 100000, ... ) is important in number theory. Book IX, Proposition 36 of Elements proves that if the sum of the first {{math|n}} terms of this progression is a prime number (and thus is a Mersenne prime as mentioned above), then this sum times the {{math|n}}th term is a perfect number. For example, the sum of the first 5 terms of the series {{math|1=1 + 2 + 4 + 8 + 16 = 31}}, which is a prime number. The sum 31 multiplied by 16 (the 5th term in the series) equals 496, which is a perfect number.

Book IX, Proposition 35, proves that in a geometric series if the first term is subtracted from the second and last term in the sequence, then as the excess of the second is to the first—so is the excess of the last to all those before it. (This is a restatement of our formula for geometric series from above.) Applying this to the geometric progression 31, 62, 124, 248, 496 (which results from 1, 2, 4, 8, 16 by multiplying all terms by 31), we see that 62 minus 31 is to 31 as 496 minus 31 is to the sum of 31, 62, 124, 248. Therefore, the numbers 1, 2, 4, 8, 16, 31, 62, 124 and 248 add up to 496 and further these are all the numbers that divide 496. For suppose that {{mvar|p}} divides 496 and it is not amongst these numbers. Assume {{math|pq}} is equal to {{math|16 × 31}}, or 31 is to {{mvar|q}} as {{mvar|p}} is to 16. Now {{math|p}} cannot divide 16 or it would be amongst the numbers 1, 2, 4, 8 or 16.

Therefore, 31 cannot divide {{math|q}}. And since 31 does not divide {{math|q}} and {{math|q}} measures 496, the fundamental theorem of arithmetic implies that {{math|q}} must divide 16 and be among the numbers 1, 2, 4, 8 or 16. Let {{math|q}} be 4, then {{math|p}} must be 124, which is impossible since by hypothesis {{math|p}} is not amongst the numbers 1, 2, 4, 8, 16, 31, 62, 124 or 248.

First 64 powers of two

{{Anchor|List of powers of two}}

{{OEIS|id=A000079}}

class="mw-collapsible" style="text-align:center"

|+

style="background:#c0c0c0;" |

! {{mvar|n}}

! style="width:150px;" | {{math|2n}}

| rowspan="17" style="background:white; width:15px;" |

! {{mvar|n}}

! style="width:150px;" | {{math|2n}}

| rowspan="17" style="background:white; width:15px;" |

! {{mvar|n}}

! style="width:150px;" | {{math|2n}}

| rowspan="17" style="background:white; width:15px;" |

! {{mvar|n}}

! style="width:150px;" | {{math|2n}}

style="background:#dfdfdf;" |

|0

align="right" |1 (number)

|16

align="right" |65536 (number)

|32

align="right" |4294967296 (number)

|48

align="right" | {{val|281,474,976,710,656}}
style="background:white;" |

|1

align="right" |2 (number)

|17

align="right" | {{val|131,072}}

|33

align="right" | {{val|8,589,934,592}}

|49

align="right" | {{val|562,949,953,421,312}}
style="background:#f7f7f7;" |

|2

align="right" |4 (number)

|18

align="right" | {{val|262,144}}

|34

align="right" | {{val|17,179,869,184}}

|50

align="right" | {{val|1,125,899,906,842,624}}
style="background:white;" |

|3

align="right" |8 (number)

|19

align="right" | {{val|524,288}}

|35

align="right" | {{val|34,359,738,368}}

|51

align="right" | {{val|2,251,799,813,685,248}}
style="background:#efefef;" |

|4

align="right" |16 (number)

|20

align="right" | {{val|1,048,576}}

|36

align="right" | {{val|68,719,476,736}}

|52

align="right" | {{val|4,503,599,627,370,496}}
style="background:white;" |

|5

align="right" |32 (number)

|21

align="right" | {{val|2,097,152}}

|37

align="right" | {{val|137,438,953,472}}

|53

align="right" | {{val|9,007,199,254,740,992}}
style="background:#f7f7f7;" |

|6

align="right" |64 (number)

|22

align="right" | {{val|4,194,304}}

|38

align="right" | {{val|274,877,906,944}}

|54

align="right" | {{val|18,014,398,509,481,984}}
style="background:white;" |

|7

align="right" |128 (number)

|23

align="right" | {{val|8,388,608}}

|39

align="right" | {{val|549,755,813,888}}

|55

align="right" | {{val|36,028,797,018,963,968}}
style="background:#e7e7e7;" |

|8

align="right" |256 (number)

|24

align="right" | {{val|16,777,216}}

|40

align="right" | {{val|1,099,511,627,776}}

|56

align="right" | {{val|72,057,594,037,927,936}}
style="background:white;" |

|9

align="right" |512 (number)

|25

align="right" | {{val|33,554,432}}

|41

align="right" | {{val|2,199,023,255,552}}

|57

align="right" | {{val|144,115,188,075,855,872}}
style="background:#f7f7f7;" |

|10

align="right" |1024 (number)

|26

align="right" | {{val|67,108,864}}

|42

align="right" | {{val|4,398,046,511,104}}

|58

align="right" | {{val|288,230,376,151,711,744}}
style="background:white;" |

|11

align="right" |2048 (number)

|27

align="right" | {{val|134,217,728}}

|43

align="right" | {{val|8,796,093,022,208}}

|59

align="right" | {{val|576,460,752,303,423,488}}
style="background:#efefef;" |

|12

align="right" |4096 (number)

|28

align="right" | {{val|268,435,456}}

|44

align="right" | {{val|17,592,186,044,416}}

|60

align="right" | {{val|1,152,921,504,606,846,976}}
style="background:white;" |

|13

align="right" |8192 (number)

|29

align="right" | {{val|536,870,912}}

|45

align="right" | {{val|35,184,372,088,832}}

|61

align="right" | {{val|2,305,843,009,213,693,952}}
style="background:#f7f7f7;" |

|14

align="right" |16384 (number)

|30

align="right" | {{val|1,073,741,824}}

|46

align="right" | {{val|70,368,744,177,664}}

|62

align="right" | {{val|4,611,686,018,427,387,904}}
style="background:white;" |

|15

align="right" |32768 (number)

|31

align="right" | {{val|2,147,483,648}}

|47

align="right" | {{val|140,737,488,355,328}}

|63

align="right" | {{val|9,223,372,036,854,775,808}}

= Last digits =

Starting with 2 the last digit is periodic with period 4, with the cycle 2–4–8–6–, and starting with 4 the last two digits are periodic with period 20. These patterns are generally true of any power, with respect to any base. The pattern continues where each pattern has starting point {{math|2k}}, and the period is the multiplicative order of 2 modulo {{math|5k}}, which is {{math|1=φ(5k) = 4 × 5k−1}} (see Multiplicative group of integers modulo n).{{cn|date=June 2018}}

Powers of 1024

{{OEIS|id=A140300}}

The first few powers of 210 are slightly larger than those same powers of {{val|1000}} (103). The first 11 powers of 210 values are listed below:

class="mw-collapsible"

|+

style="background:#dfdfdf;" |

|20

=align="left"|1= 10000align="right"|(0% deviation)
style="background:white;" |

|210

=align="left"|{{val|1024}}≈ 10001align="right"|(2.4% deviation)
style="background:#f7f7f7;" |

|220

=align="left"|{{val|1048576}}≈ 10002align="right"|(4.9% deviation)
style="background:white;" |

|230

=align="left"|{{val|1073741824}}≈ 10003align="right"|(7.4% deviation)
style="background:#efefef;" |

|240

=align="left"|{{val|1099511627776}}≈ 10004align="right"|(10.0% deviation)
style="background:white;" |

|250

=align="left"|{{val|1125899906842624}}≈ 10005align="right"|(12.6% deviation)
style="background:#f7f7f7;" |

|260

=align="left"|{{val|1152921504606846976}}≈ 10006align="right"|(15.3% deviation)
style="background:white;" |

|270

=align="left"|{{val|1180591620717411303424}}≈ 10007align="right"|(18.1% deviation)
style="background:#e7e7e7;" |

|280

=align="left"|{{val|1208925819614629174706176}}≈ 10008align="right"|(20.9% deviation)
style="background:white;" |

|290

=align="left"|{{val|1237940039285380274899124224}}≈ 10009align="right"|(23.8% deviation)
style="background:white;"

|2100

=align="left"|{{val|1267650600228229401496703205376}}≈ 100010align="right"|(26.8% deviation)

It takes approximately 17 powers of 1024 to reach 50% deviation and approximately 29 powers of 1024 to reach 100% deviation of the same powers of 1000.\log_{1024/1000} 1.5 \approx 17.1,

\log_{1024/1000} 2 \approx 29.2. Also see Binary prefixes and IEEE 1541-2002.

Powers of two whose exponents are powers of two

Because data (specifically integers) and the addresses of data are stored using the same hardware, and the data is stored in one or more octets ({{math|23}}), double exponentials of two are common. The first 21 of them are:

class="mw-collapsible" style="text-align:right;"

|+

style="background:#c0c0c0;" |

! {{mvar|n}} !! {{math|2n}} !! {{math|22n}} {{OEIS|id=A001146}} !! digits

style="background:#dfdfdf;" |

| 0

121
style="background:white;" |

| 1

241
style="background:#f7f7f7;" |

| 2

4162
style="background:white;" |

| 3

82563
style="background:#efefef;" |

| 4

1665536 (number)5
style="background:white;" |

| 5

32{{val|4,294,967,296}}{{val|10}}
style="background:#f7f7f7;" |

| 6

64{{replace|18,446,744,073,709,551,616|,|{{px2}}{{wbr}}}}{{val|20}}
style="background:white;" |

| 7

128{{replace|340,282,366,920,938,463,463,374,607,431,768,211,456|,|{{px2}}{{wbr}}}}{{val|39}}
style="background:#e7e7e7;" |

| 8

256{{replace|115,792,089,237,316,195,423,570,...,039,457,584,007,913,129,639,936|,|{{px2}}{{wbr}}}}{{val|78}}
style="background:white;" |

| 9

{{val|512}}{{replace|13,407,807,929,942,597,099,574,0...,946,569,946,433,649,006,084,096|,|{{px2}}{{wbr}}}}{{val|155}}
style="background:#f7f7f7;" |

| 10

{{val|1,024}}{{replace|179,769,313,486,231,590,772,930,...,304,835,356,329,624,224,137,216|,|{{px2}}{{wbr}}}}{{val|309}}
style="background:white;" |

| 11

{{val|2,048}}{{replace|32,317,006,071,311,007,300,714,8...,193,555,853,611,059,596,230,656|,|{{px2}}{{wbr}}}}{{val|617}}
style="background:#efefef;" |

| 12

{{val|4,096}}{{replace|1,044,388,881,413,152,506,691,75...,243,804,708,340,403,154,190,336|,|{{px2}}{{wbr}}}}{{val|1,234}}
style="background:white;" |

| 13

{{val|8,192}}{{replace|1,090,748,135,619,415,929,462,98...,997,186,505,665,475,715,792,896|,|{{px2}}{{wbr}}}}{{val|2,467}}
style="background:#f7f7f7;" |

| 14

{{val|16,384}}{{replace|1,189,731,495,357,231,765,085,75...,460,447,027,290,669,964,066,816|,|{{px2}}{{wbr}}}}{{val|4,933}}
style="background:white;" |

| 15

{{val|32,768}}{{replace|1,415,461,031,044,954,789,001,55...,541,122,668,104,633,712,377,856|,|{{px2}}{{wbr}}}}{{val|9,865}}
style="background:#dfdfdf;" |

| 16

{{val|65,536}}

|{{replace|2,003,529,930,406,846,464,979,07...,339,445,587,895,905,719,156,736|,|{{px2}}{{wbr}}}}

{{val|19,729}}
style="background:white;" |

| 17

{{val|131,072}}

|{{replace|4,014,132,182,036,063,039,166,06...,850,665,812,318,570,934,173,696|,|{{px2}}{{wbr}}}}

{{val|39,457}}
style="background:#f7f7f7;" |

| 18

{{val|262,144}}

|{{replace|16,113,257,174,857,604,736,195,7...,753,862,605,349,934,298,300,416|,|{{px2}}{{wbr}}}}

{{val|78,914}}
style="background:white;" |

| 19

{{val|524,288}}

|{{replace|259,637,056,783,100,077,612,659,...,369,814,364,528,226,185,773,056|,|{{px2}}{{wbr}}}}

{{val|157,827}}
style="background:#efefef;" |

| 20

{{val|1,048,576}}

|{{replace|67,411,401,254,990,734,022,690,6...,009,289,119,068,940,335,579,136|,|{{px2}}{{wbr}}}}

{{val|315,653}}

Also see Fermat number, Tetration and {{slink|Hyperoperation#Lower hyperoperations}}.

= Last digits for powers of two whose exponents are powers of two =

All of these numbers over 4 end with the digit 6. Starting with 16 the last two digits are periodic with period 4, with the cycle 16–56–36–96–, and starting with 16 the last three digits are periodic with period 20. These patterns are generally true of any power, with respect to any base. The pattern continues where each pattern has starting point {{math|2k}}, and the period is the multiplicative order of 2 modulo {{math|5k}}, which is {{math|1=φ(5k) = 4 × 5k−1}} (see Multiplicative group of integers modulo n).{{cn|date=April 2023}}

= Facts about powers of two whose exponents are powers of two =

In a connection with nimbers, these numbers are often called Fermat 2-powers.

The numbers 2^{2^n} form an irrationality sequence: for every sequence x_i of positive integers, the series

: \sum_{i=0}^{\infty} \frac{1}{2^{2^i} x_i} = \frac{1}{2x_0}+\frac{1}{4x_1}+\frac{1}{16x_2}+\cdots

converges to an irrational number. Despite the rapid growth of this sequence, it is the slowest-growing irrationality sequence known.{{citation | last=Guy | first=Richard K. | author-link=Richard K. Guy | title=Unsolved problems in number theory | publisher=Springer-Verlag | edition=3rd | year=2004 | isbn=0-387-20860-7 | zbl=1058.11001 | contribution=E24 Irrationality sequences | page=346 | url=https://books.google.com/books?id=1AP2CEGxTkgC&pg=PA346 | url-status=live | archive-url=https://web.archive.org/web/20160428053544/https://books.google.com/books?id=1AP2CEGxTkgC&pg=PA346 | archive-date=2016-04-28 }}

= Powers of two whose exponents are powers of two in computer science =

Since it is common for computer data types to have a size which is a power of two, these numbers count the number of representable values of that type. For example, a 32-bit word consisting of 4 bytes can represent {{math|232}} distinct values, which can either be regarded as mere bit-patterns, or are more commonly interpreted as the unsigned numbers from 0 to {{math|232 − 1}}, or as the range of signed numbers between {{math|−231}} and {{math|231 − 1}}. For more about representing signed numbers see Two's complement.

Selected powers of two

; {{anchor|4}}{{anchor|4}}22 = {{val|4}} : The number that is the square of two. Also the first power of two tetration of two.

; {{anchor|256}}{{anchor|256}}28 = {{val|256}} : The number of values represented by the 8 bits in a byte, more specifically termed as an octet. (The term byte is often defined as a collection of bits rather than the strict definition of an 8-bit quantity, as demonstrated by the term kilobyte.)

; {{anchor|1024}}{{anchor|1,024}}210 = {{val|1,024}} : The binary approximation of the kilo-, or {{val|1,000}} multiplier, which causes a change of prefix. For example: {{val|1,024|u=bytes}} = 1 kilobyte{{cite book |last=Fortner |first=Brand |year=1995 |title=The Data Handbook |edition=2nd |place=New York |publisher=Springer; TELOS |doi=10.1007/978-1-4612-2538-6_3 |chapter=Byte Numbers |isbn=978-1-4612-7572-5 |at=Ch. 2, § "Kilobytes and Megabytes", {{pgs|25}} |quote=Disk file sizes are often expressed in kilobytes and megabytes. A file may be listed as taking 32 kilobytes, or 32K bytes. This does not mean exactly 32,000 bytes. A kilobyte is defined as 2{{sup|10}}, or {{val|1024}}, bytes. So 32K bytes is actually equal to 32 × {{val|1024}}, or {{val|32,768}}, bytes. A megabyte is correspondingly defined as 2{{sup|20}}, or 1,048,576, bytes. Therefore, 32 megabytes (32M bytes) equals {{val|33,554,432}} bytes.}} {{pb}} {{cite book |year=2007 |chapter=Understanding Information |title=Forensic Computing |edition=2nd |publisher=Springer |place=London |doi=10.1007/978-1-84628-732-9_2 |last1=Sammes |first1=Tony |last2=Jenkinson |first2=Brian |pages=7–48 |isbn=978-1-84628-397-0 |quote=Today the byte is used as the basic measure of memory size, [...]. As computer memory and disk sizes have become very much larger, so the byte has become a comparatively small unit, and various powers of two are now used to qualify it: a kilobyte is 2{{sup|10}} = {{val|1024}} bytes; a megabyte is 2{{sup|20}} = {{val|1,048,576}} bytes; a gigabyte is 2{{sup|30}} = {{val|1,073,741,824}} bytes; a terabyte is 2{{sup|40}} = {{val|1,099,511,627,776}} bytes; and a petabyte is 2{{sup|50}} = {{val|1,125,899,906,842,624}} bytes. This sequence of powers of 2 units continues further with exabyte, zettabyte and yottabyte. Traditionally, computing scientists have always based their memory units on powers of 2 rather than on powers of 10, though this is a matter of some contention within the standards community. [Footnote: The issue is whether the prefixes kilo, mega, giga etc. should be raised to powers of two as traditionally implemented by the computing fraternity or to powers of ten as decreed by the General Conference of Weights and Measures for SI units. If they were to be changed to powers of ten, kilo would become 10{{sup|3}} = {{val|1000}} and mega would become {{val|e=6}} = {{val|1,000,000}}.] }} (or kibibyte).

; {{anchor|4096}}{{anchor|4,096}}212 = {{val|4,096}} : The hardware page size of an Intel x86-compatible processor.

; {{anchor|32768}}{{anchor|32,768}}215 = {{val|32,768}} : The number of non-negative values for a signed 16-bit integer.

; {{anchor|65536}}{{anchor|65,536}}216 = {{val|65,536}} :

{{main|65,536}}

: The number of distinct values representable in a single word on a 16-bit processor, such as the original x86 processors.Though they vary in word size, all x86 processors use the term "word" to mean 16 bits; thus, a 32-bit x86 processor refers to its native wordsize as a dword

: The maximum range of a short integer variable in the C#, Java, and SQL programming languages. The maximum range of a Word or Smallint variable in the Pascal programming language.

: The number of binary relations on a 4-element set.

; {{anchor|1048576}}{{anchor|1,048,576}}220 = {{val|1,048,576}} : The binary approximation of the mega-, or {{val|1,000,000}} multiplier, which causes a change of prefix. For example: {{val|1,048,576|u=bytes}} = 1 megabyte{{r|kilobyte}} (or mebibyte).

; {{anchor|16777216}}{{anchor|16,777,216}}224 = {{val|16,777,216}} :

: The number of unique colors that can be displayed in truecolor, which is used by common computer monitors.

: This number is the result of using the three-channel RGB system, where colors are defined by three values (red, green and blue) independently ranging from 0 (00) to 255 (FF) inclusive. This gives 8 bits for each channel, or 24 bits in total; for example, pure black is #000000, pure white is #FFFFFF. The space of all possible colors, {{val|16,777,216}}, can be determined by 166 (6 digits with 16 possible values for each), 2563 (3 channels with 256 possible values for each), or 224 (24 bits with 2 possible values for each).

: The size of the largest unsigned integer or address in computers with 24-bit registers or data buses.

; {{anchor|1073741824}}{{anchor|1,073,741,824}}230 = {{val|1,073,741,824}} : The binary approximation of the giga-, or {{val|1,000,000,000}} multiplier, which causes a change of prefix. For example, {{val|1,073,741,824|u=bytes}} = 1 gigabyte{{r|kilobyte}} (or gibibyte).

; {{anchor|2147483648}}{{anchor|2,147,483,648}}231 = {{val|2,147,483,648}} {{see also|2,147,483,647}} : The number of non-negative values for a signed 32-bit integer. Since Unix time is measured in seconds since January 1, 1970, it will run out at {{val|2,147,483,647}} seconds or 03:14:07 UTC on Tuesday, 19 January 2038 on 32-bit computers running Unix, a problem known as the year 2038 problem.

; {{anchor|4294967296}}{{anchor|4,294,967,296}}232 = {{val|4,294,967,296}} :

{{see also|4,294,967,295}}

: The number of distinct values representable in a single word on a 32-bit processor.{{cite web|url=https://www.vaughns-1-pagers.com/computer/powers-of-2.htm|archive-url=https://web.archive.org/web/20150812072147/http://www.vaughns-1-pagers.com/computer/powers-of-2.htm|url-status=dead|title=Powers of 2 Table – Vaughn's Summaries|archive-date=August 12, 2015|website=www.vaughns-1-pagers.com}} Or, the number of values representable in a doubleword on a 16-bit processor, such as the original x86 processors.

: The range of an int variable in the Java, C#, and SQL programming languages.

: The range of a Cardinal or Integer variable in the Pascal programming language.

: The minimum range of a long integer variable in the C and C++ programming languages.

: The total number of IP addresses under IPv4. Although this is a seemingly large number, the number of available 32-bit IPv4 addresses has been exhausted (but not for IPv6 addresses).

: The number of binary operations with domain equal to any 4-element set, such as GF(4).

; {{anchor|1099511627776}}{{anchor|1,099,511,627,776}}240 = {{val|1,099,511,627,776}} : The binary approximation of the tera-, or {{val|1,000,000,000,000}} multiplier, which causes a change of prefix. For example, {{val|1,099,511,627,776}} bytes = 1 terabyte{{r|kilobyte}} or tebibyte.

; {{anchor|1125899906842624}}{{anchor|1,125,899,906,842,624}}250 = {{val|1,125,899,906,842,624}} : The binary approximation of the peta-, or {{val|1,000,000,000,000,000}} multiplier. {{val|1,125,899,906,842,624}} bytes = 1 petabyte{{r|kilobyte}} or pebibyte.

; {{anchor|9007199254740992}}{{anchor|9,007,199,254,740,992}}253 = {{val|9,007,199,254,740,992}} : The number until which all integer values can exactly be represented in IEEE double precision floating-point format. Also the first power of 2 to start with the digit 9 in decimal.

; {{anchor|72057594037927936}}{{anchor|72,057,594,037,927,936}}256 = {{val|72,057,594,037,927,936}} : The number of different possible keys in the obsolete 56 bit DES symmetric cipher.

; {{anchor|1152921504606846976}}{{anchor|1,152,921,504,606,846,976}}260 = {{val|1,152,921,504,606,846,976}} : The binary approximation of the exa-, or {{val|1,000,000,000,000,000,000}} multiplier. {{val|1,152,921,504,606,846,976}} bytes = 1 exabyte{{r|kilobyte}} or exbibyte.

; {{anchor|9223372036854775808}}{{anchor|9,223,372,036,854,775,808}}{{anchor|2^63}}263 = {{val|9,223,372,036,854,775,808}} :

: The number of non-negative values for a signed 64-bit integer.

: {{anchor|2^63-1}}263 − 1, a common maximum value (equivalently the number of positive values) for a signed 64-bit integer in programming languages.

; {{anchor|18446744073709551616}}{{anchor|18,446,744,073,709,551,616}}{{anchor|2^64}}264 = {{val|18,446,744,073,709,551,616}} :

: The number of distinct values representable in a single word on a 64-bit processor. Or, the number of values representable in a doubleword on a 32-bit processor. Or, the number of values representable in a quadword on a 16-bit processor, such as the original x86 processors.

: The range of a long variable in the Java and C# programming languages.

: The range of a Int64 or QWord variable in the Pascal programming language.

: The total number of IPv6 addresses generally given to a single LAN or subnet.

: {{anchor|2^64-1}}264 − 1, the number of grains of rice on a chessboard, according to the old story, where the first square contains one grain of rice and each succeeding square twice as many as the previous square. For this reason the number is sometimes known as the "chess number".

: 264 − 1 is also the number of moves required to complete the legendary 64-disk version of the Tower of Hanoi.

; {{anchor|295147905179352825856}}{{anchor|295,147,905,179,352,825,856}}268 = {{val|295,147,905,179,352,825,856}} : The first power of 2 to contain all decimal digits. {{OEIS|id=A137214}}

; {{anchor|1180591620717411303424}}{{anchor|1,180,591,620,717,411,303,424}}270 = {{val|1,180,591,620,717,411,303,424}} : The binary approximation of the zetta-, or {{val|1,000,000,000,000,000,000,000}} multiplier. {{val|1,180,591,620,717,411,303,424}} bytes = 1 zettabyte{{r|kilobyte}} (or zebibyte).

; {{anchor|1208925819614629174706176}}{{anchor|1,208,925,819,614,629,174,706,176}}280 = {{val|1,208,925,819,614,629,174,706,176}} : The binary approximation of the yotta-, or {{val|1,000,000,000,000,000,000,000,000}} multiplier. {{val|1,208,925,819,614,629,174,706,176}} bytes = 1 yottabyte{{r|kilobyte}} (or yobibyte).

; {{anchor|77371252455336267181195264}}{{anchor|77,371,252,455,336,267,181,195,264}}286 = {{val|77,371,252,455,336,267,181,195,264}} : 286 is conjectured to be the largest power of two not containing a zero in decimal.Weisstein, Eric W. "Zero". From MathWorld. {{cite web |url=http://mathworld.wolfram.com/Zero.html |title=Zero |access-date=2013-05-29 |url-status=live |archive-url=https://web.archive.org/web/20130601190920/http://mathworld.wolfram.com/Zero.html |archive-date=2013-06-01 }}

; {{anchor|79228162514264337593543950336}}{{anchor|79,228,162,514,264,337,593,543,950,336}}296 = {{val|79,228,162,514,264,337,593,543,950,336}} : The total number of IPv6 addresses generally given to a local Internet registry. In CIDR notation, ISPs are given a {{IPaddr||32}}, which means that {{nowrap|1=128 − 32 = 96}} bits are available for addresses (as opposed to network designation). Thus, 296 addresses.

; 2108 = {{replace|324,518,553,658,426,726,783,156,020,576,256|,|{{px2}}}} : The largest known power of 2 not containing a 9 in decimal. {{OEIS|id=A035064}}

; 2126 = {{replace|85,070,591,730,234,615,865,843,651,857,942,052,864|,|{{px2}}}} : The largest known power of 2 not containing a pair of consecutive equal digits. {{OEIS|id=A050723}}

; {{anchor|340282366920938463463374607431768211456}}{{anchor|340,282,366,920,938,463,463,374,607,431,768,211,456}}2128 = {{replace|340,282,366,920,938,463,463,374,607,431,768,211,456|,|{{px2}}}} : The total number of IP addresses available under IPv6. Also the number of distinct universally unique identifiers (UUIDs).

; 2168 = {{replace|374,144,419,156,711,147,060,143,317,175,368,453,031,918,731,001,856|,|{{px2}}}} : The largest known power of 2 not containing all decimal digits (the digit 2 is missing in this case). {{OEIS|id=A137214}}

; 2192 = {{replace|6,277,101,735,386,680,763,835,789,423,207,666,416,102,355,444,464,034,512,896|,|{{px2}}}} : The total number of different possible keys in the AES 192-bit key space (symmetric cipher).

; {{anchor|862718293348820473429344482784628181556388621521298319395315527974912}}{{anchor|862,718,293,348,820,473,429,344,482,784,628,181,556,388,621,521,298,319,395,315,527,974,912}}2229 = {{replace|862,718,293,348,820,473,429,344,482,784,628,181,556,388,621,521,298,319,395,315,527,974,912|,|{{px2}}}} : 2229 is the largest known power of two containing the least number of zeros relative to its power. It is conjectured by Metin Sariyar that every digit 0 to 9 is inclined to appear an equal number of times in the decimal expansion of power of two as the power increases. {{OEIS|id=A330024}}

; 2256 = {{replace|115,792,089,237,316,195,423,570,985,008,687,907,853,269,984,665,640,564,039,457,584,007,913,129,639,936|,|{{px2}}}} : The total number of different possible keys in the AES 256-bit key space (symmetric cipher).

; 2{{val|1,024}} = {{replace|179,769,313,486,231,590,772,930,...,304,835,356,329,624,224,137,216|,|{{px2}}}} (309 digits) : The maximum number that can fit in a 64-bit IEEE double-precision floating-point format (hence the maximum number that can be represented by many programs, for example Microsoft Excel).

; 2{{val|16,384}} = {{replace|1,189,731,495,357,231,765,085,75...,460,447,027,290,669,964,066,816|,|{{px2}}}} ({{val|4,933}} digits) : The maximum number that can fit in a 128-bit IEEE quadruple-precision floating-point format

; 2{{val|262,144}} = {{replace|16,113,257,174,857,604,736,195,7...,753,862,605,349,934,298,300,416|,|{{px2}}}} ({{val|78,914}} digits) : The maximum number that can fit in a 256-bit IEEE octuple-precision floating-point format

; 2{{val|136,279,841}} = {{replace|8,816,943,275,038,332,655,539,39...,665,555,076,706,219,486,871,552|,|{{px2}}}} ({{val|41,024,320}} digits) : One more than the largest known prime number {{As of|October 2024|lc=on}}.{{cite web|url=https://www.mersenne.org/primes/?press=M136279841|title=Mersenne Prime Discovery – 2136279841−1 is Prime!|website=www.mersenne.org}}

Powers of two in music theory

In musical notation, all unmodified note values have a duration equal to a whole note divided by a power of two; for example a half note (1/2), a quarter note (1/4), an eighth note (1/8) and a sixteenth note (1/16). Dotted or otherwise modified notes have other durations. In time signatures the lower numeral, the beat unit, which can be seen as the denominator of a fraction, is almost always a power of two.

If the ratio of frequencies of two pitches is a power of two, then the interval between those pitches is full octaves. In this case, the corresponding notes have the same name.

The mathematical coincidence 2^{7} \approx (\tfrac{3}{2})^{12}, from \frac{\log3}{\log2} = 1.5849\ldots \approx \frac{19}{12}, closely relates the interval of 7 semitones in equal temperament to a perfect fifth of just intonation: 2^{7/12}\approx 3/2, correct to about 0.1%. The just fifth is the basis of Pythagorean tuning; the difference between twelve just fifths and seven octaves is the Pythagorean comma.

{{cite book

| title = Number theory in science and communication

| author = Manfred Robert Schroeder

| publisher = Springer

| edition = 2nd

| year = 2008

| isbn = 978-3-540-85297-1

| pages = 26–28

| url = https://books.google.com/books?id=2KV2rfP0yWEC&q=coincidence+circle-of-fifths+1024+7-octaves+%22one+part+in+a+thousand%22&pg=PA27

}}

Other properties

File:Binomial_expansion_visualisation.svg is a power of two]]

File:sum_of_powers_of_two_including_fractions.svg

The sum of all {{mvar|n}}-choose binomial coefficients is equal to {{math|2n}}. Consider the set of all {{mvar|n}}-digit binary integers. Its cardinality is {{math|2n}}. It is also the sums of the cardinalities of certain subsets: the subset of integers with no 1s (consisting of a single number, written as {{mvar|n}} 0s), the subset with a single 1, the subset with two 1s, and so on up to the subset with {{mvar|n}} 1s (consisting of the number written as {{mvar|n}} 1s). Each of these is in turn equal to the binomial coefficient indexed by {{mvar|n}} and the number of 1s being considered (for example, there are 10-choose-3 binary numbers with ten digits that include exactly three 1s).

Currently, powers of two are the only known almost perfect numbers.

The cardinality of the power set of a set {{math|a}} is always {{math|2{{abs|a}}}}, where {{math|{{abs|a}}}} is the cardinality of {{math|a}}.

The number of vertices of an {{mvar|n}}-dimensional hypercube is {{math|2n}}. Similarly, the number of {{math|(n − 1)}}-faces of an {{mvar|n}}-dimensional cross-polytope is also {{math|2n}} and the formula for the number of {{mvar|x}}-faces an {{mvar|n}}-dimensional cross-polytope has is 2^x \tbinom{n}{x}.

The sum of the first n powers of two (starting from 1 = 2^{0}) is given by

: \sum_{k=0}^{n-1} 2^k = 2^0 + 2^1 + 2^2 + \cdots + 2^{n-1} = 2^{n}-1

for n being any positive integer.

Thus, the sum of the powers

: 1 + 2^1 + 2^2 + \cdots + 2^{63}

can be computed simply by evaluating: 2^{64}-1 (which is the "chess number").

The sum of the reciprocals of the powers of two is 1. The sum of the reciprocals of the squared powers of two (powers of four) is 1/3.

The smallest natural power of two whose decimal representation begins with 7 is

{{cite web

|url = http://www.deltami.edu.pl/temat/matematyka/teoria_liczb/2011/03/07/O_potegach_dwojki/

|title = O potęgach dwójki (About powers of two)

|author = Paweł Strzelecki

|language = pl

|year = 1994

|publisher = Delta

|url-status = live

|archive-url = https://web.archive.org/web/20160509191813/http://www.deltami.edu.pl/temat/matematyka/teoria_liczb/2011/03/07/O_potegach_dwojki/

|archive-date = 2016-05-09

}}

: 2^{46} = 70\ 368\ 744\ 177\ 664.

Every power of 2 (excluding 1) can be written as the sum of four square numbers in 24 ways. The powers of 2 are the natural numbers greater than 1 that can be written as the sum of four square numbers in the fewest ways.

As a real polynomial, an + bn is irreducible, if and only if n is a power of two. (If n is odd, then an + bn is divisible by a+b, and if n is even but not a power of 2, then n can be written as n = mp, where m is odd, and thus a^n + b^n = (a^p)^m + (b^p)^m, which is divisible by ap + bp.)

But in the domain of complex numbers, the polynomial a^{2n} + b^{2n} (where n ≥ 1) can always be factorized as

a^{2n} + b^{2n} = (a^n + b^ni) \cdot (a^n - b^ni),

even if n is a power of two.

The only known powers of 2 with all digits even are 21 = 2, 22 = 4, 23 = 8, 26 = 64 and 211 = {{val|2048}}.{{cite OEIS|A068994|Powers of 2 with all even digits}} The first 3 powers of 2 with all but last digit odd is 24 = 16, 25 = 32 and 29 = 512. The next such power of 2 of form 2n should have n of at least 6 digits. The only powers of 2 with all digits distinct are 20 = 1 to 215 = {{val|32768}}, 220 = {{val|1048576}} and 229 = {{val|536870912}}.

Negative powers of two

Huffman codes deliver optimal lossless data compression when probabilities of the source symbols are all negative powers of two.[https://www.sciencedirect.com/topics/mathematics/huffman-code Huffman coding], from: Fundamental Data Compression, 2006

See also

References

{{reflist}}

{{-}}

{{Series (mathematics)}}

{{Classes of natural numbers}}

{{Large numbers}}

{{DEFAULTSORT:Power Of Two}}

Category:Binary arithmetic

Category:Integer sequences

Category:Integers

Category:2 (number)