255 (number): Difference between revisions
Arthur Rubin (talk | contribs) m Reverted 1 edit by Edith Keller (talk) to last revision by Raymond1922A. (TW) |
Add divisors |
||
(43 intermediate revisions by 34 users not shown) | |||
Line 2: | Line 2: | ||
{{Infobox number |
{{Infobox number |
||
| number = 255 |
| number = 255 |
||
| divisor = 1, 3, 5, 15, 17, 51, 85, 255 |
|||
}} |
}} |
||
'''255''' ('''two hundred [and] fifty-five''') is the [[natural number]] following [[254 (number)|254]] and preceding [[256 (number)|256]]. |
'''255''' ('''two hundred [and] fifty-five''') is the [[natural number]] following [[254 (number)|254]] and preceding [[256 (number)|256]]. |
||
==In mathematics== |
==In mathematics== |
||
Its factorization makes it a [[sphenic number]].<ref |
Its factorization makes it a [[sphenic number]].<ref>{{cite oeis|A007304|Sphenic numbers: products of 3 distinct primes.}}</ref> Since 255 = 2<sup>8</sup> – 1, it is a [[Mersenne number]]<ref name=ams>{{cite web|title=PDF|url=https://www.ams.org/journals/mcom/1964-18-085/S0025-5718-1964-0159775-8/S0025-5718-1964-0159775-8.pdf|publisher=[[American Mathematical Society]]|access-date=12 March 2015}}</ref> (though not a [[pernicious number|pernicious]] one), and the fourth such number not to be a [[prime number]]. It is a [[perfect totient number]], the smallest such number to be neither a power of three nor thrice a prime. |
||
Since 255 is the product of the first three [[Fermat prime]]s, the regular 255-gon is [[constructible polygon|constructible]]. |
Since 255 is the product of the first three [[Fermat prime]]s, the regular 255-gon is [[constructible polygon|constructible]]. |
||
Line 12: | Line 13: | ||
In base 10, it is a [[self number]]. |
In base 10, it is a [[self number]]. |
||
255 is a [[repdigit]] in base 2 (11111111) in base 4 (3333), and in base 16 (FF). |
255 is a [[repdigit]] in base 2 (11111111), in base 4 (3333), and in base 16 (FF). |
||
[[stirling numbers of the second kind|<math>\left\{ {9 \atop 2} \right\} = 255.</math>]] |
|||
==In computing== |
==In computing== |
||
Line 19: | Line 22: | ||
:<math>255 = 2^8-1 = \mbox{FF}_{16} = 11111111_2</math> |
:<math>255 = 2^8-1 = \mbox{FF}_{16} = 11111111_2</math> |
||
For example, 255 is the maximum value |
For example, 255 is the maximum value of |
||
* |
* components in the [[RGB#24-bit representation|24-bit RGB]] [[color]] model, since each color channel is allotted eight bits; |
||
* |
* any dotted quad in an [[IP address|IPv4 address]]; and |
||
* |
* the [[Alpha compositing#Alpha blending|alpha blending]] scale in [[Embarcadero Delphi|Delphi]] (255 being 100% visible and 0 being fully transparent). |
||
The use of eight bits for storage in older video games has had the consequence of it appearing as a hard limit in many video games. For example, in the original ''[[The Legend of Zelda (video game)|The Legend of Zelda]]'' game, [[Link (The Legend of Zelda)|Link]] can carry a maximum of 255 rupees.<ref>Hoovler, Evan. "[http://www.gamespy.com/articles/105/1051691p1.html The History of Annoying Side-Quests in Videogames]." ''[[GameSpy]]''. 2009-12-04.</ref> It was often used for numbers where casual gameplay would not cause anyone to exceed the number. However, in most situations it is reachable given enough time. This can cause many other peculiarities to appear when the number wraps back to 0, such as the infamous "[[kill screen]]" seen after clearing level 255 of [[Pac-Man]].<ref>Clewett, James. "[ |
The use of eight bits for storage in older video games has had the consequence of it appearing as a hard limit in many video games. For example, in the original ''[[The Legend of Zelda (video game)|The Legend of Zelda]]'' game, [[Link (The Legend of Zelda)|Link]] can carry a maximum of 255 rupees.<ref>Hoovler, Evan. "[http://www.gamespy.com/articles/105/1051691p1.html The History of Annoying Side-Quests in Videogames] {{Webarchive|url=https://web.archive.org/web/20100410062826/http://www.gamespy.com/articles/105/1051691p1.html |date=2010-04-10 }}." ''[[GameSpy]]''. 2009-12-04.</ref> It was often used for numbers where casual gameplay would not cause anyone to exceed the number. However, in most situations it is reachable given enough time. This can cause many other peculiarities to appear when the number [[Integer overflow|wraps]] back to 0, such as the infamous "[[kill screen]]" seen after clearing level 255 of [[Pac-Man]].<ref>Clewett, James. "[https://www.youtube.com/watch?v=umYvFdU54Po 255 and Pac-Man]". ''Numberphile''. 2007-17-11.</ref> |
||
This number could be interpreted by a computer as [[-1 (number)|−1]] if a programmer is not careful about which 8-bit values are [[Signedness|signed]] and unsigned, and the [[two's complement]] representation of −1 in a signed byte is equal to that of 255 in an unsigned byte. |
This number could be interpreted by a computer as [[-1 (number)|−1]] if a programmer is not careful about which 8-bit values are [[Signedness|signed]] and unsigned, and the [[two's complement]] representation of −1 in a signed byte is equal to that of 255 in an unsigned byte. |
Latest revision as of 10:05, 20 September 2024
This article needs additional citations for verification. (January 2009) |
| ||||
---|---|---|---|---|
Cardinal | two hundred fifty-five | |||
Ordinal | 255th (two hundred fifty-fifth) | |||
Factorization | 3 × 5 × 17 | |||
Divisors | 1, 3, 5, 15, 17, 51, 85, 255 | |||
Greek numeral | ΣΝΕ´ | |||
Roman numeral | CCLV | |||
Binary | 111111112 | |||
Ternary | 1001103 | |||
Senary | 11036 | |||
Octal | 3778 | |||
Duodecimal | 19312 | |||
Hexadecimal | FF16 |
255 (two hundred [and] fifty-five) is the natural number following 254 and preceding 256.
In mathematics
[edit]Its factorization makes it a sphenic number.[1] Since 255 = 28 – 1, it is a Mersenne number[2] (though not a pernicious one), and the fourth such number not to be a prime number. It is a perfect totient number, the smallest such number to be neither a power of three nor thrice a prime.
Since 255 is the product of the first three Fermat primes, the regular 255-gon is constructible.
In base 10, it is a self number.
255 is a repdigit in base 2 (11111111), in base 4 (3333), and in base 16 (FF).
In computing
[edit]255 is a special number in some tasks having to do with computing. This is the maximum value representable by an eight-digit binary number, and therefore the maximum representable by an unsigned 8-bit byte (the most common size of byte, also called an octet), the smallest common variable size used in high level programming languages (bit being smaller, but rarely used for value storage). The range is 0 to 255, which is 256 total values.
For example, 255 is the maximum value of
- components in the 24-bit RGB color model, since each color channel is allotted eight bits;
- any dotted quad in an IPv4 address; and
- the alpha blending scale in Delphi (255 being 100% visible and 0 being fully transparent).
The use of eight bits for storage in older video games has had the consequence of it appearing as a hard limit in many video games. For example, in the original The Legend of Zelda game, Link can carry a maximum of 255 rupees.[3] It was often used for numbers where casual gameplay would not cause anyone to exceed the number. However, in most situations it is reachable given enough time. This can cause many other peculiarities to appear when the number wraps back to 0, such as the infamous "kill screen" seen after clearing level 255 of Pac-Man.[4]
This number could be interpreted by a computer as −1 if a programmer is not careful about which 8-bit values are signed and unsigned, and the two's complement representation of −1 in a signed byte is equal to that of 255 in an unsigned byte.
References
[edit]- ^ Sloane, N. J. A. (ed.). "Sequence A007304 (Sphenic numbers: products of 3 distinct primes.)". The On-Line Encyclopedia of Integer Sequences. OEIS Foundation.
- ^ "PDF" (PDF). American Mathematical Society. Retrieved 12 March 2015.
- ^ Hoovler, Evan. "The History of Annoying Side-Quests in Videogames Archived 2010-04-10 at the Wayback Machine." GameSpy. 2009-12-04.
- ^ Clewett, James. "255 and Pac-Man". Numberphile. 2007-17-11.