Home

0b11111111

0b11111111 is an eight-bit binary literal commonly used in programming to denote a byte whose bit pattern consists of eight 1s. The binary sequence 11111111 corresponds to the decimal value 255 in unsigned form, and to 0xFF in hexadecimal notation. The 0b prefix indicates a binary numeral in languages that support binary literals.

In an eight-bit unsigned interpretation, it is the maximum value representable by a byte. In many systems

In practical usage, 0b11111111 appears in color processing as the maximum intensity for a color channel (red,

using
two's
complement
for
signed
integers,
the
same
bit
pattern
represents
-1.
The
pattern
is
also
used
as
a
mask
that
selects
all
bits
within
a
byte;
for
example,
x
&
0xFF
extracts
the
least-significant
byte
of
x.
It
is
a
common
building
block
in
byte-oriented
operations
and
network
protocols
where
data
is
divided
into
8-bit
chunks.
green,
or
blue)
in
8-bit-per-channel
schemes,
corresponding
to
255.
Some
languages
support
binary
literals
with
0b
prefixes
(for
example,
Python
and
newer
versions
of
JavaScript);
others
require
hexadecimal
or
decimal
representations.
When
writing
portable
code,
care
should
be
taken
about
whether
a
value
is
treated
as
signed
or
unsigned
and
about
compiler
support
for
binary
literals.