255 (number)

From Wikipedia, the free encyclopedia
Jump to: navigation, search
254 255 256
Cardinal two hundred and fifty-five
Ordinal 255th
(two hundred and fifty-fifth)
Factorization 3 · 5 · 17
Roman numeral CCLV
Binary 111111112
Ternary 1001103
Quaternary 33334
Quinary 20105
Senary 11036
Octal 3778
Duodecimal 19312
Hexadecimal FF16
Vigesimal CF20
Base 36 7336

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

In mathematics[edit]

Its factorization makes it a sphenic number. Since 255 = 28 – 1, it is a Mersenne number (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.


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 = 2^8 - 1 = \mbox{FF}_{16} = 11111111_2

For example, 255 is the maximum value

  • that can be assigned to elements in the 24-bit RGB color model, since each color channel is allotted eight bits.
  • of any dotted quad in an IP address.
  • of 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 earlier versions of The Legend of Zelda, Link can carry a maximum of 255 rupees.[1] 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.[2]



  1. ^ Hoovler, Evan. "The History of Annoying Side-Quests in Videogames." GameSpy. 2009-12-04.
  2. ^ Clewett, James. "255 and Pac-man." Numberphile. 2007-17-11.