HOME

TheInfoList



OR:

A power of two is a number of the form where is an
integer An integer is the number zero (0), a positive natural number (1, 2, 3, ...), or the negation of a positive natural number (−1, −2, −3, ...). The negations or additive inverses of the positive natural numbers are referred to as negative in ...
, that is, the result of
exponentiation In mathematics, exponentiation, denoted , is an operation (mathematics), operation involving two numbers: the ''base'', , and the ''exponent'' or ''power'', . When is a positive integer, exponentiation corresponds to repeated multiplication ...
with number two as the base and integer  as the
exponent In mathematics, exponentiation, denoted , is an operation involving two numbers: the ''base'', , and the ''exponent'' or ''power'', . When is a positive integer, exponentiation corresponds to repeated multiplication of the base: that is, i ...
. In the fast-growing hierarchy, is exactly equal to f_1^n(1). In the Hardy hierarchy, is exactly equal to H_(1). Powers of two with
non-negative In mathematics, the sign of a real number is its property of being either positive, negative, or 0. Depending on local conventions, zero may be considered as having its own unique sign, having no sign, or having both positive and negative sign. ...
exponents are integers: , , and is two multiplied by itself times. The first ten powers of 2 for non-negative values of are: : 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, ... By comparison, powers of two with negative exponents are
fraction A fraction (from , "broken") represents a part of a whole or, more generally, any number of equal parts. When spoken in everyday English, a fraction describes how many parts of a certain size there are, for example, one-half, eight-fifths, thre ...
s: for positive integer , is
one half One half is the multiplicative inverse of 2. It is an irreducible fraction with a numerator of 1 and a denominator of 2. It often appears in mathematical equations, recipes and measurements. As a word One half is one of the few fractions ...
multiplied by itself times. Thus the first few negative powers of 2 are , , , , etc. Sometimes these are called ''inverse powers of two'' because each is the
multiplicative inverse In mathematics, a multiplicative inverse or reciprocal for a number ''x'', denoted by 1/''x'' or ''x''−1, is a number which when Multiplication, multiplied by ''x'' yields the multiplicative identity, 1. The multiplicative inverse of a ra ...
of a positive power of two.


Base of the binary numeral system

Because two is the base of the
binary numeral system A binary number is a number expressed in the base-2 numeral system or binary numeral system, a method for representing numbers that uses only two symbols for the natural numbers: typically "0" ( zero) and "1" ( one). A ''binary number'' may als ...
, powers of two are common in
computer science Computer science is the study of computation, information, and automation. Computer science spans Theoretical computer science, theoretical disciplines (such as algorithms, theory of computation, and information theory) to Applied 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 mathematics, a power of 10 is any of the integer powers of the number ten; in other words, ten multiplied by itself a certain number of times (when the power is a positive integer). By definition, the number one is a power (the zeroth power ...
in the
decimal The decimal numeral system (also called the base-ten positional numeral system and denary or decanary) is the standard system for denoting integer and non-integer numbers. It is the extension to non-integer numbers (''decimal fractions'') of th ...
system.


Computer science

Two to the power of , written as , is the number of values in which the bits in a binary word of length can be set, where each bit is either of two values. A word, interpreted as representing an
integer An integer is the number zero (0), a positive natural number (1, 2, 3, ...), or the negation of a positive natural number (−1, −2, −3, ...). The negations or additive inverses of the positive natural numbers are referred to as negative in ...
in a range starting at zero, referred to as an "unsigned integer", can represent values from 0 () to  () inclusively. An alternative representation, referred to as a signed integer, allows values that can be positive, negative and zero; see ''
Signed number representations In computing, signed number representations are required to encode negative numbers in binary number systems. In mathematics, negative numbers in any base are represented by prefixing them with a minus sign ("−"). However, in RAM or CPU reg ...
''. 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 A video game or computer game is an electronic game that involves interaction with a user interface or input device (such as a joystick, game controller, controller, computer keyboard, keyboard, or motion sensing device) to generate visual fe ...
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 The byte is a unit of digital information that most commonly consists of eight bits. Historically, the byte was the number of bits used to encode a single character of text in a computer and for this reason it is the smallest addressable un ...
, which is 8 bits long, to store the number, allowing the representation of 256 distinct values from to . 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 (210). However, in general, the term ''kilo'' has been used in the
International System of Units The International System of Units, internationally known by the abbreviation SI (from French ), is the modern form of the metric system and the world's most widely used system of measurement. It is the only system of measurement with official s ...
to mean (103).
Binary prefixes A binary prefix is a unit prefix that indicates a multiple of a unit of measurement by an integer power of two. The most commonly used binary prefixes are kibi (symbol Ki, meaning ), mebi (), and gibi (). They are most often used in inform ...
have been standardized, such as ''kibi'' (Ki) meaning . Nearly all
processor register A processor register is a quickly accessible location available to a computer's processor. Registers usually consist of a small amount of fast storage, although some registers have specific hardware functions, and may be read-only or write-onl ...
s 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, , and .


Mersenne and Fermat primes

A
prime number A prime number (or a prime) is a natural number greater than 1 that is not a Product (mathematics), product of two smaller natural numbers. A natural number greater than 1 that is not prime is called a composite number. For example, 5 is prime ...
that is one less than a power of two is called a
Mersenne prime In mathematics, a Mersenne prime is a prime number that is one less than a power of two. That is, it is a prime number of the form for some integer . They are named after Marin Mersenne, a French Minim friar, who studied them in the early 1 ...
. 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 In mathematics, a Fermat number, named after Pierre de Fermat (1601–1665), the first known to have studied them, is a positive integer of the form:F_ = 2^ + 1, where ''n'' is a non-negative integer. The first few Fermat numbers are: 3, 5, ...
—the exponent itself is a power of two. A
fraction A fraction (from , "broken") represents a part of a whole or, more generally, any number of equal parts. When spoken in everyday English, a fraction describes how many parts of a certain size there are, for example, one-half, eight-fifths, thre ...
that has a power of two as its
denominator A fraction (from , "broken") represents a part of a whole or, more generally, any number of equal parts. When spoken in everyday English, a fraction describes how many parts of a certain size there are, for example, one-half, eight-fifths, thre ...
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 A binary number is a number expressed in the base-2 numeral system or binary numeral system, a method for representing numbers that uses only two symbols for the natural numbers: typically "0" ( zero) and "1" ( one). A ''binary number'' may als ...
, 1, 10, 100, 1000, 10000, 100000, ... ) is important in
number theory Number theory is a branch of pure mathematics devoted primarily to the study of the integers and arithmetic functions. Number theorists study prime numbers as well as the properties of mathematical objects constructed from integers (for example ...
. Book IX, Proposition 36 of ''Elements'' proves that if the sum of the first terms of this progression is a prime number (and thus is a Mersenne prime as mentioned above), then this sum times the th term is a
perfect number In number theory, a perfect number is a positive integer that is equal to the sum of its positive proper divisors, that is, divisors excluding the number itself. For instance, 6 has proper divisors 1, 2 and 3, and 1 + 2 + 3 = 6, so 6 is a perfec ...
. For example, the sum of the first 5 terms of the series , 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 divides 496 and it is not amongst these numbers. Assume is equal to , or 31 is to as is to 16. Now cannot divide 16 or it would be amongst the numbers 1, 2, 4, 8 or 16. Therefore, 31 cannot divide . And since 31 does not divide and measures 496, the
fundamental theorem of arithmetic In mathematics, the fundamental theorem of arithmetic, also called the unique factorization theorem and prime factorization theorem, states that every integer greater than 1 is prime or can be represented uniquely as a product of prime numbers, ...
implies that must divide 16 and be among the numbers 1, 2, 4, 8 or 16. Let be 4, then must be 124, which is impossible since by hypothesis is not amongst the numbers 1, 2, 4, 8, 16, 31, 62, 124 or 248.


First 64 powers of two


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 , and the period is the
multiplicative order In number theory, given a positive integer ''n'' and an integer ''a'' coprime to ''n'', the multiplicative order of ''a'' modulo ''n'' is the smallest positive integer ''k'' such that a^k\ \equiv\ 1 \pmod n. In other words, the multiplicative orde ...
of 2 modulo , which is (see ''
Multiplicative group of integers modulo n In modular arithmetic, the integers coprime (relatively prime) to ''n'' from the set \ of ''n'' non-negative integers form a group under multiplication modulo ''n'', called the multiplicative group of integers modulo ''n''. Equivalently, the el ...
'').


Powers of 1024

The first few powers of 210 are slightly larger than those same powers of (103). The first 11 powers of 210 values are listed below: 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 A binary prefix is a unit prefix that indicates a multiple of a unit of measurement by an integer power of two. The most commonly used binary prefixes are kibi (symbol Ki, meaning ), mebi (), and gibi (). They are most often used in inform ...
'' 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 (), double exponentials of two are common in computing. The first 21 of them are: Also see ''
Fermat number In mathematics, a Fermat number, named after Pierre de Fermat (1601–1665), the first known to have studied them, is a natural number, positive integer of the form:F_ = 2^ + 1, where ''n'' is a non-negative integer. The first few Fermat numbers ...
'', ''
Tetration In mathematics, tetration (or hyper-4) is an operation (mathematics), operation based on iterated, or repeated, exponentiation. There is no standard mathematical notation, notation for tetration, though Knuth's up arrow notation \uparrow \upa ...
'' and '.


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 , and the period is the
multiplicative order In number theory, given a positive integer ''n'' and an integer ''a'' coprime to ''n'', the multiplicative order of ''a'' modulo ''n'' is the smallest positive integer ''k'' such that a^k\ \equiv\ 1 \pmod n. In other words, the multiplicative orde ...
of 2 modulo , which is (see ''
Multiplicative group of integers modulo n In modular arithmetic, the integers coprime (relatively prime) to ''n'' from the set \ of ''n'' non-negative integers form a group under multiplication modulo ''n'', called the multiplicative group of integers modulo ''n''. Equivalently, the el ...
'').


Facts about powers of two whose exponents are powers of two

In a connection with
nimber In mathematics, the nimbers, also called Grundy numbers (not to be confused with Grundy chromatic numbers), are introduced in combinatorial game theory, where they are defined as the values of heaps in the game Nim. The nimbers are the ordin ...
s, these numbers are often called ''
Fermat Pierre de Fermat (; ; 17 August 1601 – 12 January 1665) was a French mathematician who is given credit for early developments that led to infinitesimal calculus, including his technique of adequality. In particular, he is recognized for his d ...
2-powers''. The numbers 2^ form an irrationality sequence: for every sequence x_i of
positive integer In mathematics, the natural numbers are the numbers 0, 1, 2, 3, and so on, possibly excluding 0. Some start counting with 0, defining the natural numbers as the non-negative integers , while others start with 1, defining them as the positiv ...
s, the series : \sum_^ \frac = \frac+\frac+\frac+\cdots converges to an
irrational number In mathematics, the irrational numbers are all the real numbers that are not rational numbers. That is, irrational numbers cannot be expressed as the ratio of two integers. When the ratio of lengths of two line segments is 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 type In computer science and computer programming, a data type (or simply type) is a collection or grouping of data values, usually specified by a set of possible values, a set of allowed operations on these values, and/or a representation of these ...
s 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 distinct values, which can either be regarded as mere bit-patterns, or are more commonly interpreted as the unsigned numbers from 0 to , or as the range of signed numbers between and . For more about representing signed numbers see ''
Two's complement Two's complement is the most common method of representing signed (positive, negative, and zero) integers on computers, and more generally, fixed point binary values. Two's complement uses the binary digit with the ''greatest'' value as the ''s ...
''.


Selected powers of two

; 22 = : The number that is the
square In geometry, a square is a regular polygon, regular quadrilateral. It has four straight sides of equal length and four equal angles. Squares are special cases of rectangles, which have four equal angles, and of rhombuses, which have four equal si ...
of two. Also the first power of two
tetration In mathematics, tetration (or hyper-4) is an operation (mathematics), operation based on iterated, or repeated, exponentiation. There is no standard mathematical notation, notation for tetration, though Knuth's up arrow notation \uparrow \upa ...
of two. ; 28 = : The number of values represented by the 8 bits in a
byte The byte is a unit of digital information that most commonly consists of eight bits. Historically, the byte was the number of bits used to encode a single character of text in a computer and for this reason it is the smallest addressable un ...
, more specifically termed as an octet. (The term
byte The byte is a unit of digital information that most commonly consists of eight bits. Historically, the byte was the number of bits used to encode a single character of text in a computer and for this reason it is the smallest addressable un ...
is often defined as a collection of bits rather than the strict definition of an 8-bit quantity, as demonstrated by the term
kilobyte The kilobyte is a multiple of the unit byte for Computer data storage, digital information. The International System of Units (SI) defines the prefix ''kilo-, kilo'' as a multiplication factor of 1000 (103); therefore, one kilobyte is 1000&nbs ...
.) ; 210 = : The binary approximation of the
kilo- Kilo is a decimal prefix, decimal metric prefix, unit prefix in the metric system denoting multiplication by one thousand (103). It is used in the International System of Units, where it has the symbol k, in Letter case, lowercase. The prefix ' ...
, or multiplier, which causes a change of prefix. For example: = 1 
kilobyte The kilobyte is a multiple of the unit byte for Computer data storage, digital information. The International System of Units (SI) defines the prefix ''kilo-, kilo'' as a multiplication factor of 1000 (103); therefore, one kilobyte is 1000&nbs ...
(or
kibibyte The byte is a unit of digital information that most commonly consists of eight bits. Historically, the byte was the number of bits used to encode a single character of text in a computer and for this reason it is the smallest addressable un ...
). ; 212 = : The hardware
page Page most commonly refers to: * Page (paper), one side of a leaf of paper, as in a book Page, PAGE, pages, or paging may also refer to: Roles * Page (assistance occupation), a professional occupation * Page (servant), traditionally a young m ...
size of an Intel x86-compatible processor. ; 215 = : The number of non-negative values for a ''signed'' 16-bit integer. ; 216 = : : The number of distinct values representable in a single
word A word is a basic element of language that carries semantics, meaning, can be used on its own, and is uninterruptible. Despite the fact that language speakers often have an intuitive grasp of what a word is, there is no consensus among linguist ...
on a
16-bit 16-bit microcomputers are microcomputers that use 16-bit microprocessors. A 16-bit register can store 216 different values. The range of integer values that can be stored in 16 bits depends on the integer representation used. With the two ...
processor, such as the original
x86 x86 (also known as 80x86 or the 8086 family) is a family of complex instruction set computer (CISC) instruction set architectures initially developed by Intel, based on the 8086 microprocessor and its 8-bit-external-bus variant, the 8088. Th ...
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 Java is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea (a part of Pacific Ocean) to the north. With a population of 156.9 million people (including Madura) in mid 2024, proje ...
, and SQL programming languages. The maximum range of a Word or Smallint variable in the Pascal programming language. : The number of
binary relation In mathematics, a binary relation associates some elements of one Set (mathematics), set called the ''domain'' with some elements of another set called the ''codomain''. Precisely, a binary relation over sets X and Y is a set of ordered pairs ...
s on a 4-element set. ; 220 = : The binary approximation of the
mega- Mega is a metric prefix, unit prefix in metric systems of units denoting a factor of one million (106 or 1000000 (number), ). It has the unit symbol M. It was confirmed for use in the International System of Units (SI) in 1960. ''Mega'' comes fro ...
, or multiplier, which causes a change of prefix. For example: = 1 
megabyte The megabyte is a multiple of the unit byte for digital information. Its recommended unit symbol is MB. The unit prefix ''mega'' is a multiplier of (106) in the International System of Units (SI). Therefore, one megabyte is one million bytes ...
(or
mebibyte The byte is a units of information, unit of digital information that most commonly consists of eight bits. Historically, the byte was the number of bits used to encode a single character (computing), character of text in a computer and for this ...
). ; 224 = : : The number of unique
color Color (or colour in English in the Commonwealth of Nations, Commonwealth English; American and British English spelling differences#-our, -or, see spelling differences) is the visual perception based on the electromagnetic spectrum. Though co ...
s that can be displayed in truecolor, which is used by common
computer monitor A computer monitor is an output device that displays information in pictorial or textual form. A discrete monitor comprises a electronic visual display, visual display, support electronics, power supply, Housing (engineering), housing, electri ...
s. : 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, , 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. ; 230 = : The binary approximation of the
giga- Giga- ( or ) is a unit prefix in the metric system denoting a factor of a short-scale billion or long-scale milliard (109 or 1,000,000,000). It has the symbol G. ''Giga-'' is derived from the Greek word (''gígas''), meaning "giant". The ...
, or multiplier, which causes a change of prefix. For example, = 1 
gigabyte The gigabyte () is a multiple of the unit byte for digital information. The SI prefix, prefix ''giga-, giga'' means 109 in the International System of Units (SI). Therefore, one gigabyte is one billion bytes. The unit symbol for the gigabyte i ...
(or
gibibyte The byte is a unit of digital information that most commonly consists of eight bits. Historically, the byte was the number of bits used to encode a single character of text in a computer and for this reason it is the smallest addressable un ...
). ; 231 = : The number of non-negative values for a ''signed'' 32-bit integer. Since
Unix time Unix time is a date and time representation widely used in computing. It measures time by the number of non-leap seconds that have elapsed since 00:00:00 Coordinated Universal Time, UTC on 1 January 1970, the Unix Epoch (computing), epoc ...
is measured in seconds since January 1, 1970, it will run out at 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 = : : The number of distinct values representable in a single
word A word is a basic element of language that carries semantics, meaning, can be used on its own, and is uninterruptible. Despite the fact that language speakers often have an intuitive grasp of what a word is, there is no consensus among linguist ...
on a
32-bit In computer architecture, 32-bit computing refers to computer systems with a processor, memory, and other major system components that operate on data in a maximum of 32- bit units. Compared to smaller bit widths, 32-bit computers can perform la ...
processor. Or, the number of values representable in a doubleword on a
16-bit 16-bit microcomputers are microcomputers that use 16-bit microprocessors. A 16-bit register can store 216 different values. The range of integer values that can be stored in 16 bits depends on the integer representation used. With the two ...
processor, such as the original
x86 x86 (also known as 80x86 or the 8086 family) is a family of complex instruction set computer (CISC) instruction set architectures initially developed by Intel, based on the 8086 microprocessor and its 8-bit-external-bus variant, the 8088. Th ...
processors. : The range of an int variable in the
Java Java is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea (a part of Pacific Ocean) to the north. With a population of 156.9 million people (including Madura) in mid 2024, proje ...
, 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 In computer science, an integer is a datum of integral data type, a data type that represents some range of mathematical integers. Integral data types may be of different sizes and may or may not be allowed to contain negative values. Integers are ...
variable in the C and C++ programming languages. : The total number of
IP address An Internet Protocol address (IP address) is a numerical label such as that is assigned to a device connected to a computer network that uses the Internet Protocol for communication. IP addresses serve two main functions: network interface i ...
es under
IPv4 Internet Protocol version 4 (IPv4) is the first version of the Internet Protocol (IP) as a standalone specification. It is one of the core protocols of standards-based internetworking methods in the Internet and other packet-switched networks. ...
. Although this is a seemingly large number, the number of available 32-bit IPv4 addresses has been exhausted (but not for
IPv6 Internet Protocol version 6 (IPv6) is the most recent version of the Internet Protocol (IP), the communication protocol, communications protocol that provides an identification and location system for computers on networks and routes traffic ...
addresses). : The number of
binary operation In mathematics, a binary operation or dyadic operation is a rule for combining two elements (called operands) to produce another element. More formally, a binary operation is an operation of arity two. More specifically, a binary operation ...
s with domain equal to any 4-element set, such as GF(4). ; 240 = : The binary approximation of the tera-, or multiplier, which causes a change of prefix. For example,
byte The byte is a unit of digital information that most commonly consists of eight bits. Historically, the byte was the number of bits used to encode a single character of text in a computer and for this reason it is the smallest addressable un ...
s = 1
terabyte The byte is a unit of digital information that most commonly consists of eight bits. Historically, the byte was the number of bits used to encode a single character of text in a computer and for this reason it is the smallest addressable un ...
or tebibyte. ; 250 = : The binary approximation of the peta-, or multiplier.
byte The byte is a unit of digital information that most commonly consists of eight bits. Historically, the byte was the number of bits used to encode a single character of text in a computer and for this reason it is the smallest addressable un ...
s = 1 petabyte or pebibyte. ; 253 = : 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 = : The number of different possible keys in the obsolete 56 bit DES symmetric cipher. ; 260 = : The binary approximation of the exa-, or multiplier.
byte The byte is a unit of digital information that most commonly consists of eight bits. Historically, the byte was the number of bits used to encode a single character of text in a computer and for this reason it is the smallest addressable un ...
s = 1 exabyte or exbibyte. ; 263 = : : 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 = : : The number of distinct values representable in a single
word A word is a basic element of language that carries semantics, meaning, can be used on its own, and is uninterruptible. Despite the fact that language speakers often have an intuitive grasp of what a word is, there is no consensus among linguist ...
on a 64-bit processor. Or, the number of values representable in a doubleword on a
32-bit In computer architecture, 32-bit computing refers to computer systems with a processor, memory, and other major system components that operate on data in a maximum of 32- bit units. Compared to smaller bit widths, 32-bit computers can perform la ...
processor. Or, the number of values representable in a quadword on a
16-bit 16-bit microcomputers are microcomputers that use 16-bit microprocessors. A 16-bit register can store 216 different values. The range of integer values that can be stored in 16 bits depends on the integer representation used. With the two ...
processor, such as the original
x86 x86 (also known as 80x86 or the 8086 family) is a family of complex instruction set computer (CISC) instruction set architectures initially developed by Intel, based on the 8086 microprocessor and its 8-bit-external-bus variant, the 8088. Th ...
processors. : The range of a long variable in the
Java Java is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea (a part of Pacific Ocean) to the north. With a population of 156.9 million people (including Madura) in mid 2024, proje ...
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 = : The first power of 2 to contain all decimal digits. ; 270 = : The binary approximation of the zetta-, or multiplier.
byte The byte is a unit of digital information that most commonly consists of eight bits. Historically, the byte was the number of bits used to encode a single character of text in a computer and for this reason it is the smallest addressable un ...
s = 1 zettabyte (or zebibyte). ; 280 = : The binary approximation of the yotta-, or multiplier.
byte The byte is a unit of digital information that most commonly consists of eight bits. Historically, the byte was the number of bits used to encode a single character of text in a computer and for this reason it is the smallest addressable un ...
s = 1 yottabyte (or yobibyte). ; 286 = : 286 is
conjecture In mathematics, a conjecture is a conclusion or a proposition that is proffered on a tentative basis without proof. Some conjectures, such as the Riemann hypothesis or Fermat's conjecture (now a theorem, proven in 1995 by Andrew Wiles), ha ...
d to be the largest power of two not containing a zero in decimal. ; 296 = : The total number of IPv6 addresses generally given to a local Internet registry. In CIDR notation, ISPs are given a , which means that bits are available for addresses (as opposed to network designation). Thus, 296 addresses. ; 2108 = : The largest known power of 2 not containing a 9 in decimal. ; 2126 = : The largest known power of 2 not containing a pair of consecutive equal digits. ; 2128 = : The total number of IP addresses available under
IPv6 Internet Protocol version 6 (IPv6) is the most recent version of the Internet Protocol (IP), the communication protocol, communications protocol that provides an identification and location system for computers on networks and routes traffic ...
, the number of distinct universally unique identifiers (UUIDs), and the total number of different possible keys in the AES 128-bit key space (symmetric cipher). ; 2168 = : The largest known power of 2 not containing all decimal digits (the digit 2 is missing in this case). ; 2192 = : The total number of different possible keys in the AES 192-bit key space (symmetric cipher). ; 2229 = : 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. ; 2256 = : The total number of different possible keys in the AES 256-bit key space (symmetric cipher). ; 2 = (309 digits) : The maximum number that can fit in a 64-bit IEEE
double-precision floating-point format Double-precision floating-point format (sometimes called FP64 or float64) is a floating-point number format, usually occupying 64 bits in computer memory; it represents a wide range of numeric values by using a floating radix point. Double pre ...
(hence the maximum number that can be represented by many programs, for example
Microsoft Excel Microsoft Excel is a spreadsheet editor developed by Microsoft for Microsoft Windows, Windows, macOS, Android (operating system), Android, iOS and iPadOS. It features calculation or computation capabilities, graphing tools, pivot tables, and a ...
). ; 2 = ( digits) : The maximum number that can fit in a 128-bit IEEE
quadruple-precision floating-point format In computing, quadruple precision (or quad precision) is a binary floating-point–based computer number format that occupies 16 bytes (128 bits) with precision at least twice the 53-bit double precision. This 128-bit quadruple precision is des ...
; 2 = ( digits) : The maximum number that can fit in a 256-bit IEEE octuple-precision floating-point format ; 2 = ( digits) : One more than the
largest known prime number The largest known prime number is , a number which has 41,024,320 digits when written in the decimal system. It was found on October 12, 2024, on a cloud-based virtual machine volunteered by Luke Durant, a 36-year-old researcher from San Jose, Cali ...
.


Powers of two in music theory

In
musical notation Musical notation is any system used to visually represent music. Systems of notation generally represent the elements of a piece of music that are considered important for its performance in the context of a given musical tradition. The proce ...
, all unmodified
note value In music notation, a note value indicates the relative duration (music), duration of a note (music), note, using the texture or shape of the ''notehead'', the presence or absence of a ''stem (music), stem'', and the presence or absence of ''flags ...
s 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 180px, Figure 1. An eighth note with stem extending up, an eighth note with stem extending down, and an eighth rest. 180px, Figure 2. Four eighth notes beamed together. An eighth note ( American) or a quaver ( British) is a musical note pla ...
(1/8) and a sixteenth note (1/16). Dotted or otherwise modified notes have other durations. In
time signature A time signature (also known as meter signature, metre signature, and measure signature) is an indication in music notation that specifies how many note values of a particular type fit into each measure ( bar). The time signature indicates th ...
s the lower numeral, the ''beat unit'', which can be seen as the
denominator A fraction (from , "broken") represents a part of a whole or, more generally, any number of equal parts. When spoken in everyday English, a fraction describes how many parts of a certain size there are, for example, one-half, eight-fifths, thre ...
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
octave In music, an octave (: eighth) or perfect octave (sometimes called the diapason) is an interval between two notes, one having twice the frequency of vibration of the other. The octave relationship is a natural phenomenon that has been referr ...
s. In this case, the corresponding notes have the same name. The mathematical coincidence 2^ \approx (\tfrac)^, from \frac = 1.5849\ldots \approx \frac, closely relates the interval of 7 semitones in
equal temperament An equal temperament is a musical temperament or Musical tuning#Tuning systems, tuning system that approximates Just intonation, just intervals by dividing an octave (or other interval) into steps such that the ratio of the frequency, frequencie ...
to a
perfect fifth In music theory, a perfect fifth is the Interval (music), musical interval corresponding to a pair of pitch (music), pitches with a frequency ratio of 3:2, or very nearly so. In classical music from Western culture, a fifth is the interval f ...
of
just intonation In music, just intonation or pure intonation is a musical tuning, tuning system in which the space between notes' frequency, frequencies (called interval (music), intervals) is a natural number, whole number ratio, ratio. Intervals spaced in thi ...
: 2^\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

The sum of all -choose
binomial coefficient In mathematics, the binomial coefficients are the positive integers that occur as coefficients in the binomial theorem. Commonly, a binomial coefficient is indexed by a pair of integers and is written \tbinom. It is the coefficient of the t ...
s is equal to . Consider the set of all -digit binary integers. Its
cardinality The thumb is the first digit of the hand, next to the index finger. When a person is standing in the medical anatomical position (where the palm is facing to the front), the thumb is the outermost digit. The Medical Latin English noun for thum ...
is . 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 0s), the subset with a single 1, the subset with two 1s, and so on up to the subset with 1s (consisting of the number written as 1s). Each of these is in turn equal to the binomial coefficient indexed by 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 The thumb is the first digit of the hand, next to the index finger. When a person is standing in the medical anatomical position (where the palm is facing to the front), the thumb is the outermost digit. The Medical Latin English noun for thum ...
of the
power set In mathematics, the power set (or powerset) of a set is the set of all subsets of , including the empty set and itself. In axiomatic set theory (as developed, for example, in the ZFC axioms), the existence of the power set of any set is po ...
of a set is always , where is the cardinality of . The number of vertices of an -dimensional
hypercube In geometry, a hypercube is an ''n''-dimensional analogue of a square ( ) and a cube ( ); the special case for is known as a ''tesseract''. It is a closed, compact, convex figure whose 1- skeleton consists of groups of opposite parallel l ...
is . Similarly, the number of -faces of an -dimensional cross-polytope is also and the formula for the number of -faces an -dimensional cross-polytope has is 2^x \tbinom. The sum of the first n powers of two (starting from 1 = 2^) is given by : \sum_^ 2^k = 2^0 + 2^1 + 2^2 + \cdots + 2^ = 2^-1 for n being any positive integer. Thus, the sum of the powers : 1 + 2^1 + 2^2 + \cdots + 2^ can be computed simply by evaluating: 2^-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 A decimal representation of a non-negative real number is its expression as a sequence of symbols consisting of decimal digits traditionally written with a single separator: r = b_k b_\cdots b_0.a_1a_2\cdots Here is the decimal separator, ...
begins with 7 is : 2^ = 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 In mathematics, a polynomial is a Expression (mathematics), mathematical expression consisting of indeterminate (variable), indeterminates (also called variable (mathematics), variables) and coefficients, that involves only the operations of addit ...
, ''a''''n'' + ''b''''n'' is irreducible, if and only if ''n'' is a power of two. (If ''n'' is odd, then ''a''''n'' + ''b''''n'' 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 ''a''''p'' + ''b''''p''.) But in the domain of
complex numbers In mathematics, a complex number is an element of a number system that extends the real numbers with a specific element denoted , called the imaginary unit and satisfying the equation i^= -1; every complex number can be expressed in the form a ...
, the polynomial a^ + b^ (where ''n'' ≥ 1) can always be factorized as a^ + b^ = (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 = . 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 2''n'' should have ''n'' of at least 6 digits. The only powers of 2 with all digits distinct are 20 = 1 to 215 = , 220 = and 229 = .


Negative powers of two

Huffman codes deliver optimal
lossless data compression Lossless compression is a class of data compression that allows the original data to be perfectly reconstructed from the compressed data with no loss of information. Lossless compression is possible because most real-world data exhibits Redundanc ...
when probabilities of the source symbols are all negative powers of two.Huffman coding
from: '' Fundamental Data Compression'', 2006


See also

* Fermi–Dirac prime * Gould's sequence *
Binary logarithm In mathematics, the binary logarithm () is the exponentiation, power to which the number must be exponentiation, raised to obtain the value . That is, for any real number , :x=\log_2 n \quad\Longleftrightarrow\quad 2^x=n. For example, th ...
* Power of three *
Power of 10 In mathematics, a power of 10 is any of the integer powers of the number ten; in other words, ten multiplied by itself a certain number of times (when the power is a positive integer). By definition, the number one is a power (the zeroth power ...


References

{{DEFAULTSORT:Power Of Two Binary arithmetic Integer sequences Integers 2 (number)