255 (two hundred
ndfifty-five) is the
natural number
In mathematics, the natural numbers are those numbers used for counting (as in "there are ''six'' coins on the table") and ordering (as in "this is the ''third'' largest city in the country").
Numbers used for counting are called '' cardinal ...
following
254
Year 254 ( CCLIV) was a common year starting on Sunday (link will display the full calendar) of the Julian calendar. At the time, it was known as the Year of the Consulship of Valerianus and Gallienus (or, less frequently, year 1007 '' Ab urbe ...
and preceding
256
Year 256 (Roman numerals, CCLVI) was a leap year starting on Tuesday (link will display the full calendar) of the Julian calendar. At the time, it was known as the Year of the Consulship of Claudius and Marcus Acilius Glabrio (consul 256), Glab ...
.
In mathematics
Its factorization makes it a
sphenic number
In number theory, a sphenic number (from grc, σφήνα, 'wedge') is a positive integer that is the product of three distinct prime numbers. Because there are infinitely many prime numbers, there are also infinitely many sphenic numbers.
Definit ...
.
Since 255 = 2
8 – 1, it is a
Mersenne number
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 17t ...
(though not a
pernicious
''Pernicious'' is a Thai-American supernatural horror film directed by James Cullen Bressack, who also wrote the story along with co-writer Taryn Hillin. The film stars Ciara Hanna, Emily O'Brien, and Jackie Moore.
Cast
* Ciara Hanna as Alex ...
one), and the fourth such number not to be a
prime number
A prime number (or a prime) is a natural number greater than 1 that is not a 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 because the only way ...
. It is a
perfect totient number In number theory, a perfect totient number is an integer that is equal to the sum of its iterated totients. That is, we apply the totient function to a number ''n'', apply it again to the resulting totient, and so on, until the number 1 is reache ...
, 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
In mathematics, a Fermat number, named after Pierre de Fermat, who first 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, 17, 257, 65537, 4294967 ...
s, the regular 255-gon is
constructible.
In base 10, it is a
self number
In number theory, a self number or Devlali number in a given number base b is a natural number that cannot be written as the sum of any other natural number n and the individual digits of n. 20 is a self number (in base 10), because no such combina ...
.
255 is a
repdigit
In recreational mathematics, a repdigit or sometimes monodigit is a natural number composed of repeated instances of the same digit in a positional number system (often implicitly decimal). The word is a portmanteau of repeated and digit.
Examp ...
in base 2 (11111111), in base 4 (3333), and in base 16 (FF).
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
Binary may refer to:
Science and technology Mathematics
* Binary number, a representation of numbers using only two digits (0 and 1)
* Binary function, a function that takes two arguments
* Binary operation, a mathematical operation that ta ...
number, and therefore the maximum representable by an unsigned
8-bit
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 unit ...
(the most common size of byte, also called an
octet
Octet may refer to:
Music
* Octet (music), ensemble consisting of eight instruments or voices, or composition written for such an ensemble
** String octet, a piece of music written for eight string instruments
*** Octet (Mendelssohn), 1825 com ...
), the smallest common
variable size used in high level
programming language
A programming language is a system of notation for writing computer programs. Most programming languages are text-based formal languages, but they may also be graphical. They are a kind of computer language.
The description of a programming l ...
s (
bit
The bit is the most basic unit of information in computing and digital communications. The name is a portmanteau of binary digit. The bit represents a logical state with one of two possible values. These values are most commonly represented a ...
being smaller, but rarely used for value storage). The range is
0 to 255, which is
256
Year 256 (Roman numerals, CCLVI) was a leap year starting on Tuesday (link will display the full calendar) of the Julian calendar. At the time, it was known as the Year of the Consulship of Claudius and Marcus Acilius Glabrio (consul 256), Glab ...
total values.
:
For example, 255 is the maximum value of
* components in the
24-bit RGB color
Color (American English) or colour (British English) is the visual perceptual property deriving from the spectrum of light interacting with the photoreceptor cells of the eyes. Color categories and physical specifications of color are assoc ...
model, since each color channel is allotted eight bits;
* any dotted quad in an
IPv4 address
Internet Protocol version 4 (IPv4) is the fourth version of the Internet Protocol (IP). It is one of the core protocols of standards-based internetworking methods in the Internet and other packet-switched networks. IPv4 was the first version d ...
; and
* the
alpha blending
In computer graphics, alpha compositing or alpha blending is the process of combining one image with a background to create the appearance of partial or full transparency. It is often useful to render picture elements (pixels) in separate pass ...
scale in
Delphi
Delphi (; ), in legend previously called Pytho (Πυθώ), in ancient times was a sacred precinct that served as the seat of Pythia, the major oracle who was consulted about important decisions throughout the ancient classical world. The oracl ...
(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
''The Legend of Zelda'' is an action-adventure game franchise created by the Japanese game designers Shigeru Miyamoto and Takashi Tezuka. It is primarily developed and published by Nintendo, although some portable installments and re-releas ...
'' 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
A wrap is a food dish made with a soft flatbread rolled around a filling.
The usual flatbreads are wheat tortillas, lavash, or pita; the filling may include cold sliced meat, poultry, or fish, shredded lettuce, diced tomato or pico de gallo, g ...
back to 0, such as the infamous "
kill screen
''Kill Screen'' (stylized as ''KILL SCREEN'') was a print and online magazine founded in 2009 by Jamin Warren and Chris Dahlen and owned by Kill Screen Media, Inc. It focused on video games and culture, but also included articles based on ente ...
" seen after clearing level 255 of
Pac-Man
originally called ''Puck Man'' in Japan, is a 1980 maze video game, maze action game, action video game developed and released by Namco for Arcade game, arcades. In North America, the game was released by Midway Manufacturing as part of its l ...
.
[Clewett, James.]
255 and Pac-Man
. ''Numberphile''. 2007-17-11.
This number could be interpreted by a computer as
−1
In mathematics, −1 (also known as negative one or minus one) is the additive inverse of 1, that is, the number that when added to 1 gives the additive identity element, 0. It is the negative integer greater than negative two (−2) and less ...
if a programmer is not careful about which 8-bit values are
signed and unsigned, and the
two's complement
Two's complement is a mathematical operation to reversibly convert a positive binary number into a negative binary number with equivalent (but negative) value, using the binary digit with the greatest place value (the leftmost bit in big- endian ...
representation of −1 in a signed byte is equal to that of 255 in an unsigned byte.
References
{{Integers, 2
Integers