0
\$\begingroup\$

How do we convert this binary number to decimal? I am confused about the decimal point, the one before the decimal I got (27), how about the part after the decimal point?

\$\endgroup\$
2
  • 1
    \$\begingroup\$ Context is required. What is the number supposed to represent? \$\endgroup\$
    – Passerby
    Jan 18 '17 at 7:15
  • \$\begingroup\$ <pedantry>It's not a 'decimal point' if the number is binary- you can call it a radix point.</pedantry> \$\endgroup\$ Jan 18 '17 at 14:01
4
\$\begingroup\$

Often the expansion is performed like this:

$$1\times2^4+1\times2^3+0\times2^2+1\times2^1+1\times2^0+0\times2^{-1}+1\times2^{-2}+0\times2^{-3}+1\times2^{-4}$$

This is analogous to the usual base-10 positional representation except the 10s are replaced with 2s.

\$\endgroup\$
4
\$\begingroup\$

The positions to the right of the point are treated the same way as the ones before: each step to the right halves the weight. Hence

binary   | decimal
------------------
100.     |    4
 10.     |    2
  1.     |    1
  0.1    |  1/2
  0.01   |  1/4
  0.001  |  1/8

With these weights you should be able to calculate the decimal value of any binary number, including ones like you show with a .

\$\endgroup\$
2
  • 1
    \$\begingroup\$ +1, all the answers say essentially the same thing (they have to) but this one says it most clearly \$\endgroup\$
    – Neil_UK
    Jan 18 '17 at 9:47
  • \$\begingroup\$ @Neil_UK Wouter is a teacher, after all. +1. \$\endgroup\$ Jan 18 '17 at 14:05
2
\$\begingroup\$

The place values go with \$2^n\$, where \$n\$ is positive on the left side of the decimal point and negative on the right side of the decimal point.

In this case,

         1   1   0   1   1  .  0      1      0      1
power    4   3   2   1   0    -1     -2     -3     -4
value   16   8   4   2   1     0.5    0.25   0.125  0.0625

Result: 27.3125

\$\endgroup\$
0
\$\begingroup\$

Split it in 2 parts: a) 11011 which is 1 + 2 + 8 + 16 = 27 b) 0101 which would be converted this way:

 0 * 1/2 + 1 * 1/4 + 0 * 1/8 + 1 * 1/16 = 5/16 = 0.3125

Number in decimal is 27.3125

you can check the following link for more examples Floating To Decimal

\$\endgroup\$
2
  • 1
    \$\begingroup\$ How did you get 27.9375? \$\endgroup\$ Jan 18 '17 at 7:29
  • \$\begingroup\$ @alex.forencich typo! sorry \$\endgroup\$
    – W1ldworm
    Jan 18 '17 at 7:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.