fbpx
Wikipedia

Power of two

A power of two is a number of the form 2n where n is an integer, that is, the result of exponentiation with number two as the base and integer n as the exponent.

Visualization of powers of two from 1 to 1024 (20 to 210)

In a context where only integers are considered, n is restricted to non-negative values,[1] so there are 1, 2, and 2 multiplied by itself a certain number of times.[2]

The first ten powers of 2 for non-negative values of n are:

1, 2, 4, 8, 16, 32, 64, 128, 256, 512, ... (sequence A000079 in the OEIS)

Base of the binary numeral system edit

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 edit

Two to the exponent of n, written as 2n, is the number of ways the bits in a binary word of length n can be arranged. A word, interpreted as an unsigned integer, can represent values from 0 (000...0002) to 2n − 1 (111...1112) inclusively. Corresponding signed integer values 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, giving a maximum value of 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 measure computer memory. A byte is now considered 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, typically of 5 to 32 bits, rather than only an 8-bit unit.) The prefix kilo, in conjunction with byte, may be, and has traditionally been, used, to mean 1,024 (210). However, in general, the term kilo has been used in the International System of Units to mean 1,000 (103). Binary prefixes have been standardized, such as kibi (Ki) meaning 1,024. Nearly all processor registers have sizes that are powers of two, 32 or 64 being very common.

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. The logical block size is almost always a power of two.

Numbers that are not powers of two occur in a number of situations, such as video resolutions, but they are often the sum or product of only two or three powers of two, or powers of two minus one. For example, 640 = 32 × 20, and 480 = 32 × 15. Put another way, they have fairly regular bit patterns.

Mersenne and Fermat primes edit

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 edit

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 n terms of this progression is a prime number (and thus is a Mersenne prime as mentioned above), then this sum times the nth term is a perfect number. For example, the sum of the first 5 terms of the series 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 p divides 496 and it is not amongst these numbers. Assume p q is equal to 16 × 31, or 31 is to q as p is to 16. Now p cannot divide 16 or it would be amongst the numbers 1, 2, 4, 8 or 16. Therefore, 31 cannot divide q. And since 31 does not divide q and q measures 496, the fundamental theorem of arithmetic implies that q must divide 16 and be amongst the numbers 1, 2, 4, 8 or 16. Let q be 4, then p must be 124, which is impossible since by hypothesis p is not amongst the numbers 1, 2, 4, 8, 16, 31, 62, 124 or 248.

Table of values edit

(sequence A000079 in the OEIS)

n 2n n 2n n 2n n 2n
0 1 16 65,536 32 4,294,967,296 48 281,474,976,710,656
1 2 17 131,072 33 8,589,934,592 49 562,949,953,421,312
2 4 18 262,144 34 17,179,869,184 50 1,125,899,906,842,624
3 8 19 524,288 35 34,359,738,368 51 2,251,799,813,685,248
4 16 20 1,048,576 36 68,719,476,736 52 4,503,599,627,370,496
5 32 21 2,097,152 37 137,438,953,472 53 9,007,199,254,740,992
6 64 22 4,194,304 38 274,877,906,944 54 18,014,398,509,481,984
7 128 23 8,388,608 39 549,755,813,888 55 36,028,797,018,963,968
8 256 24 16,777,216 40 1,099,511,627,776 56 72,057,594,037,927,936
9 512 25 33,554,432 41 2,199,023,255,552 57 144,115,188,075,855,872
10 1,024 26 67,108,864 42 4,398,046,511,104 58 288,230,376,151,711,744
11 2,048 27 134,217,728 43 8,796,093,022,208 59 576,460,752,303,423,488
12 4,096 28 268,435,456 44 17,592,186,044,416 60 1,152,921,504,606,846,976
13 8,192 29 536,870,912 45 35,184,372,088,832 61 2,305,843,009,213,693,952
14 16,384 30 1,073,741,824 46 70,368,744,177,664 62 4,611,686,018,427,387,904
15 32,768 31 2,147,483,648 47 140,737,488,355,328 63 9,223,372,036,854,775,808

Last digits edit

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 2k, and the period is the multiplicative order of 2 modulo 5k, which is φ(5k) = 4 × 5k−1 (see Multiplicative group of integers modulo n).[citation needed]

Powers of 1024 edit

(sequence A140300 in the OEIS)

The first few powers of 210 are slightly larger than those same powers of 1000 (103). The powers of 210 values that have less than 25% deviation are listed below:

20 = 1 = 10000 (0% deviation)
210 = 1 024 ≈ 10001 (2.4% deviation)
220 = 1 048 576 ≈ 10002 (4.9% deviation)
230 = 1 073 741 824 ≈ 10003 (7.4% deviation)
240 = 1 099 511 627 776 ≈ 10004 (10.0% deviation)
250 = 1 125 899 906 842 624 ≈ 10005 (12.6% deviation)
260 = 1 152 921 504 606 846 976 ≈ 10006 (15.3% deviation)
270 = 1 180 591 620 717 411 303 424 ≈ 10007 (18.1% deviation)
280 = 1 208 925 819 614 629 174 706 176 ≈ 10008 (20.9% deviation)
290 = 1 237 940 039 285 380 274 899 124 224 ≈ 10009 (23.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.[citation needed]

Powers of two whose exponents are powers of two edit

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 (23), double exponentials of two are common. The first 20 of them are:

n 2n 22n (sequence A001146 in the OEIS) digits
0 1 2 1
1 2 4 1
2 4 16 2
3 8 256 3
4 16 65,536 5
5 32 4,294,967,296 10
6 64 18,​446,​744,​073,​709,​551,​616 20
7 128 340,​282,​366,​920,​938,​463,​463,​374,​607,​431,​768,​211,​456 39
8 256 115,​792,​089,​237,​316,​195,​423,​570,​9...4,​039,​457,​584,​007,​913,​129,​639,​936 78
9 512 13,​407,​807,​929,​942,​597,​099,​574,​02...1,​946,​569,​946,​433,​649,​006,​084,​096 155
10 1,024 179,​769,​313,​486,​231,​590,​772,​930,​5...6,​304,​835,​356,​329,​624,​224,​137,​216 309
11 2,048 32,​317,​006,​071,​311,​007,​300,​714,​87...8,​193,​555,​853,​611,​059,​596,​230,​656 617
12 4,096 1,​044,​388,​881,​413,​152,​506,​691,​752,​...0,​243,​804,​708,​340,​403,​154,​190,​336 1,234
13 8,192 1,​090,​748,​135,​619,​415,​929,​462,​984,​...1,​997,​186,​505,​665,​475,​715,​792,​896 2,467
14 16,384 1,​189,​731,​495,​357,​231,​765,​085,​759,​...2,​460,​447,​027,​290,​669,​964,​066,​816 4,933
15 32,768 1,​415,​461,​031,​044,​954,​789,​001,​553,​...7,​541,​122,​668,​104,​633,​712,​377,​856 9,865
16 65,536 2,​003,​529,​930,​406,​846,​464,​979,​072,​...2,​339,​445,​587,​895,​905,​719,​156,​736 19,729
17 131,072 4,​014,​132,​182,​036,​063,​039,​166,​060,​...1,​850,​665,​812,​318,​570,​934,​173,​696 39,457
18 262,144 16,​113,​257,​174,​857,​604,​736,​195,​72...0,​753,​862,​605,​349,​934,​298,​300,​416 78,914
19 524,288 259,​637,​056,​783,​100,​077,​612,​659,​6...1,​369,​814,​364,​528,​226,​185,​773,​056 157,827

Also see tetration and lower hyperoperations.

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

All of these numbers end in 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 2k, and the period is the multiplicative order of 2 modulo 5k, which is φ(5k) = 4 × 5k−1 (see Multiplicative group of integers modulo n).[citation needed]

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

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

The numbers   form an irrationality sequence: for every sequence   of positive integers, the series

 

converges to an irrational number. Despite the rapid growth of this sequence, it is the slowest-growing irrationality sequence known.[3]

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

Several of these numbers represent the number of values representable using common computer data types. For example, a 32-bit word consisting of 4 bytes can represent 232 distinct values, which can either be regarded as mere bit-patterns, or are more commonly interpreted as the unsigned numbers from 0 to 232 − 1, or as the range of signed numbers between −231 and 231 − 1. For more about representing signed numbers see two's complement.

Selected powers of two edit

22 = 4
The number that is the square of two. Also the first power of two tetration of two.
28 = 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.)
210 = 1,024
The binary approximation of the kilo-, or 1,000 multiplier, which causes a change of prefix. For example: 1,024 bytes = 1 kilobyte (or kibibyte).
212 = 4,096
The hardware page size of an Intel x86-compatible processor.
215 = 32,768
The number of non-negative values for a signed 16-bit integer.
216 = 65,536
The number of distinct values representable in a single word on a 16-bit processor, such as the original x86 processors.[4]
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.
220 = 1,048,576
The binary approximation of the mega-, or 1,000,000 multiplier, which causes a change of prefix. For example: 1,048,576 bytes = 1 megabyte (or mebibyte).
224 = 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, 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.
229 = 536,870,912
The largest power of two with distinct digits in base ten.[5]
230 = 1,073,741,824
The binary approximation of the giga-, or 1,000,000,000 multiplier, which causes a change of prefix. For example, 1,073,741,824 bytes = 1 gigabyte (or gibibyte).
231 = 2,147,483,648
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 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.
232 = 4,294,967,296
The number of distinct values representable in a single word on a 32-bit processor.[6] Or, the number of values representable in a doubleword on a 16-bit processor, such as the original x86 processors.[4]
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).
240 = 1,099,511,627,776
The binary approximation of the tera-, or 1,000,000,000,000 multiplier, which causes a change of prefix. For example, 1,099,511,627,776 bytes = 1 terabyte or tebibyte.
250 = 1,125,899,906,842,624
The binary approximation of the peta-, or 1,000,000,000,000,000 multiplier. 1,125,899,906,842,624 bytes = 1 petabyte or pebibyte.
253 = 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.
256 = 72,057,594,037,927,936
The number of different possible keys in the obsolete 56 bit DES symmetric cipher.
260 = 1,152,921,504,606,846,976
The binary approximation of the exa-, or 1,000,000,000,000,000,000 multiplier. 1,152,921,504,606,846,976 bytes = 1 exabyte or exbibyte.
263 = 9,223,372,036,854,775,808
The number of non-negative values for a signed 64-bit integer.
263 − 1, a common maximum value (equivalently the number of positive values) for a signed 64-bit integer in programming languages.
264 = 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.[4]
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.
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.
268 = 295,147,905,179,352,825,856
The first power of 2 to contain all decimal digits. (sequence A137214 in the OEIS)
270 = 1,180,591,620,717,411,303,424
The binary approximation of the zetta-, or 1,000,000,000,000,000,000,000 multiplier. 1,180,591,620,717,411,303,424 bytes = 1 zettabyte (or zebibyte).
280 = 1,208,925,819,614,629,174,706,176
The binary approximation of the yotta-, or 1,000,000,000,000,000,000,000,000 multiplier. 1,208,925,819,614,629,174,706,176 bytes = 1 yottabyte (or yobibyte).
286 = 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.[7]
296 = 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 /32, which means that 128-32=96 bits are available for addresses (as opposed to network designation). Thus, 296 addresses.
2108 = 324,​518,​553,​658,​426,​726,​783,​156,​020,​576,​256
The largest known power of 2 not containing a 9 in decimal. (sequence A035064 in the OEIS)
2126 = 85,​070,​591,​730,​234,​615,​865,​843,​651,​857,​942,​052,​864
The largest known power of 2 not containing a pair of consecutive equal digits. (sequence A050723 in the OEIS)
2128 = 340,282,366,920,938,463,463,374,607,431,768,211,456
The total number of IP addresses available under IPv6. Also the number of distinct universally unique identifiers (UUIDs).
2168 = 374,144,419,156,711,147,060,143,317,175,368,453,031,918,731,001,856
The largest known power of 2 not containing all decimal digits (the digit 2 is missing in this case). (sequence A137214 in the OEIS)
2192 = 6,277,101,735,386,680,763,835,789,423,207,666,416,102,355,444,464,034,512,896
The total number of different possible keys in the AES 192-bit key space (symmetric cipher).
2229 = 862,718,293,348,820,473,429,344,482,784,628,181,556,388,621,521,298,319,395,315,527,974,912
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. (sequence A330024 in the OEIS)
2256 = 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
The total number of different possible keys in the AES 256-bit key space (symmetric cipher).
21,024 = 179,769,313,486,231,590,772,930,...,304,835,356,329,624,224,137,216
The maximum number that can fit in a 64-bit IEEE double-precision floating-point format (approximately 1.797×10308), and hence the maximum number that can be represented by many programs, for example Microsoft Excel.
216,384 = 1,189,731,495,357,231,765,085,75...,460,447,027,290,669,964,066,816
The maximum number that can fit in a 128-bit IEEE quadruple-precision floating-point format (approximately 1.189×104932).
2262,144 = 16,113,257,174,857,604,736,195,7...,753,862,605,349,934,298,300,416
The maximum number that can fit in a 256-bit IEEE octuple-precision floating-point format (approximately 1.611×1078913).
282,589,933 = 1,488,944,457,420,413,255,478,06...,074,037,951,210,325,217,902,592
One more than the largest known prime number as of June 2023. It has 24,862,048 digits.[8]

Powers of two in music theory edit

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.

Other properties edit

 
As each increase in dimension doubles the number of shapes, the sum of coefficients on each row of Pascal's triangle is a power of two
 
The sum of powers of two from zero to a given power, inclusive, is 1 less than the next power of two, whereas the sum of powers of two from minus-infinity to a given power, inclusive, equals the next power of two

The sum of all n-choose binomial coefficients is equal to 2n. Consider the set of all n-digit binary integers. Its cardinality is 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 n 0s), the subset with a single 1, the subset with two 1s, and so on up to the subset with n 1s (consisting of the number written as n 1s). Each of these is in turn equal to the binomial coefficient indexed by 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 number of vertices of an n-dimensional hypercube is 2n. Similarly, the number of (n − 1)-faces of an n-dimensional cross-polytope is also 2n and the formula for the number of x-faces an n-dimensional cross-polytope has is  

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[9]

 

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+n, 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  , which is divisible by ap + bp.) But in the domain of complex numbers, the polynomial   (where n>=1) can always be factorized as  , even if n is a power of two.

See also edit

References edit

  1. ^ Lipschutz, Seymour (1982). Schaum's Outline of Theory and Problems of Essential Computer Mathematics. New York: McGraw-Hill. p. 3. ISBN 0-07-037990-4.
  2. ^ Sewell, Michael J. (1997). Mathematics Masterclasses. Oxford: Oxford University Press. p. 78. ISBN 0-19-851494-8.
  3. ^ Guy, Richard K. (2004), "E24 Irrationality sequences", Unsolved problems in number theory (3rd ed.), Springer-Verlag, p. 346, ISBN 0-387-20860-7, Zbl 1058.11001, from the original on 2016-04-28
  4. ^ a b c 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
  5. ^ Prime Curios!: 536870912 "Prime Curios! 536870912". from the original on 2017-09-05. Retrieved 2017-09-05.
  6. ^ . www.vaughns-1-pagers.com. Archived from the original on August 12, 2015.
  7. ^ Weisstein, Eric W. "Zero." From MathWorld--A Wolfram Web Resource. "Zero". from the original on 2013-06-01. Retrieved 2013-05-29.
  8. ^ "Mersenne Prime Discovery - 2^82589933-1 is Prime!". www.mersenne.org.
  9. ^ Paweł Strzelecki (1994). "O potęgach dwójki (About powers of two)" (in Polish). Delta. from the original on 2016-05-09.

power, other, uses, disambiguation, power, number, form, where, integer, that, result, exponentiation, with, number, base, integer, exponent, visualization, powers, from, 1024, context, where, only, integers, considered, restricted, negative, values, there, mu. For other uses see Power of two disambiguation A power of two is a number of the form 2n where n is an integer that is the result of exponentiation with number two as the base and integer n as the exponent Visualization of powers of two from 1 to 1024 20 to 210 In a context where only integers are considered n is restricted to non negative values 1 so there are 1 2 and 2 multiplied by itself a certain number of times 2 The first ten powers of 2 for non negative values of n are 1 2 4 8 16 32 64 128 256 512 sequence A000079 in the OEIS Contents 1 Base of the binary numeral system 2 Computer science 3 Mersenne and Fermat primes 4 Euclid s Elements Book IX 5 Table of values 5 1 Last digits 6 Powers of 1024 7 Powers of two whose exponents are powers of two 7 1 Last digits for powers of two whose exponents are powers of two 7 2 Facts about powers of two whose exponents are powers of two 7 3 Powers of two whose exponents are powers of two in computer science 8 Selected powers of two 9 Powers of two in music theory 10 Other properties 11 See also 12 ReferencesBase of the binary numeral system editBecause 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 editTwo to the exponent of n written as 2n is the number of ways the bits in a binary word of length n can be arranged A word interpreted as an unsigned integer can represent values from 0 000 0002 to 2n 1 111 1112 inclusively Corresponding signed integer values 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 giving a maximum value of 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 measure computer memory A byte is now considered 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 typically of 5 to 32 bits rather than only an 8 bit unit The prefix kilo in conjunction with byte may be and has traditionally been used to mean 1 024 210 However in general the term kilo has been used in the International System of Units to mean 1 000 103 Binary prefixes have been standardized such as kibi Ki meaning 1 024 Nearly all processor registers have sizes that are powers of two 32 or 64 being very common 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 The logical block size is almost always a power of two Numbers that are not powers of two occur in a number of situations such as video resolutions but they are often the sum or product of only two or three powers of two or powers of two minus one For example 640 32 20 and 480 32 15 Put another way they have fairly regular bit patterns Mersenne and Fermat primes editA 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 editThe 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 n terms of this progression is a prime number and thus is a Mersenne prime as mentioned above then this sum times the n th term is a perfect number For example the sum of the first 5 terms of the series 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 p divides 496 and it is not amongst these numbers Assume p q is equal to 16 31 or 31 is to q as p is to 16 Now p cannot divide 16 or it would be amongst the numbers 1 2 4 8 or 16 Therefore 31 cannot divide q And since 31 does not divide q and q measures 496 the fundamental theorem of arithmetic implies that q must divide 16 and be amongst the numbers 1 2 4 8 or 16 Let q be 4 then p must be 124 which is impossible since by hypothesis p is not amongst the numbers 1 2 4 8 16 31 62 124 or 248 Table of values edit sequence A000079 in the OEIS n 2n n 2n n 2n n 2n0 1 16 65 536 32 4 294 967 296 48 281 474 976 710 6561 2 17 131 072 33 8 589 934 592 49 562 949 953 421 3122 4 18 262 144 34 17 179 869 184 50 1 125 899 906 842 6243 8 19 524 288 35 34 359 738 368 51 2 251 799 813 685 2484 16 20 1 048 576 36 68 719 476 736 52 4 503 599 627 370 4965 32 21 2 097 152 37 137 438 953 472 53 9 007 199 254 740 9926 64 22 4 194 304 38 274 877 906 944 54 18 014 398 509 481 9847 128 23 8 388 608 39 549 755 813 888 55 36 028 797 018 963 9688 256 24 16 777 216 40 1 099 511 627 776 56 72 057 594 037 927 9369 512 25 33 554 432 41 2 199 023 255 552 57 144 115 188 075 855 87210 1 024 26 67 108 864 42 4 398 046 511 104 58 288 230 376 151 711 74411 2 048 27 134 217 728 43 8 796 093 022 208 59 576 460 752 303 423 48812 4 096 28 268 435 456 44 17 592 186 044 416 60 1 152 921 504 606 846 97613 8 192 29 536 870 912 45 35 184 372 088 832 61 2 305 843 009 213 693 95214 16 384 30 1 073 741 824 46 70 368 744 177 664 62 4 611 686 018 427 387 90415 32 768 31 2 147 483 648 47 140 737 488 355 328 63 9 223 372 036 854 775 808Last digits edit 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 2k and the period is the multiplicative order of 2 modulo 5k which is f 5k 4 5k 1 see Multiplicative group of integers modulo n citation needed Powers of 1024 edit sequence A140300 in the OEIS The first few powers of 210 are slightly larger than those same powers of 1000 103 The powers of 210 values that have less than 25 deviation are listed below 20 1 10000 0 deviation 210 1 024 10001 2 4 deviation 220 1 048 576 10002 4 9 deviation 230 1 073 741 824 10003 7 4 deviation 240 1 099 511 627 776 10004 10 0 deviation 250 1 125 899 906 842 624 10005 12 6 deviation 260 1 152 921 504 606 846 976 10006 15 3 deviation 270 1 180 591 620 717 411 303 424 10007 18 1 deviation 280 1 208 925 819 614 629 174 706 176 10008 20 9 deviation 290 1 237 940 039 285 380 274 899 124 224 10009 23 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 citation needed See also Binary prefixes and IEEE 1541 2002Powers of two whose exponents are powers of two editBecause data specifically integers and the addresses of data are stored using the same hardware and the data is stored in one or more octets 23 double exponentials of two are common The first 20 of them are n 2n 22n sequence A001146 in the OEIS digits0 1 2 11 2 4 12 4 16 23 8 256 34 16 65 536 55 32 4 294 967 296 106 64 18 wbr 446 wbr 744 wbr 073 wbr 709 wbr 551 wbr 616 207 128 340 wbr 282 wbr 366 wbr 920 wbr 938 wbr 463 wbr 463 wbr 374 wbr 607 wbr 431 wbr 768 wbr 211 wbr 456 398 256 115 wbr 792 wbr 089 wbr 237 wbr 316 wbr 195 wbr 423 wbr 570 wbr 9 4 wbr 039 wbr 457 wbr 584 wbr 007 wbr 913 wbr 129 wbr 639 wbr 936 789 512 13 wbr 407 wbr 807 wbr 929 wbr 942 wbr 597 wbr 099 wbr 574 wbr 02 1 wbr 946 wbr 569 wbr 946 wbr 433 wbr 649 wbr 006 wbr 084 wbr 096 15510 1 024 179 wbr 769 wbr 313 wbr 486 wbr 231 wbr 590 wbr 772 wbr 930 wbr 5 6 wbr 304 wbr 835 wbr 356 wbr 329 wbr 624 wbr 224 wbr 137 wbr 216 30911 2 048 32 wbr 317 wbr 006 wbr 071 wbr 311 wbr 007 wbr 300 wbr 714 wbr 87 8 wbr 193 wbr 555 wbr 853 wbr 611 wbr 059 wbr 596 wbr 230 wbr 656 61712 4 096 1 wbr 044 wbr 388 wbr 881 wbr 413 wbr 152 wbr 506 wbr 691 wbr 752 wbr 0 wbr 243 wbr 804 wbr 708 wbr 340 wbr 403 wbr 154 wbr 190 wbr 336 1 23413 8 192 1 wbr 090 wbr 748 wbr 135 wbr 619 wbr 415 wbr 929 wbr 462 wbr 984 wbr 1 wbr 997 wbr 186 wbr 505 wbr 665 wbr 475 wbr 715 wbr 792 wbr 896 2 46714 16 384 1 wbr 189 wbr 731 wbr 495 wbr 357 wbr 231 wbr 765 wbr 085 wbr 759 wbr 2 wbr 460 wbr 447 wbr 027 wbr 290 wbr 669 wbr 964 wbr 066 wbr 816 4 93315 32 768 1 wbr 415 wbr 461 wbr 031 wbr 044 wbr 954 wbr 789 wbr 001 wbr 553 wbr 7 wbr 541 wbr 122 wbr 668 wbr 104 wbr 633 wbr 712 wbr 377 wbr 856 9 86516 65 536 2 wbr 003 wbr 529 wbr 930 wbr 406 wbr 846 wbr 464 wbr 979 wbr 072 wbr 2 wbr 339 wbr 445 wbr 587 wbr 895 wbr 905 wbr 719 wbr 156 wbr 736 19 72917 131 072 4 wbr 014 wbr 132 wbr 182 wbr 036 wbr 063 wbr 039 wbr 166 wbr 060 wbr 1 wbr 850 wbr 665 wbr 812 wbr 318 wbr 570 wbr 934 wbr 173 wbr 696 39 45718 262 144 16 wbr 113 wbr 257 wbr 174 wbr 857 wbr 604 wbr 736 wbr 195 wbr 72 0 wbr 753 wbr 862 wbr 605 wbr 349 wbr 934 wbr 298 wbr 300 wbr 416 78 91419 524 288 259 wbr 637 wbr 056 wbr 783 wbr 100 wbr 077 wbr 612 wbr 659 wbr 6 1 wbr 369 wbr 814 wbr 364 wbr 528 wbr 226 wbr 185 wbr 773 wbr 056 157 827Also see tetration and lower hyperoperations Last digits for powers of two whose exponents are powers of two edit All of these numbers end in 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 2k and the period is the multiplicative order of 2 modulo 5k which is f 5k 4 5k 1 see Multiplicative group of integers modulo n citation needed Facts about powers of two whose exponents are powers of two edit In a connection with nimbers these numbers are often called Fermat 2 powers The numbers 2 2 n displaystyle 2 2 n nbsp form an irrationality sequence for every sequence x i displaystyle x i nbsp of positive integers the series i 0 1 2 2 i x i 1 2 x 0 1 4 x 1 1 16 x 2 displaystyle sum i 0 infty frac 1 2 2 i x i frac 1 2x 0 frac 1 4x 1 frac 1 16x 2 cdots nbsp converges to an irrational number Despite the rapid growth of this sequence it is the slowest growing irrationality sequence known 3 Powers of two whose exponents are powers of two in computer science edit Several of these numbers represent the number of values representable using common computer data types For example a 32 bit word consisting of 4 bytes can represent 232 distinct values which can either be regarded as mere bit patterns or are more commonly interpreted as the unsigned numbers from 0 to 232 1 or as the range of signed numbers between 231 and 231 1 For more about representing signed numbers see two s complement Selected powers of two edit22 4 The number that is the square of two Also the first power of two tetration of two 28 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 210 1 024 The binary approximation of the kilo or 1 000 multiplier which causes a change of prefix For example 1 024 bytes 1 kilobyte or kibibyte 212 4 096 The hardware page size of an Intel x86 compatible processor 215 32 768 The number of non negative values for a signed 16 bit integer 216 65 536Main article 65 536 The number of distinct values representable in a single word on a 16 bit processor such as the original x86 processors 4 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 220 1 048 576 The binary approximation of the mega or 1 000 000 multiplier which causes a change of prefix For example 1 048 576 bytes 1 megabyte or mebibyte 224 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 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 229 536 870 912 The largest power of two with distinct digits in base ten 5 230 1 073 741 824 The binary approximation of the giga or 1 000 000 000 multiplier which causes a change of prefix For example 1 073 741 824 bytes 1 gigabyte or gibibyte 231 2 147 483 648See 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 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 232 4 294 967 296See also 4 294 967 295 The number of distinct values representable in a single word on a 32 bit processor 6 Or the number of values representable in a doubleword on a 16 bit processor such as the original x86 processors 4 The range of an a href Integer computer science html title Integer computer science int a 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 240 1 099 511 627 776 The binary approximation of the tera or 1 000 000 000 000 multiplier which causes a change of prefix For example 1 099 511 627 776 bytes 1 terabyte or tebibyte 250 1 125 899 906 842 624 The binary approximation of the peta or 1 000 000 000 000 000 multiplier 1 125 899 906 842 624 bytes 1 petabyte or pebibyte 253 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 256 72 057 594 037 927 936 The number of different possible keys in the obsolete 56 bit DES symmetric cipher 260 1 152 921 504 606 846 976 The binary approximation of the exa or 1 000 000 000 000 000 000 multiplier 1 152 921 504 606 846 976 bytes 1 exabyte or exbibyte 263 9 223 372 036 854 775 808 The number of non negative values for a signed 64 bit integer 263 1 a common maximum value equivalently the number of positive values for a signed 64 bit integer in programming languages 264 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 4 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 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 268 295 147 905 179 352 825 856 The first power of 2 to contain all decimal digits sequence A137214 in the OEIS 270 1 180 591 620 717 411 303 424 The binary approximation of the zetta or 1 000 000 000 000 000 000 000 multiplier 1 180 591 620 717 411 303 424 bytes 1 zettabyte or zebibyte 280 1 208 925 819 614 629 174 706 176 The binary approximation of the yotta or 1 000 000 000 000 000 000 000 000 multiplier 1 208 925 819 614 629 174 706 176 bytes 1 yottabyte or yobibyte 286 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 7 296 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 32 which means that 128 32 96 bits are available for addresses as opposed to network designation Thus 296 addresses 2108 324 wbr 518 wbr 553 wbr 658 wbr 426 wbr 726 wbr 783 wbr 156 wbr 020 wbr 576 wbr 256 The largest known power of 2 not containing a 9 in decimal sequence A035064 in the OEIS 2126 85 wbr 070 wbr 591 wbr 730 wbr 234 wbr 615 wbr 865 wbr 843 wbr 651 wbr 857 wbr 942 wbr 052 wbr 864 The largest known power of 2 not containing a pair of consecutive equal digits sequence A050723 in the OEIS 2128 340 282 366 920 938 463 463 374 607 431 768 211 456 The total number of IP addresses available under IPv6 Also the number of distinct universally unique identifiers UUIDs 2168 374 144 419 156 711 147 060 143 317 175 368 453 031 918 731 001 856 The largest known power of 2 not containing all decimal digits the digit 2 is missing in this case sequence A137214 in the OEIS 2192 6 277 101 735 386 680 763 835 789 423 207 666 416 102 355 444 464 034 512 896 The total number of different possible keys in the AES 192 bit key space symmetric cipher 2229 862 718 293 348 820 473 429 344 482 784 628 181 556 388 621 521 298 319 395 315 527 974 912 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 sequence A330024 in the OEIS 2256 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 The total number of different possible keys in the AES 256 bit key space symmetric cipher 21 024 179 769 313 486 231 590 772 930 304 835 356 329 624 224 137 216 The maximum number that can fit in a 64 bit IEEE double precision floating point format approximately 1 797 10308 and hence the maximum number that can be represented by many programs for example Microsoft Excel 216 384 1 189 731 495 357 231 765 085 75 460 447 027 290 669 964 066 816 The maximum number that can fit in a 128 bit IEEE quadruple precision floating point format approximately 1 189 104932 2262 144 16 113 257 174 857 604 736 195 7 753 862 605 349 934 298 300 416 The maximum number that can fit in a 256 bit IEEE octuple precision floating point format approximately 1 611 1078913 282 589 933 1 488 944 457 420 413 255 478 06 074 037 951 210 325 217 902 592 One more than the largest known prime number as of June 2023 update It has 24 862 048 digits 8 Powers of two in music theory editIn 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 Other properties edit nbsp As each increase in dimension doubles the number of shapes the sum of coefficients on each row of Pascal s triangle is a power of two nbsp The sum of powers of two from zero to a given power inclusive is 1 less than the next power of two whereas the sum of powers of two from minus infinity to a given power inclusive equals the next power of twoThe sum of all n choose binomial coefficients is equal to 2n Consider the set of all n digit binary integers Its cardinality is 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 n 0s the subset with a single 1 the subset with two 1s and so on up to the subset with n 1s consisting of the number written as n 1s Each of these is in turn equal to the binomial coefficient indexed by 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 number of vertices of an n dimensional hypercube is 2n Similarly the number of n 1 faces of an n dimensional cross polytope is also 2n and the formula for the number of x faces an n dimensional cross polytope has is 2 x n x displaystyle 2 x tbinom n x nbsp 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 9 2 46 70 368 744 177 664 displaystyle 2 46 70 368 744 177 664 nbsp 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 n 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 displaystyle a n b n a p m b p m nbsp which is divisible by ap bp But in the domain of complex numbers the polynomial a 2 n b 2 n displaystyle a 2n b 2n nbsp where n gt 1 can always be factorized as a 2 n b 2 n a n b n i a n b n i displaystyle a 2n b 2n a n b n i cdot a n b n i nbsp even if n is a power of two See also editFermi Dirac prime Gould s sequence Binary logarithm Power of three Power of 10References edit Lipschutz Seymour 1982 Schaum s Outline of Theory and Problems of Essential Computer Mathematics New York McGraw Hill p 3 ISBN 0 07 037990 4 Sewell Michael J 1997 Mathematics Masterclasses Oxford Oxford University Press p 78 ISBN 0 19 851494 8 Guy Richard K 2004 E24 Irrationality sequences Unsolved problems in number theory 3rd ed Springer Verlag p 346 ISBN 0 387 20860 7 Zbl 1058 11001 archived from the original on 2016 04 28 a b c 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 Prime Curios 536870912 Prime Curios 536870912 Archived from the original on 2017 09 05 Retrieved 2017 09 05 Powers of 2 Table Vaughn s Summaries www vaughns 1 pagers com Archived from the original on August 12 2015 Weisstein Eric W Zero From MathWorld A Wolfram Web Resource Zero Archived from the original on 2013 06 01 Retrieved 2013 05 29 Mersenne Prime Discovery 2 82589933 1 is Prime www mersenne org Pawel Strzelecki 1994 O potegach dwojki About powers of two in Polish Delta Archived from the original on 2016 05 09 Retrieved from https en wikipedia org w index php title Power of two amp oldid 1186279418, wikipedia, wiki, book, books, library,

article

, read, download, free, free download, mp3, video, mp4, 3gp, jpg, jpeg, gif, png, picture, music, song, movie, book, game, games.