| Pages: [1] :: one page |
| Author |
Thread Statistics | Show CCP posts - 0 post(s) |

Pehova Mindtriq
|
Posted - 2005.12.18 14:18:00 -
[1]
Im trying to learn converting binary to decimal and ive come to an exercise i can't solve.
Q: Convert this to decimal 1010101.01010
I get the answer 85.1 but the correct answer is 85.3125 I got the first part right(85) but have no clue where the 0.3125 came from, help please.
|

Grimwalius d'Antan
|
Posted - 2005.12.18 14:31:00 -
[2]
Maybe you're not supposed to convert the 0.01010 part on it's own? I didn't even know you could have floats with binarys, so I sure as hell can't do anything but inspire your thinking.
|

Chrisb6122
|
Posted - 2005.12.18 14:34:00 -
[3]
where did u get the .3125 from exactly?
an answer sheet?
PS out of pod maybe? _____
Tech 2 trader; "puppets the lot of ya's, except a few <3"
|

Jenny Spitfire
|
Posted - 2005.12.18 14:37:00 -
[4]
Originally by: Pehova Mindtriq Im trying to learn converting binary to decimal and ive come to an exercise i can't solve.
Q: Convert this to decimal 1010101.01010
I get the answer 85.1 but the correct answer is 85.3125 I got the first part right(85) but have no clue where the 0.3125 came from, help please.
.01010 == 1/2 (0) + 1/4 (1) + 1/8 (0) + 1/16 (1) + 1/32 (0) == 0.25 + 0.0625 = 0.3125
 ----------------
RecruitMe@NOINT! |

Pehova Mindtriq
|
Posted - 2005.12.18 14:38:00 -
[5]
Originally by: Chrisb6122 where did u get the .3125 from exactly?
an answer sheet?
PS out of pod maybe?
Yeah i got it from an answer sheet. And this is in "out of pod" or have the forums messed up again?
|

Chrisb6122
|
Posted - 2005.12.18 14:40:00 -
[6]
Originally by: Pehova Mindtriq
Originally by: Chrisb6122 where did u get the .3125 from exactly?
an answer sheet?
PS out of pod maybe?
Yeah i got it from an answer sheet. And this is in "out of pod" or have the forums messed up again?
nope i can't read, hang overs 4tl _____
Tech 2 trader; "puppets the lot of ya's, except a few <3"
|

Pehova Mindtriq
|
Posted - 2005.12.18 14:41:00 -
[7]
Originally by: Jenny Spitfire
Originally by: Pehova Mindtriq Im trying to learn converting binary to decimal and ive come to an exercise i can't solve.
Q: Convert this to decimal 1010101.01010
I get the answer 85.1 but the correct answer is 85.3125 I got the first part right(85) but have no clue where the 0.3125 came from, help please.
.01010 == 1/2 (0) + 1/4 (1) + 1/8 (0) + 1/16 (1) + 1/32 (0) == 0.25 + 0.0625 = 0.3125

Ah thanks alot.
|

Lord Aradon
|
Posted - 2005.12.18 23:39:00 -
[8]
I am assuming you want to do these calculations by hand. Here is a way I was taught to convert from decimal to binary: For integers (or the integer part of a number), divide repeatedly by 2, using "remainders" rather than decimal places, until you get down to 1. For example, convert decimal 49 to binary: 49/2 = 24 r 1 24/2 = 12 r 0 12/2 = 6 r 0 6/2 = 3 r 0 3/2 = 1 r 1 1/2 = 0 r 1 Now read the remainders from bottom to top: the binary equivalent is 110001
To convert numbers between 0 and 1, take the decimal expression and repeat- edly multiply it by 2. At each step, keep track of the integer part of the result but do not carry it along in subsequent multiplications. For example, convert decimal 0.7 to binary: 0.7 * 2 = 1.4 0.4 * 2 = 0.8 0.8 * 2 = 1.6 0.6 * 2 = 1.2 0.2 * 2 = 0.4 0.4 * 2 = 0.8 0.8 * 2 = 1.6 0.6 * 2 = 1.2 etc. Note that we have started to repeat previous results. Now read the integer parts occurring on the right side, from the top down: the binary representation of decimal 0.7 is 0.1011001100... where the "1100" repeats forever.
The straightforward way of converting binary to decimal is the only way I know. For the integer part, you simply add up the appropriate powers of 2, and for the fractional part you add up the appropriate powers of 1/2.
Example: convert binary 1101001 to decimal: 1 + 8 + 32 + 64 = 105
Example: convert binary 0.1101001 to decimal : .5 + .25 + .0625 + .0078125 = .8203125
(or equivalently, treat the fractional representation as though it were an integer, do the conversion as shown above, then divide by 2 raised to the power of the number of digits in the representation: for this example, we get 105/128 which does equal .8203125).
Response #: 2 of 2 Author: chaffer You can also convert from binary to decimal by reversing the method given for going from decimal to binary. That is, let ans start at 0 and suppose the binary number is 11010111. Then compute new values of ans as shown below: ans * 2 + 1 =>ans ans * 2 + 1 =>ans ans * 2 + 0 =>ans ans * 2 + 1 =>ans ans * 2 + 0 =>ans ans * 2 + 1 =>ans ans * 2 + 1 =>ans ans * 2 + 1 =>ans
At this point, ans contains the converted number. That method is especially good for use with a calculator or computer. There is a similar procedure for fractions except you must go right to left and divide by 2 rather than multiply.
Sorry if it looks crap, damn space reducer.
Free Websites |

Jenny Spitfire
|
Posted - 2005.12.18 23:44:00 -
[9]
Originally by: Lord Aradon ...

Du spechen binary.  ----------------
RecruitMe@NOINT! |

Lord Aradon
|
Posted - 2005.12.19 00:59:00 -
[10]
Edited by: Lord Aradon on 19/12/2005 01:01:00
Originally by: Jenny Spitfire
Originally by: Lord Aradon ...

Du spechen binary. 
Fraid so, my favorite party trick is to get people to choose 50 random letters and numbers. I then recite everything in the exact order that they gave me them. ( i do this by sequencing the binary in my head as i go along and then reverse it when i recite everything)
Geek i know 
Free Websites |

Jenny Spitfire
|
Posted - 2005.12.19 01:51:00 -
[11]
Edited by: Jenny Spitfire on 19/12/2005 01:52:36
Originally by: Lord Aradon Geek i know 
Nah, not that bad. I used to remember the whole ASCII 256 character set table like how I used to remember the periodical table for the chemistry chart.  
The only key that I can still remember from ASCII is the character 'd' or 0x64h because it corresponds to 100 that is useful for game hacking  ----------------
RecruitMe@NOINT! |

Baldour Ngarr
|
Posted - 2005.12.19 06:54:00 -
[12]
Originally by: Lord Aradon Fraid so, my favorite party trick is to get people to choose 50 random letters and numbers. I then recite everything in the exact order that they gave me them. ( i do this by sequencing the binary in my head as i go along and then reverse it when i recite everything)
Geek i know 
Huh.
Wouldn't it be easier to just remember them? Or is that just me?
"I tried strip mining, but I lost, and it's cold flying around in space naked." |

Lord Aradon
|
Posted - 2005.12.19 08:52:00 -
[13]
Try remembering 50 random letters and numbers thrown at you rapid succession, im talking about something like.
15486D, G69D46 here, not a, 2, r, 8
Free Websites |

Thomus
|
Posted - 2005.12.19 09:17:00 -
[14]
lol @ us binary geeks.
the numbers after the 'decimal' point work just like the base ten numbers.
Where 0.1 = 1 tenth, and 0.01 = 1 hundredth, binary works in a similar way, where 0.1 = 1/2, 0.01 = 1/4 and so on. I think.
---------------- Tom |

Skogul
|
Posted - 2005.12.19 11:42:00 -
[15]
Sorry guy's, but you really need to go out and get laid.
Regards
|

Ethidium Bromide
|
Posted - 2005.12.19 13:13:00 -
[16]
Originally by: Skogul Sorry guy's, but you really need to go out and get laid.
Regards
binary too... 1 = in 0 = out _________________________________ just because you are not paranoid doesn't mean i'm not following!
|

Lord Aradon
|
Posted - 2005.12.19 13:43:00 -
[17]
Originally by: Ethidium Bromide
Originally by: Skogul Sorry guy's, but you really need to go out and get laid.
Regards
binary too... 1 = in 0 = out
ph3ar t3h ·ber l337 p0w3r ov da b|nar$ 
Free Websites |

POSITRON
|
Posted - 2005.12.19 14:03:00 -
[18]
lol @ Ethidium
"There are 10 types of people. Those who understand binary and those who don't."
|

Thomus
|
Posted - 2005.12.19 16:04:00 -
[19]
god i love binary jokes like that ^
and:
Quote: get laid
twice yesterday, one the night before. i have a gf.
---------------- Tom |

Hellraiza666
|
Posted - 2005.12.19 16:09:00 -
[20]
why would you WANT to memorize 50 random numbers...... --------------------------------------------
In War There Are No Runners Up...
|

Lord Aradon
|
Posted - 2005.12.19 16:27:00 -
[21]
Originally by: Hellraiza666 why would you WANT to memorize 50 random numbers......
coz i can
Free Websites |
| |
|
| Pages: [1] :: one page |
| First page | Previous page | Next page | Last page |