Skip to content
Surf Wiki
Save to docs
general/integers

From Surf Wiki (app.surf) — the open knowledge base

255 (number)


FieldValue
number255
divisor1, 3, 5, 15, 17, 51, 85, 255

255 (two hundred [and] fifty-five) is the natural number following 254 and preceding 256.

In mathematics

Its factorization makes it a sphenic number. Since 255 = 28 – 1, it is a Mersenne number (though not a pernicious one), and the fifth 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).

\left{ {9 \atop 2} \right} = 255.

In computing

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.

:255 = 2^8-1 = \mbox{FF}_{16} = 11111111_2

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) and
  • a DMX512 channel

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. 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.

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

References

  1. {{cite oeis. A007304. Sphenic numbers: products of 3 distinct primes.
  2. "PDF". [[American Mathematical Society]].
  3. {{Cite OEIS. A082897. perfect totient numbers
  4. {{Cite OEIS. 003401. Numbers of edges of regular polygons constructible with ruler
  5. {{Cite OEIS. A0000700. self number
  6. Hoovler, Evan. "[http://www.gamespy.com/articles/105/1051691p1.html The History of Annoying Side-Quests in Videogames] {{Webarchive. link. (2010-04-10 ." ''[[GameSpy]]''. 2009-12-04.)
  7. Clewett, James. "[https://www.youtube.com/watch?v=umYvFdU54Po 255 and Pac-Man]". ''Numberphile''. 2007-17-11.
Info: Wikipedia Source

This article was imported from Wikipedia and is available under the Creative Commons Attribution-ShareAlike 4.0 License. Content has been adapted to SurfDoc format. Original contributors can be found on the article history page.

Want to explore this topic further?

Ask Mako anything about 255 (number) — get instant answers, deeper analysis, and related topics.

Research with Mako

Free with your Surf account

Content sourced from Wikipedia, available under CC BY-SA 4.0.

This content may have been generated or modified by AI. CloudSurf Software LLC is not responsible for the accuracy, completeness, or reliability of AI-generated content. Always verify important information from primary sources.

Report