Home

binarytodecimal

Binary to decimal refers to the process of converting a number written in base-2, using only the digits 0 and 1, into base-10, the decimal system. In binary, each digit represents a power of two, with the rightmost bit representing 2^0 and moving leftward to higher powers. The decimal value is obtained by summing the products of each bit and its corresponding power of two.

For positive integers, the conversion is straightforward: for example, 1011012 equals 32 + 0 + 8 + 4 + 0

For binary fractions, digits after the binary point represent negative powers of two. For instance, 0.1011_2

Negative numbers can be represented using two's complement in a fixed number of bits; to interpret, one

In practice, binary-to-decimal conversion is foundational in computing and digital electronics. It is supported by calculators,

+
1
=
45,
so
1011012
=
45
in
decimal.
equals
1/2
+
0/4
+
1/8
+
1/16
=
0.6875
in
decimal.
must
know
the
width.
For
example,
in
8-bit
two's
complement,
11111101_2
equals
-3.
The
magnitude
is
obtained
by
inverting
the
bits
and
adding
1,
then
applying
a
negative
sign.
programming
languages,
and
various
software
tools.
Typical
methods
range
from
manual
calculation
using
positional
weights
to
built-in
functions
in
programming
languages,
such
as
int('101101',
2)
in
Python,
which
returns
45.