Misplaced Pages

Power of two

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
(Redirected from 1048576 (number)) Two raised to an integer power For other uses, see Power of two (disambiguation).
Visualization of powers of two from 1 to 1024 (2 to 2) as base-2 Dienes blocks

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

Powers of two with non-negative exponents are integers: 2 = 1, 2 = 2, and 2 is two multiplied by itself n times. 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)

By comparison, powers of two with negative exponents are fractions: for positive integer n, 2 is one half multiplied by itself n times. Thus the first few negative powers of 2 are ⁠1/2⁠, ⁠1/4⁠, ⁠1/8⁠, ⁠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 n, written as 2, is the number of values in which the bits in a binary word of length 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 (000...0002) to 2 − 1 (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 0 to 2 − 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 (2). (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 1024 (2). However, in general, the term kilo has been used in the International System of Units to mean 1000 (10). Binary prefixes have been standardized, such as kibi (Ki) meaning 1024. 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. 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, 640 = 128 × 5, and 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 (2). 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 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 pq 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 among 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.

First 64 powers of two

(sequence A000079 in the OEIS)

n 2 n 2 n 2 n 2
0 1 16 65536 32 4294967296 48 281474976710656
1 2 17 131072 33 8589934592 49 562949953421312
2 4 18 262144 34 17179869184 50 1125899906842624
3 8 19 524288 35 34359738368 51 2251799813685248
4 16 20 1048576 36 68719476736 52 4503599627370496
5 32 21 2097152 37 137438953472 53 9007199254740992
6 64 22 4194304 38 274877906944 54 18014398509481984
7 128 23 8388608 39 549755813888 55 36028797018963968
8 256 24 16777216 40 1099511627776 56 72057594037927936
9 512 25 33554432 41 2199023255552 57 144115188075855872
10 1024 26 67108864 42 4398046511104 58 288230376151711744
11 2048 27 134217728 43 8796093022208 59 576460752303423488
12 4096 28 268435456 44 17592186044416 60 1152921504606846976
13 8192 29 536870912 45 35184372088832 61 2305843009213693952
14 16384 30 1073741824 46 70368744177664 62 4611686018427387904
15 32768 31 2147483648 47 140737488355328 63 9223372036854775808

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

Powers of 1024

(sequence A140300 in the OEIS)

The first few powers of 2 are slightly larger than those same powers of 1000 (10). The first 11 powers of 2 values are listed below:

2 = 1 = 1000 (0% deviation)
2 = 1024 ≈ 1000 (2.4% deviation)
2 = 1048576 ≈ 1000 (4.9% deviation)
2 = 1073741824 ≈ 1000 (7.4% deviation)
2 = 1099511627776 ≈ 1000 (10.0% deviation)
2 = 1125899906842624 ≈ 1000 (12.6% deviation)
2 = 1152921504606846976 ≈ 1000 (15.3% deviation)
2 = 1180591620717411303424 ≈ 1000 (18.1% deviation)
2 = 1208925819614629174706176 ≈ 1000 (20.9% deviation)
2 = 1237940039285380274899124224 ≈ 1000 (23.8% deviation)
2 = 1267650600228229401496703205376 ≈ 1000 (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. 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 (2), double exponentials of two are common. The first 21 of them are:

n 2 2 (sequence A001146 in the OEIS) digits
0 1 2 1
1 2 4 1
2 4 16 2
3 8 256 3
4 16 65536 5
5 32 4294967296 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‍...‍039‍457‍584‍007‍913‍129‍639‍936 78
9 512 13‍407‍807‍929‍942‍597‍099‍574‍0...‍946‍569‍946‍433‍649‍006‍084‍096 155
10 1024 179‍769‍313‍486‍231‍590‍772‍930‍...‍304‍835‍356‍329‍624‍224‍137‍216 309
11 2048 32‍317‍006‍071‍311‍007‍300‍714‍8...‍193‍555‍853‍611‍059‍596‍230‍656 617
12 4096 1‍044‍388‍881‍413‍152‍506‍691‍75...‍243‍804‍708‍340‍403‍154‍190‍336 1234
13 8192 1‍090‍748‍135‍619‍415‍929‍462‍98...‍997‍186‍505‍665‍475‍715‍792‍896 2467
14 16384 1‍189‍731‍495‍357‍231‍765‍085‍75...‍460‍447‍027‍290‍669‍964‍066‍816 4933
15 32768 1‍415‍461‍031‍044‍954‍789‍001‍55...‍541‍122‍668‍104‍633‍712‍377‍856 9865
16 65536 2‍003‍529‍930‍406‍846‍464‍979‍07...‍339‍445‍587‍895‍905‍719‍156‍736 19729
17 131072 4‍014‍132‍182‍036‍063‍039‍166‍06...‍850‍665‍812‍318‍570‍934‍173‍696 39457
18 262144 16‍113‍257‍174‍857‍604‍736‍195‍7...‍753‍862‍605‍349‍934‍298‍300‍416 78914
19 524288 259‍637‍056‍783‍100‍077‍612‍659‍...‍369‍814‍364‍528‍226‍185‍773‍056 157827
20 1048576 67‍411‍401‍254‍990‍734‍022‍690‍6...‍009‍289‍119‍068‍940‍335‍579‍136 315653

Also see Fermat number, Tetration and 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 2, and the period is the multiplicative order of 2 modulo 5, which is φ(5) = 4 × 5 (see Multiplicative group of integers modulo n).

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 {\displaystyle 2^{2^{n}}} form an irrationality sequence: for every sequence x i {\displaystyle x_{i}} 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 }

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

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 2 distinct values, which can either be regarded as mere bit-patterns, or are more commonly interpreted as the unsigned numbers from 0 to 2 − 1, or as the range of signed numbers between −2 and 2 − 1. For more about representing signed numbers see Two's complement.

Selected powers of two

2 = 4
The number that is the square of two. Also the first power of two tetration of two.
2 = 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.)
2 = 1024
The binary approximation of the kilo-, or 1000 multiplier, which causes a change of prefix. For example: 1024 bytes = 1 kilobyte (or kibibyte).
2 = 4096
The hardware page size of an Intel x86-compatible processor.
2 = 32768
The number of non-negative values for a signed 16-bit integer.
2 = 65536
Main article: 65,536
The number of distinct values representable in a single word on a 16-bit processor, such as the original x86 processors.
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.
2 = 1048576
The binary approximation of the mega-, or 1000000 multiplier, which causes a change of prefix. For example: 1048576 bytes = 1 megabyte (or mebibyte).
2 = 16777216
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, 16777216, can be determined by 16 (6 digits with 16 possible values for each), 256 (3 channels with 256 possible values for each), or 2 (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.
2 = 1073741824
The binary approximation of the giga-, or 1000000000 multiplier, which causes a change of prefix. For example, 1073741824 bytes = 1 gigabyte (or gibibyte).
2 = 2147483648 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 2147483647 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.
2 = 4294967296
See also: 4,294,967,295
The number of distinct values representable in a single word on a 32-bit processor. 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).
2 = 1099511627776
The binary approximation of the tera-, or 1000000000000 multiplier, which causes a change of prefix. For example, 1099511627776 bytes = 1 terabyte or tebibyte.
2 = 1125899906842624
The binary approximation of the peta-, or 1000000000000000 multiplier. 1125899906842624 bytes = 1 petabyte or pebibyte.
2 = 9007199254740992
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.
2 = 72057594037927936
The number of different possible keys in the obsolete 56 bit DES symmetric cipher.
2 = 1152921504606846976
The binary approximation of the exa-, or 1000000000000000000 multiplier. 1152921504606846976 bytes = 1 exabyte or exbibyte.
2 = 9223372036854775808
The number of non-negative values for a signed 64-bit integer.
2 − 1, a common maximum value (equivalently the number of positive values) for a signed 64-bit integer in programming languages.
2 = 18446744073709551616
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.
2 − 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".
2 − 1 is also the number of moves required to complete the legendary 64-disk version of the Tower of Hanoi.
2 = 295147905179352825856
The first power of 2 to contain all decimal digits. (sequence A137214 in the OEIS)
2 = 1180591620717411303424
The binary approximation of the zetta-, or 1000000000000000000000 multiplier. 1180591620717411303424 bytes = 1 zettabyte (or zebibyte).
2 = 1208925819614629174706176
The binary approximation of the yotta-, or 1000000000000000000000000 multiplier. 1208925819614629174706176 bytes = 1 yottabyte (or yobibyte).
2 = 77371252455336267181195264
2 is conjectured to be the largest power of two not containing a zero in decimal.
2 = 79228162514264337593543950336
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, 2 addresses.
2 = 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)
2 = 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)
2 = 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).
2 = 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)
2 = 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).
2 = 862‍718‍293‍348‍820‍473‍429‍344‍482‍784‍628‍181‍556‍388‍621‍521‍298‍319‍395‍315‍527‍974‍912
2 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)
2 = 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).
2 = 179‍769‍313‍486‍231‍590‍772‍930‍...‍304‍835‍356‍329‍624‍224‍137‍216 (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 = 1‍189‍731‍495‍357‍231‍765‍085‍75...‍460‍447‍027‍290‍669‍964‍066‍816 (4933 digits)
The maximum number that can fit in a 128-bit IEEE quadruple-precision floating-point format
2 = 16‍113‍257‍174‍857‍604‍736‍195‍7...‍753‍862‍605‍349‍934‍298‍300‍416 (78914 digits)
The maximum number that can fit in a 256-bit IEEE octuple-precision floating-point format
2 = 8‍816‍943‍275‍038‍332‍655‍539‍39...‍665‍555‍076‍706‍219‍486‍871‍552 (41024320 digits)
One more than the largest known prime number as of October 2024.

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 ( 3 2 ) 12 {\displaystyle 2^{7}\approx ({\tfrac {3}{2}})^{12}} , from log 3 log 2 = 1.5849 19 12 {\displaystyle {\frac {\log 3}{\log 2}}=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 3 / 2 {\displaystyle 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.

Other properties

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 negative infinity to a given power, inclusive, equals the next power of two.

The sum of all n-choose binomial coefficients is equal to 2. Consider the set of all n-digit binary integers. Its cardinality is 2. 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 cardinality of the power set of a set a is always 2, where |a| is the cardinality of a.

The number of vertices of an n-dimensional hypercube is 2. Similarly, the number of (n − 1)-faces of an n-dimensional cross-polytope is also 2 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}}.}

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

k = 0 n 1 2 k = 2 0 + 2 1 + 2 2 + + 2 n 1 = 2 n 1 {\displaystyle \sum _{k=0}^{n-1}2^{k}=2^{0}+2^{1}+2^{2}+\cdots +2^{n-1}=2^{n}-1}

for n {\displaystyle n} being any positive integer.

Thus, the sum of the powers

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

can be computed simply by evaluating: 2 64 1 {\displaystyle 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

2 46 = 70   368   744   177   664. {\displaystyle 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, a + b is irreducible, if and only if n is a power of two. (If n is odd, then a + b 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 {\displaystyle a^{n}+b^{n}=(a^{p})^{m}+(b^{p})^{m}} , which is divisible by a + b.) But in the domain of complex numbers, the polynomial a 2 n + b 2 n {\displaystyle a^{2n}+b^{2n}} (where n ≥ 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)} , even if n is a power of two.

The only known powers of 2 with all digits even are 2 = 2, 2 = 4, 2 = 8, 2 = 64 and 2 = 2048. The first 3 powers of 2 with all but last digit odd is 2 = 16, 2 = 32 and 2 = 512. The next such power of 2 of form 2 should have n of at least 6 digits. The only powers of 2 with all digits distinct are 2 = 1 to 2 = 32768, 2 = 1048576 and 2 = 536870912.

Negative powers of two

Huffman codes deliver optimal lossless data compression when probabilities of the source symbols are all negative powers of two.

See also

References

  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. log 1024 / 1000 1.5 17.1 , {\displaystyle \log _{1024/1000}1.5\approx 17.1,} log 1024 / 1000 2 29.2. {\displaystyle \log _{1024/1000}2\approx 29.2.}
  4. 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
  5. ^ Fortner, Brand (1995). "Byte Numbers". The Data Handbook (2nd ed.). New York: Springer; TELOS. Ch. 2, § "Kilobytes and Megabytes", p. 25. doi:10.1007/978-1-4612-2538-6_3. ISBN 978-1-4612-7572-5. 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, or 1024, bytes. So 32K bytes is actually equal to 32 × 1024, or 32768, bytes. A megabyte is correspondingly defined as 2, or 1,048,576, bytes. Therefore, 32 megabytes (32M bytes) equals 33554432 bytes. Sammes, Tony; Jenkinson, Brian (2007). "Understanding Information". Forensic Computing (2nd ed.). London: Springer. pp. 7–48. doi:10.1007/978-1-84628-732-9_2. ISBN 978-1-84628-397-0. 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 = 1024 bytes; a megabyte is 2 = 1048576 bytes; a gigabyte is 2 = 1073741824 bytes; a terabyte is 2 = 1099511627776 bytes; and a petabyte is 2 = 1125899906842624 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.
  6. ^ 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
  7. "Powers of 2 Table – Vaughn's Summaries". www.vaughns-1-pagers.com. Archived from the original on August 12, 2015.
  8. Weisstein, Eric W. "Zero". From MathWorld. "Zero". Archived from the original on 2013-06-01. Retrieved 2013-05-29.
  9. "Mersenne Prime Discovery – 2−1 is Prime!". www.mersenne.org.
  10. Manfred Robert Schroeder (2008). Number theory in science and communication (2nd ed.). Springer. pp. 26–28. ISBN 978-3-540-85297-1.
  11. Paweł Strzelecki (1994). "O potęgach dwójki (About powers of two)" (in Polish). Delta. Archived from the original on 2016-05-09.
  12. Sloane, N. J. A. (ed.). "Sequence A068994 (Powers of 2 with all even digits)". The On-Line Encyclopedia of Integer Sequences. OEIS Foundation.
  13. Huffman coding, from: Fundamental Data Compression, 2006
Sequences and series
Integer sequences
Basic
Advanced (list)
Fibonacci spiral with square sizes up to 34.
Properties of sequences
Properties of series
Series
Convergence
Explicit series
Convergent
Divergent
Kinds of series
Hypergeometric series
Classes of natural numbers
Powers and related numbers
Of the form a × 2 ± 1
Other polynomial numbers
Recursively defined numbers
Possessing a specific set of other numbers
Expressible via specific sums
Figurate numbers
2-dimensional
centered
non-centered
3-dimensional
centered
non-centered
pyramidal
4-dimensional
non-centered
Combinatorial numbers
Primes
Pseudoprimes
Arithmetic functions and dynamics
Divisor functions
Prime omega functions
Euler's totient function
Aliquot sequences
Primorial
Other prime factor or divisor related numbers
Numeral system-dependent numbers
Arithmetic functions
and dynamics
Digit sum
Digit product
Coding-related
Other
P-adic numbers-related
Digit-composition related
Digit-permutation related
Divisor-related
Other
Binary numbers
Generated via a sieve
Sorting related
Natural language related
Graphemics related
Large numbers
Examples
in
numerical
order
Expression
methods
Notations
Operators
Related
articles
(alphabetical
order)
Categories: