Not Yet Answered # Binary Fraction conversion question

Salem 5,138 Discussion Starter tuannie Salem 5,138 Discussion Starter tuannie orko 36 anupam_smart 2 Bench 212 OK, so HostGator for some reason no longer allows gcc/g++ access unless you have a Designated Server account, which is a lot of money to spend just to compile my "Hello World" program. Thus I figured I'd compile at home, then upload. Program is your regular old bare-bones Hello World ...

0

> 1010.1010

Well to the left of the radix point, it's 1, 2, 4, 8 (2^0, 2^1, 2^2, 2^3 etc)

To the right, it's 1/2, 1/4, 1/8, 1/16 (2^-1, 2^-2, 2^-3, 2^-4 etc)

0

Well to the left of the radix point, it's 1, 2, 4, 8 (2^0, 2^1, 2^2, 2^3 etc)

To the right, it's 1/2, 1/4, 1/8, 1/16 (2^-1, 2^-2, 2^-3, 2^-4 etc)

Can you please explain it to me in more details. I still don't get what you mean sorry. :sad:

0

Well it it was decimal, would you still have a problem with it?

It's the same deal, just use base-2 instead of base-10.

0

Well it it was decimal, would you still have a problem with it?

It's the same deal, just use base-2 instead of base-10.

Can you provide me with another example working out so that I can use the example question and try get an understanding out of it and attempt on my quesion.

Thanks in advance....

0

we do binary calculation on following manner:

`0 1 0 . 1 0 1 0*2^0 1*2^(-3) 0 1/8 (.125) 1*2^1 0*2^(-2) 2 0 0*2^2 1*2^(-1) 0 1/2 (.5) ---------------------------------------------------------------- (Adding all) 2. 625`

read carefully, then read salem's posting..... i hope u ll get ur ans. :).... cheers!

0

Hey everyone,

Would someone please be kind enough to direct me to a good explainatory tutorial site or that can explain to me in how I would go about in answering this question.

I don't know where to begin or start.

What is the decimal value of the binary fraction 1010.1010?

Regards,

tuannie

Hello tuannie, :)

Here is something what i tried to explain the conversion u asked for. :idea:

Ok,

:cool:

U asked for the conversion of binary to decimal, check it out:

Let’s say we have to convert –

1010.1010 The no. which u gave;

We solve this kind of problems into two parts as follows:

(<LHS> . <RHS>)

1. First take the left hand side no. of the radix point( . ) which is 1010

to convert it into its equivalent decimal the method is as follows:

1 0 1 0

1*(2^3)+0*(2^2)+1*(2^1)+0*(2^0)=10

i.e. >start from the right-most digit (0 here);

>move from right to left;

>multiply each digit with (2^(position of digit from right-1));

>The sum of all these(10 here) as shown above will give u the decimal equivalent of the

LHS part of radix.

2. Now the important & difficult one;

The Right hand part of radix of the given binary no.

This is 1010 again.Since right-most 0 is of no significance, this can be ommitted

out.

1 0 1

1*(2^-1)+0*(2^-2)+1*(2^-3)=.625 or

[1/(2^1)]+[0/(2^2)]+[1/(2^3)]=.625

Hope u understood this i.e

>we have to move from left to right now.

>multiply each digit with (2^-(position of the digit form radix on left))

or

Divide each digit with (2^position of the digit from radix on left)

>Sum up all these, as above(.625 here) to get the decimal equivalent of RHS part

of no.

The last step is simple:

Just put the two results obtained in step1. & step2. together with the radix ( . )

to get the required result

Here, it would be=10.625

Thus,

Binary equivalent of 1010.1010 is =10.625

Enjoy,

:cool: :cool:

1

Can you provide me with another example working out so that I can use the example question and try get an understanding out of it and attempt on my quesion.

Thanks in advance....

You should really pick up Salem's point about decimal - Just imagine you're going back to infant school maths, where you add numbers using columns:

`[Thousands] [Hundreds] [Tens] [Units] . [Tenths] [Hundredths]`

eg, the number 194.3 is:

`One hundred + Nine tens + Four units + Three tenths`

In decimal, we get our column headers by powers of the base number (decimal is base 10)

```
1 unit * 10^-2 = 0.01 (hundredths)
1 unit * 10^-1 = 0.1 (tenths)
1 unit * 10^0 = 1 (units)
1 unit * 10^1 = 10 (tens)
1 unit * 10^2 = 100 (hundreds)
1 unit * 10^3 = 1000 (thousands)
```

in Binary, the principle is exactly the same.. except binary is base 2.

```
1 unit * 2^-2 = 0.25 (quarters)
1 unit * 2^-1 = 0.5 (halves)
1 unit * 2^0 = 1 (units)
1 unit * 2^1 = 2 (twos)
1 unit * 2^2 = 4 (fours)
1 unit * 2^3 = 8 (eights)
```

So, for the number 1001.0110, we need a table like this

```
[8] [4] [2] [1] . [0.5] [0.25] [0.125] [.0625]
1 0 0 1 . 0 1 1 0
```

So, back to infant school maths - here's our calculation

```
One eight + No fours + No twos + One unit = 9
+
No halves + One quarter + One eighth + No sixteenths = 0.375
result = 9.375
```

This article has been dead for over six months. Start a new discussion instead.

Recommended Articles

Hi. I have a form with list box : lst_product, datagridview : grd_order and button: btn_addline. lst_product has a list of product ids selected from database (MS Acess 2013) , grd_order is by default empty except for 2 headers and btn_addline adds rows to grd_order.

btn_addline :

`Private Sub btn_addline_Click(ByVal ...`

I don’t want at this stage work on a big separate project as I've already got plenty ...