Talk:Power of two
This article is rated Start-class on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | |||||||||||||||||||||
|
The contents of the 2147483648 (number) page were merged into Power of two on 5 April 2005. For the contribution history and old versions of the redirected page, please see its history. |
This page has archives. Sections older than 365 days may be automatically archived by Lowercase sigmabot III when more than 5 sections are present. |
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 24 of them are:
n | 2n | 22n (sequence A001146 in the OEIS) |
---|---|---|
0 | 1 | 2 |
1 | 2 | 4 |
2 | 4 | 16 |
3 | 8 | 256 |
4 | 16 | 65,536 |
5 | 32 | 4,294,967,296 |
6 | 64 | 18, |
7 | 128 | 340, |
8 | 256 | 115, |
9 | 512 | 13, |
10 | 1,024 | 179, |
11 | 2,048 | 32, |
12 | 4,096 | 1, |
13 | 8,192 | 1, |
14 | 16,384 | 1, |
15 | 32,768 | 1, |
16 | 65,536 | 2, |
17 | 131,072 | 4, |
18 | 262,144 | 16, |
19 | 524,288 | 259, |
20 | 1,048,576 | 67, |
21 | 2,097,152 | 4, |
22 | 4,194,304 | 20, |
23 | 8,388,608 | 426, |
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.[1]
References
- ^ 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
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. Faster328 (talk) 07:09, 13 April 2023 (UTC)
- I improved the table, seperated sections, and added colour. Faster328 (talk) 07:12, 13 April 2023 (UTC)
- Trim the table. Numbers-Mathworld (talk) 07:17, 13 April 2023 (UTC)
- You can use multiply and calculator, not use table and have infinite integer.
- Trim the table. Numbers-Mathworld (talk) 07:17, 13 April 2023 (UTC)
124.122.238.117 (talk) — Preceding undated comment added 13:54, 12 September 2023 (UTC)
Powers of 1024
[edit]The section #Powers of 1024 has the following:
- 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]
Does this really need a citation? The calculation is very easily done:
Kuulopuhe (talk) 01:24, 17 December 2023 (UTC)
- I added this calculation in a footnote and took out the cn template. –jacobolus (t) 01:40, 17 December 2023 (UTC)
- Thank you! Kuulopuhe (talk) 00:43, 18 December 2023 (UTC)
Number of unique states in one unit of data
[edit]I recently added a note to 2^1024 that it was the range of possible states in one kibibit (kilobit), as well as a similar note for 2^8192 and one kibibyte (kilobyte). Those edits were reverted by user:David Eppstein with the following edit summary:
“gibidigibidigibidi. Nobody uses fixed-precision arithmetic with this many bits, and if they did the max value would be half what you state it is, minus one”
My edit was not talking about the max value, it said “range of possible values”. Even if it were to be misunderstood as talking about max value, there is no reason to assume that it is referring to a signed integer. I assert that it is in fact correct that one kibibit can have 2^1024 possible unique values, and one kibibyte can have 2^8192.
Regarding the comment that “Nobody uses fixed-precision arithmetic with this many bits”, it is certainly true that there are more efficient ways to store numbers. However, needless to say numbers aren't the only type of data that can be represented with binary data. Having a sense of scale for how many different states are possible at a common data size is useful.
As for the “gibidigibidigibidi”, this seems to be referring to the user's dislike of the aesthetics of the standard names for binary prefixes, which is not relevant. Pinball larry (talk) 22:32, 2 March 2024 (UTC)
- The range of possible values is an interval, not a number. Perhaps you mean "the number of distinct values"? Also, I dispute that "these are the standard names". A standards body has declared them to be the names, but very few others actually use them. —David Eppstein (talk) 22:56, 2 March 2024 (UTC)
Negative integer exponents
[edit]Is there anything in sources about negative exponents, it numbers 1/2, 1/4, 1/8...? Or shal the lede speak about nonnegative integer exponents? Is there a ref for the def? (I mean, to establish that usually nonnegative exp is meant (that is my impression, but {{citation needed}} for either way :-). - Altenmann >talk 20:41, 29 March 2024 (UTC)
- Sure, there are plenty of sources using the phrase "negative power of two". I think it would be fine to add a section about this if you feel motivated. You could start by looking at binary logarithm. –jacobolus (t) 21:34, 29 March 2024 (UTC)
- If I said simply that a number is a power of two, I think I would likely mean a non-negative exponent unless otherwise qualified. If I meant a negative-integer power I would probably say something like "inverse power of two" or "negative power of two". I definitely would not count as a power of two. But as you say, adding clarifications about this requires sourcing. —David Eppstein (talk) 21:44, 29 March 2024 (UTC)
- Sure, the numbers 1, 2, 4, 8, ... are clearly the primary focus of this article. But if we wanted to add a section called "Negative powers of two" about 1/2, 1/4, 1/8, ..., and briefly mention it in the lead section, I think it would be plausibly in scope, not particularly distracting, and potentially helpful to readers. I certainly agree with you that the number 3 doesn't seem like a "power of two". –jacobolus (t) 22:13, 29 March 2024 (UTC)
plenty of sources
-- fooled by google. Only a handgful unique hits. Anyway, I found one nontrivial.- Altenmann >talk 21:50, 29 March 2024 (UTC)- P.S. thre is also something to write about computer representations, like exact representation of decimal fractions such as 1/625, but I dont "feel motivated" enough (Must be bad weather :-). - Altenmann >talk 22:02, 29 March 2024 (UTC)
- I did a search in google scholar, which found nearly 400 examples of "negative power of two". –jacobolus (t) 22:10, 29 March 2024 (UTC)
- The part about exact computer representation really belongs under related article dyadic rational, where it is already mentioned in section "In computing". —David Eppstein (talk) 23:47, 29 March 2024 (UTC)
- The current section § Powers of two in music theory is poorly placed/organized in my opinion, and should not be an independent section. I think this article should (near the bottom) have short sections about (a) negative powers of two; (b) fractional powers of two (possibly linking to binary logarithm), which can talk about ISO 216 paper sizes, f-numbers, equally tempered semitones, etc.; (c) dyadic rationals, including music time signatures. These sections can each briefly explain their relationship to powers of two. –jacobolus (t) 03:21, 30 March 2024 (UTC)
- The part about exact computer representation really belongs under related article dyadic rational, where it is already mentioned in section "In computing". —David Eppstein (talk) 23:47, 29 March 2024 (UTC)
- If I said simply that a number is a power of two, I think I would likely mean a non-negative exponent unless otherwise qualified. If I meant a negative-integer power I would probably say something like "inverse power of two" or "negative power of two". I definitely would not count as a power of two. But as you say, adding clarifications about this requires sourcing. —David Eppstein (talk) 21:44, 29 March 2024 (UTC)
Non-negative and Zero
[edit]The first ten powers of 2 for non-negative values of n are: 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, ..
I think the use of the term "non-negative" , should be hypertext ,that , when clicked on sends you to the Wikipedia page titled "Sign(mathematics)" and then to the section called , "Terminology for signs" , where an explanation of the term is given. EuclidIncarnated (talk) 17:18, 26 April 2024 (UTC)
- I partially rewrote the lead section. does that help? –jacobolus (t) 00:13, 27 April 2024 (UTC)
- Slightly , although the hyperlink takes you to the Negative number Wikipedia page whereas there exists a Wikipedia page with a direct explanation of the term "non-negative". Instead we can put "non-negative" in hypertext and when clicked take us to the "Sign(mathematics)" Wikipedia page and the part named "Terminology for signs".
- I shall make the edit now but I wanted to run it by the community first to point it out in case the edit was reverted. EuclidIncarnated (talk) 14:50, 27 April 2024 (UTC)
- I think negative number is a more useful/relevant wikilink than Sign (mathematics) § Terminology for signs to attach to the word "negative". –jacobolus (t) 15:10, 27 April 2024 (UTC)
- The negative number page talks of non-negative whole numbers being referred to as natural integers. Whereas the page Sign (mathematics) § Terminology for signs gives a direct explanation of "non-negative", which is not constricted to that of solely whole numbers. Therefore I think a general definition is more suitable than that which talks about only whole numbers. EuclidIncarnated (talk) 23:58, 27 April 2024 (UTC)
- I think negative number is a more useful/relevant wikilink than Sign (mathematics) § Terminology for signs to attach to the word "negative". –jacobolus (t) 15:10, 27 April 2024 (UTC)
For example: 1,024 bytes = 1 kilobyte (or kibibyte)
[edit]The text for 210 presently reads
- "For example: 1,024 bytes = 1 kilobyte (or kibibyte)" per the header.
I changed it read to read
- "For example: 1,024 bytes = 1 kibibyte ≈ 1000 bytes = 1 kilobyte".
Then David Eppstein (talk · contribs) reverted my edit with the gibberish edit summary "The giant floating flayed head says gibidigibidigibidi". Thoughts from other editors on which of the two versions is clearer and more to the point, or (better still) to suggest further improvement are invited. Dondervogel 2 (talk) 18:58, 23 December 2024 (UTC)
- "Kibibyte" looks like gibberish to me. I chose to go with a reference to Feersum Endjinn but it could as easily have been Snow Crash. And WP:SOAPBOX applies: as far as I can tell, nobody actually uses this convention, so we should not push to be ahead of everyone else to use it; that is promotional, rather than encyclopedic. Putting it front and center ahead of conventions that people actually use amounts to the same thing. —David Eppstein (talk) 03:34, 24 December 2024 (UTC)
- I am a retired computer scientist, and I have never heard of kibibyte or mebibyte. I think the previous version of this article is clearer, as the more common terminology appears first, the less common terminology is in parentheses, and the approximations (that is, "≈ 1,000 bytes" and "≈ 1,000,000 bytes") are implied at the beginning of each section.—Anita5192 (talk) 04:05, 24 December 2024 (UTC)
- OK, so you both want kilobyte to appear first. My concern is that the present version does not state that the kibibyte is equal to 1024 bytes. The main purpose of my revision was to correct that omission. How about
- For example: 1,024 bytes, which is approximately 1 kilobyte (and precisely 1 kibibyte).
- This alternative addresses your concern by putting kilobyte first, and mine by clarifying the meaning of kibibyte. Thoughts? Dondervogel 2 (talk) 09:42, 24 December 2024 (UTC)
- OK, so you both want kilobyte to appear first. My concern is that the present version does not state that the kibibyte is equal to 1024 bytes. The main purpose of my revision was to correct that omission. How about
- If nobody uses binary prefixes, why does IBM state "IBM Storage Insights uses decimal and binary units of measurement to express the size of storage data"?. And why does Toshiba write "A kibibyte (KiB) means 2^10, or 1,024 bytes, a mebibyte (MiB) means 2^20, or 1,048,576 bytes, and a gibibyte (GiB) means 2^30, or 1,073,741,824 bytes". There are plenty more examples (virtually all who wish to disambiguate use binary prefixes to do so), but those two will do to start with. Do IBM and Toshiba not count? And why does Google Scholar find hundreds of hits for them every year? Dondervogel 2 (talk) 10:02, 24 December 2024 (UTC)
- "1 kilobyte (or kibibyte)" seems clearer to me. The names kibibyte, mebibyte, gibibyte, etc. are not unheard of, but have not become particularly popular either. Most of the time the names "kilobyte", "megabyte", "gigabyte" are used, and generally refer to , , and , respectively (not , , ). Our article Byte#Multiple-byte units looks like it was written by kibi proponents, and does not really seem reflective of practical use. In storage – hard drives, SSDs, etc. – companies switched to marketing X GB to mean instead of because it let them advertise 7% bigger numbers for the same provided capacity, so in the context of storage it can be helpful to switch to the abbreviations "KiB", "MiB", etc. to avoid confusion. But these are just used as abbreviations, not spelled out names, and generally still pronounced as "kilobyte" etc. by practitioners. –jacobolus (t) 16:13, 24 December 2024 (UTC)
- The present version does state that the kibibyte is equal to 1024 bytes.
- Who says nobody uses binary prefixes?—Anita5192 (talk) 16:36, 24 December 2024 (UTC)
- The issue is that the present version of Byte implies that "kilobyte" generally means 1000 bytes, but most of the time this still means 1024. –jacobolus (t) 16:53, 24 December 2024 (UTC)
- @Anita5192: I do not see that anywhere. I see a statement that a kilobyte is equal to 1024 bytes (which is misleading at best), followed by a parenthetical remark implying that a kibibyte is equal to a kilobyte (which is not even a correct statement). What am I missing?
- David Eppstein (talk · contribs) wrote, referring to binary prefixes, "as far as I can tell, nobody actually uses this convention".
- Dondervogel 2 (talk) 17:58, 24 December 2024 (UTC)
- In the section, Selected powers of two: "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)." This states that the kibibyte is equal to 1024 bytes. This section also indicates that kilobyte and kibibyte are approximations of the kilo-. What could be misleading about this?—Anita5192 (talk) 18:47, 24 December 2024 (UTC)
- It is misleading to state that 1 kilobyte is equal to 1024 bytes because the term is defined to mean 1000 bytes and often used in that way. I agree it is also used to mean 1024 bytes, making it ambiguous.
- The text 1 kilobyte (or kibibyte) implies that a kibibyte is equal to a kilobyte. That statement is simply (and demonstrably) false. I plan to label it as 'dubious' while this discussion continues.
- In a nutshell, to find out that a kibibyte is 1024 bytes (and that 'kilobyte' is sometimes used with that meaning and sometimes not), one has to read both articles. Far better to make that laborious step (a hindrance to reading this article) unnecessary. Dondervogel 2 (talk) 10:41, 26 December 2024 (UTC)
"I see a statement that a kilobyte is equal to 1024 bytes (which is misleading at best)"
– This is an accurate statement. Most of the time you see the word "kilobyte", it means 1024 bytes. –jacobolus (t) 19:46, 24 December 2024 (UTC)- @Dondervogel 2: You appear to be misunderstanding and misquoting me. I did not mean that nobody uses binary conventions, 1024 byte and 1048576 byte units. I meant that very few people use the "kibi" and "mibi" naming convention for these things. As jacobolus says, most of the time people call these kilobytes and megabytes, meaning 1024 bytes and 1048576 bytes. The IEC can say whatever it wants about what their official conventions mean, but why should we care? —David Eppstein (talk) 23:22, 24 December 2024 (UTC)
- @David Eppstein:
- I quoted you verbatim, so how could I have misquoted you? Perhaps I misunderstood what you meant, especially if you meant something different from what you wrote. Both IBM and Toshiba use the Ki, Mi, Gi notation and spell out the words kibibyte, mebibyte and gibibyte in full, so what is your point and where did I misunderstand you?
- The reason we should care about the IEC standard is that it provides a means to write more clearly. Most writers using binary powers, and who choose to disambiguate from the corresponding decimal powers, do so using binary prefixes defined by IEC 80000-13.
- Dondervogel 2 (talk) 10:54, 26 December 2024 (UTC)
"Most writers using binary powers, and who choose to disambiguate from the corresponding decimal powers, do so using binary prefixes defined by IEC 80000-13."
– This is a very misleading claim, since relatively few authors "choose to disambiguate" in this way. –jacobolus (t) 11:34, 26 December 2024 (UTC)- Really? If you mean that most authors choose not to disambiguate, you are probably correct, but this does not alter the fact the IEC 80000-13 provides a tool for those who prefer to avoid ambiguity. If you mean that authors disambiguate in a different way, I challenge you to provide counter-examples to my post of 10:02 on 24 December, which provided hundreds of examples of disambiguation with IEC prefixes. Dondervogel 2 (talk) 13:30, 26 December 2024 (UTC)
- @David Eppstein:
- In the section, Selected powers of two: "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)." This states that the kibibyte is equal to 1024 bytes. This section also indicates that kilobyte and kibibyte are approximations of the kilo-. What could be misleading about this?—Anita5192 (talk) 18:47, 24 December 2024 (UTC)
- The issue is that the present version of Byte implies that "kilobyte" generally means 1000 bytes, but most of the time this still means 1024. –jacobolus (t) 16:53, 24 December 2024 (UTC)
- @Jacobolus:
- Your statement
Most of the time the names "kilobyte", "megabyte", "gigabyte" are used, and generally refer to 2^10, 2^20, and 2^30, respectively (not 10^3, 10^6, 10^9)
is easily disproven. The terms kilobyte, megabyte and gigabyte were used with a decimal meaning (for disk storage space) long before they took on a binary meaning (computer memory). Today, the words are ambiguous, sometimes binary (memory) and sometimes decimal (disk storage and data transfer speeds). - Like all WP articles, Byte is based on RS. If those RS are interpreted in a biased way, or if you know of other RS that provide a different perspective, it would be more helpful to raise that point there than here.
- Your statement
- Dondervogel 2 (talk) 10:33, 26 December 2024 (UTC)
"used with a decimal meaning (for disk storage space) long before they took on a binary meaning (computer memory)."
This is not correct. These names were historically used with a binary meaning for both disk storage space and memory. At some point storage companies switched the meaning because it let them market the same product with a bigger number. There were even lawsuits about it, but courts decided that a decimal meaning was not false advertising. –jacobolus (t) 11:31, 26 December 2024 (UTC)- This is just wrong! Tape and disk storage companies have always used the decimal meaning of prefixes for storage! I am pretty sure it was the Apple Macintosh OS that first started reporting such capacity rounded with binary single letter prefixes for such capacities instead of reporting exact capacity with to seven or more decimal digits. Tom94022 (talk) 22:12, 26 December 2024 (UTC)
- I have read Timeline of binary prefixes and find myself retracting the "long before" part of my claim. In reality the two interpretations seem to have developed in parallel, with decimal and binary interpretations of kilo, mega, giga appearing in the 1950s, 1960s and 1970s, respectively. The decimal meaning was used for disk storage and communications. Today, the same dual use of all three prefixes persists, which was and remains my main point. Dondervogel 2 (talk) 14:49, 26 December 2024 (UTC)
- What that document shows is that in the earliest days of computing there were some systems with decimal arithmetic and decimal addresses, and others with binary arithmetic and binary addresses. The former type used "kilo" to mean 1000 while the latter type tended to use "kilo" to mean 1024, etc., and then by sometime in the 1970s binary computers generally won out and "kilo" in the context of computing more or less universally meant 1024. Then in the 1990s some storage companies started using a decimal meaning again when describing numbers of gigabytes. –jacobolus (t) 18:37, 26 December 2024 (UTC)
- This is just wrong. In the early days capacity, memory and or storage, was reported by system OS and in product specs in exact decimal digits. If prefixes were used, they were SI meaning. It may have been IBM circa 1964 that introduced K = 1024 in product literature Tom94022 (talk) 22:12, 26 December 2024 (UTC)
- What that document shows is that in the earliest days of computing there were some systems with decimal arithmetic and decimal addresses, and others with binary arithmetic and binary addresses. The former type used "kilo" to mean 1000 while the latter type tended to use "kilo" to mean 1024, etc., and then by sometime in the 1970s binary computers generally won out and "kilo" in the context of computing more or less universally meant 1024. Then in the 1990s some storage companies started using a decimal meaning again when describing numbers of gigabytes. –jacobolus (t) 18:37, 26 December 2024 (UTC)
- "1 kilobyte (or kibibyte)" seems clearer to me. The names kibibyte, mebibyte, gibibyte, etc. are not unheard of, but have not become particularly popular either. Most of the time the names "kilobyte", "megabyte", "gigabyte" are used, and generally refer to , , and , respectively (not , , ). Our article Byte#Multiple-byte units looks like it was written by kibi proponents, and does not really seem reflective of practical use. In storage – hard drives, SSDs, etc. – companies switched to marketing X GB to mean instead of because it let them advertise 7% bigger numbers for the same provided capacity, so in the context of storage it can be helpful to switch to the abbreviations "KiB", "MiB", etc. to avoid confusion. But these are just used as abbreviations, not spelled out names, and generally still pronounced as "kilobyte" etc. by practitioners. –jacobolus (t) 16:13, 24 December 2024 (UTC)
- I am a retired computer scientist, and I have never heard of kibibyte or mebibyte. I think the previous version of this article is clearer, as the more common terminology appears first, the less common terminology is in parentheses, and the approximations (that is, "≈ 1,000 bytes" and "≈ 1,000,000 bytes") are implied at the beginning of each section.—Anita5192 (talk) 04:05, 24 December 2024 (UTC)
I have sought opinions at Binary prefix and Timeline of binary prefixes. Dondervogel 2 (talk) 17:14, 26 December 2024 (UTC)
- IMO the construction proposed by @Dondervogel: is preferred - it is accurate and instructive to those unaware of the distinction. Far better than perpetuating ignorance. Tom94022 (talk) 22:12, 26 December 2024 (UTC)
- You would need a reputable source for this.—Anita5192 (talk) 22:33, 26 December 2024 (UTC)
- Your opinion of what is preferable here, and whether you think it is more accurate, is irrelevant here. We follow current usage; we don't try to push different usages than what is current. —David Eppstein (talk) 23:06, 26 December 2024 (UTC)