255 (number)
255 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, 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, in base 4, and in base 16.
stirling numbers of the second kind|
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 smallest common variable size used in high level programming languages. 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 and
- a DMX512 channel
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.