PDA

View Full Version : Binary Question



sampson
06-13-2004, 04:53 AM
Not sure if this is the place for this post but oh well, here goes.

I'm studying for the A+ test and I've got a binary question. This is what the book says: (I'm going to use '~' as the infinity symbol)

"You may see a question on the test asking you to convert a binary number such as 00000101 to a decimal value-you know, ordinary numbers. The key is to remember that each position represents a power of two, starting with 0 on the right end up through 7 at the left end. For example the binary number 00001010 contains:

0 ~ 20 = 0 (Any number to the zero power is worth 1)
1 ~ 21 = 2 (Any number to the one power is the number)
0 ~ 22 = 0 (Two times two)
1 ~ 23 = 8 (Two times two times two)

Totaling 10 (The remaining positions are all zero)

So, 00001010 in binary is the same as 10 in decimal Just count the positions, starting from the right with zero, and then calculate the powers of two for each position with a one."


Can anyone explain this more or give me a link to a site that will explain this differently, cause I ain't gettin it.

peat moss
06-13-2004, 05:11 AM
Can anyone explain this more or give me a link to a site that will explain this differently, cause I ain't gettin it.


No kidding fuk ,I just got a headache :lol:

Xilo
06-13-2004, 05:44 AM
Just remember that it goes from right to left starting with: 1, 2, 4, 8, 16, 32... A 1 means it's on and a 0 means it's off. So, just figure out what positions the 1s are in, and add them together. Like...

100101 = 1 + 4 + 32 = 37

sampson
06-13-2004, 05:56 AM
Originally posted by Xilo@12 June 2004 - 23:52
Just remember that it goes from right to left starting with: 1, 2, 4, 8, 16, 32... A 1 means it's on and a 0 means it's off. So, just figure out what positions the 1s are in, and add them together. Like...

100101 = 1 + 4 + 32 = 37
Okay, got it. So then how would you do this backwards. For instance, how would you turn the number 4805 into binary?

Xilo
06-13-2004, 06:18 AM
Originally posted by sampson+13 June 2004 - 00:04--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td>QUOTE (sampson &#064; 13 June 2004 - 00:04)</td></tr><tr><td id='QUOTE'> <!--QuoteBegin-Xilo@12 June 2004 - 23:52
Just remember that it goes from right to left starting with: 1, 2, 4, 8, 16, 32... A 1 means it&#39;s on and a 0 means it&#39;s off. So, just figure out what positions the 1s are in, and add them together. Like...

100101 = 1 + 4 + 32 = 37
Okay, got it. So then how would you do this backwards. For instance, how would you turn the number 4805 into binary? [/b][/quote]
To do that, make a table with the number you want in the far right. Then keep deviding by 2 like this (use only whole numbers) and then for every odd number, place a 1 below and for every even number, place a 0 below:



Decimal&#58; 0 1 2 4 9 18 37 75 150 300 600 1201 2402 4805
Binary&#58; &nbsp;1 0 0 1 0 1 1 0 0 0 &nbsp;1 0 1

So 4805 in binary is equal to 1001011000101

And to convert back:
4096 + 512 + 128 + 64 + 4 + 1 = 4805

Simple as pie :P

sampson
06-13-2004, 07:03 AM
Decimal: 0 1 2 4 9 18 37 75 150 300 600 1201 2402 4805
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Binary:&nbsp; &nbsp; 1 0 0 1&nbsp; 0&nbsp; 1&nbsp; 1&nbsp; 0&nbsp; 0&nbsp; 0&nbsp; &nbsp; 1&nbsp; &nbsp; 0&nbsp; &nbsp; 1

I think you&#39;re on the right track but not quite there. By using your technique, I do not come up with the correct answers that they have in their examples. For instance, they turn 63,529 into 1111100000101001. Let me know if you want me to quote the books example for further info.

Xilo
06-13-2004, 07:14 AM
Originally posted by sampson@13 June 2004 - 01:11

Decimal: 0 1 2 4 9 18 37 75 150 300 600 1201 2402 4805
Binary: 1 0 0 1 0 1 1 0 0 0 1 0 1

I think you&#39;re on the right track but not quite there. By using your technique, I do not come up with the correct answers that they have in their examples. For instance, they turn 63,529 into 1111100000101001. Let me know if you want me to quote the books example for further info.

Um yes it does...


Decimal&#58; 1 3 7 15 31 62 124 248 496 992 1985 3970 7941 15882 31764 63529
Binary&#58; 1 1 1 1 1 0 0 0 0 0 1 0 1 0 0 1


There ya go, you musta done something wrong...

sampson
06-13-2004, 07:42 AM
Originally posted by Xilo+13 June 2004 - 01:22--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td>QUOTE (Xilo &#064; 13 June 2004 - 01:22)</td></tr><tr><td id='QUOTE'> <!--QuoteBegin-sampson@13 June 2004 - 01:11

Decimal: 0 1 2 4 9 18 37 75 150 300 600 1201 2402 4805
Binary: 1 0 0 1 0 1 1 0 0 0 1 0 1

I think you&#39;re on the right track but not quite there. By using your technique, I do not come up with the correct answers that they have in their examples. For instance, they turn 63,529 into 1111100000101001. Let me know if you want me to quote the books example for further info.

Um yes it does...


Decimal&#58; 1 3 7 15 31 62 124 248 496 992 1985 3970 7941 15882 31764 63529
Binary&#58; 1 1 1 1 1 0 0 0 0 0 1 0 1 0 0 1


There ya go, you musta done something wrong... [/b][/quote]
Are you rounding up and down to the nearest whole number?

By the way, thanks for sticking with me on this so far :)

Xilo
06-13-2004, 07:54 AM
Originally posted by sampson+13 June 2004 - 01:50--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td>QUOTE (sampson @ 13 June 2004 - 01:50)</td></tr><tr><td id='QUOTE'>
Originally posted by Xilo@13 June 2004 - 01:22
<!--QuoteBegin-sampson@13 June 2004 - 01:11

Decimal: 0 1 2 4 9 18 37 75 150 300 600 1201 2402 4805
Binary: 1 0 0 1 0 1 1 0 0 0 1 0 1

I think you&#39;re on the right track but not quite there. By using your technique, I do not come up with the correct answers that they have in their examples. For instance, they turn 63,529 into 1111100000101001. Let me know if you want me to quote the books example for further info.

Um yes it does...


Decimal&#58; 1 3 7 15 31 62 124 248 496 992 1985 3970 7941 15882 31764 63529
Binary&#58; 1 1 1 1 1 0 0 0 0 0 1 0 1 0 0 1


There ya go, you musta done something wrong...
Are you rounding up and down to the nearest whole number?

By the way, thanks for sticking with me on this so far :) [/b][/quote]
I&#39;m rounding down.

sampson
06-13-2004, 08:13 AM
Oh I&#39;ve got it&#33;&#33; :o

Ignore the fractions altogether. B)

Many many thanks

tesco
06-13-2004, 02:46 PM
hmm, im gonna save this explanation, might come in handy for me in the future :D

sampson
06-15-2004, 10:51 AM
I&#39;ve also learned that the Windows XP calculator will convert binary, hexadecimal, etc. First you&#39;ll have to go view>scientific