Home

0b111110001010

0b111110001010 is a binary literal that uses the 0b prefix to denote a base-2 integer in several programming languages. The sequence represents twelve bits and corresponds to the unsigned value 3978 in decimal, and to the hexadecimal value 0xF8A. The bit string can be grouped as 1111 1000 1010, mapping directly to the digits F, 8, and A in hex.

In unsigned form, this value is 3978. If this bit pattern were stored in a fixed-width signed

Binary literals like this are used for bitwise operations, masks, and low-level data parsing, where exact bit

For reference, 0b111110001010 equals hexadecimal 0xF8A and decimal 3978. Its use in examples often highlights how

---

integer
with
12
bits,
the
most
significant
bit
would
indicate
a
negative
value
in
two's
complement
representation,
yielding
-118.
In
languages
that
support
larger
integer
widths,
extending
the
sign
to
a
16-,
32-,
or
64-bit
integer
would
produce
the
positive
decimal
3978
for
the
same
bit
pattern.
patterns
are
important.
The
0b
prefix
is
supported
by
many
modern
programming
languages,
including
Python,
JavaScript
(ECMAScript
2015
and
later),
Java,
C#,
and
Rust,
among
others.
binary-to-hex
and
binary-to-decimal
conversions
align,
and
illustrates
how
fixed-width
representations
affect
signed
interpretation.