Go Back   PCMech Forums > Help & Discussion > Internet, Web Applications, & The Cloud

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 10-23-2002, 10:43 AM   #1
Member (10 bit)
 
Airmack's Avatar
 
Join Date: Jul 2002
Location: Ohio
Posts: 521
Binary to decimal.

Not really a problem with internet. But how do I convert binary to decimal?

0110 and 1001

How do you make a decimal into binary?

4-18
62-67
125-130


Thanks for your help!

Ryan J
Airmack is offline   Reply With Quote
Old 10-23-2002, 11:32 AM   #2
Resident Slacker
 
homer15's Avatar
 
Join Date: Dec 2001
Location: Suisun City, California (i know, where the hell is that?!?!?)
Posts: 2,620
here is a binary to decimal converter that sort of shows how it's done.

and here is an all around converter.
__________________
Friends help you move. REAL friends help you move bodies. - me
quite possibly the best book ever written... by me
homer15 is offline   Reply With Quote
Old 10-23-2002, 11:37 AM   #3
Member (14 bit)
 
reboot's Avatar
 
Join Date: Mar 1999
Location: Kelowna, B.C., Canada
Posts: 9,138
Basic binary is easy.
The first digit (it's backwards in binary, you start at the right and work your way left) is worth 1, the second digit is worth 2, the third 4, the fourth 8, the fifth 16 and so on. Just add them up.
So 0110 translates as zero ones, one 2, one 4, and zero 8's. Thus it's adding 2 and 4 to get 6, and 1001 is one 1, zero 2's, zero 4's, and one 8, added up make 9.
__________________
Black holes are where God divided by zero...
Cheers, Jim

Jims Modems
reboot is offline   Reply With Quote
Old 10-23-2002, 11:54 AM   #4
Member (10 bit)
 
Join Date: Jan 2002
Location: Edmonton, AB, Canada
Posts: 628
Binary to decimal
6 and 9

Decimal to binary
100-10010
111110-1000011
1111101-10000010

To get those conversions you can cheat and just use a scientific calculator and go from dec ---> bin and bin ---> dec. You can even use the built in windows calculator as long as you change it from standard to scientific.
To convert it you need to know how many characters are in a number system decimal = 10, binary = 2, hex =16, oct = 8, etc.
In a decimal system the number (usable numbers are 0123456789)
12345
is the same as
1*10^4 + 2*10^3 + 3*10^2 + 4*10^1 + 5*10^0
is the same as
10000 + 2000 + 300 + 40 + 5.

Where as the binary system the number (usable numbers are 01)
10111011
is the same as
1*2^7 + 0*2^6 + 1*2^5 + 1*2^4 + 1*2^3 + 0*2^2 + 1*2^1 + 1*2^0
which is the same as
128 + 0 + 32 + 16 + 8 + 0 + 2 + 1
which is the same as
187

You should see the pattern, this method will convert any number system into a decimal one (changes need to be made if dealing with number systems larger then the decimal system, but I will not detail that now). You take the number and time it by the number base you are dealing with dec = 10 bin = 2 to the power of the placeholder. For example the number 5061 (in the decimal system) has a 5 in the third place holder a 0 in the second a 6 in the first and a 1 in the zero. Hopefully that explains it well enough for you to convert any (binary) number system into decimal.

As for converting decimal into binary it is a little bit more difficult as most people normally think in decimal and not binary so a little more work needs to be done.
Lets convert the following number into binary
736
first see what the largest power of two that will fit into that
2^0 = 1
2^1 = 2
2^2 = 4
2^3 = 8
2^4 = 16
2^5 = 32
2^6 = 64
2^7 = 128
2^8 = 256
2^9 = 512 (biggest that fits)
so now subtract 2^9 or 512 from 736
736 - 512 = 224
again find the largest power of two that will fit into it
2^7 =128
repeat the subtraction procedure
224 - 128 = 96
and continue
2^6 = 64
96 - 64 = 32
2^5 = 32
32 - 32 = 0 (once you reach zero your done)

Now what numbers did we subtract from the original
2^9 + 2^7 + 2^6 + 2^5
these places will have a value of one in the binary system all others will have a zero.
To be more complete you can write the above equation will the zero places
1*2^9 + 0*2^8 + 1*2^7 + 1*2^6 + 1*2^5 + 0*2^4 + 0*2^3 + 0*2^2 + 0*2^1 + 0*2^0

now writing it in binary
1011100000
check the results using a calculator untill you get the hang of the procedure.

Well I hope that helps you there Airmack.
Trent Steel is offline   Reply With Quote
Old 10-23-2002, 12:08 PM   #5
Member (14 bit)
 
reboot's Avatar
 
Join Date: Mar 1999
Location: Kelowna, B.C., Canada
Posts: 9,138
Yeah, what he said...
reboot is offline   Reply With Quote
Old 10-23-2002, 12:32 PM   #6
Canadian Content
Premium Member
 
TEEB's Avatar
 
Join Date: Dec 1999
Location: Vancouver Island , BC, Canada
Posts: 1,589
Us Canadians really know our math
__________________
The older I get, The better I was!
TEEB is offline   Reply With Quote
Old 10-23-2002, 12:57 PM   #7
Resident Slacker
 
homer15's Avatar
 
Join Date: Dec 2001
Location: Suisun City, California (i know, where the hell is that?!?!?)
Posts: 2,620
sometimes, i like to look at decimal to binary as sort of using a filter.


you start with 512:
___
______
__________
_____________
_________________
___________________
______________________
________________________
__________________________
________________________________
________________________________
__________________________ 1
________________________ 2
______________________ 4
___________________ 8
________________ 16
_____________ 32
__________ 64
______ 128
___ 256
512



you take your number, whatever it is, and slide it through the filter. the filter takes out the chunck that it's alotted and moves it down. for each chunk taken, a 1 is placed under the value.
like, say you had 176. slide it through the filter, and 128 takes a chunk, 32 takes a chunk, and 16 takes a chunk. leaving the binary number 0010110000.
i know it's sort of stupid, but sometimes looking at things in a different way like this helps me out.
homer15 is offline   Reply With Quote
Old 10-23-2002, 01:23 PM   #8
Professional gadfly
 
doctorgonzo's Avatar
 
Join Date: Jan 2002
Location: Minneapolis, MN
Posts: 6,364
Send a message via MSN to doctorgonzo
That's a pretty good visual representation, homer. There is more than one way to think about the concept of base arithmetic.
doctorgonzo is offline   Reply With Quote
Old 10-23-2002, 02:54 PM   #9
Member (10 bit)
 
Airmack's Avatar
 
Join Date: Jul 2002
Location: Ohio
Posts: 521
the binary to decimal was easy, after you seen how its done.

still not sure on the other way around.


Off topic question, can you eneter a binary into IE and get a web site?
Airmack is offline   Reply With Quote
Old 10-23-2002, 03:15 PM   #10
Professional gadfly
 
doctorgonzo's Avatar
 
Join Date: Jan 2002
Location: Minneapolis, MN
Posts: 6,364
Send a message via MSN to doctorgonzo
Quote:
Originally posted by Airmack
Off topic question, can you eneter a binary into IE and get a web site?
No, but you can enter a dotted-quad decimal IP address. Entering http://209.197.112.213/ will get you this forum, but entering the binary address (11010001.11000101.01110000.11010101) will not.
doctorgonzo is offline   Reply With Quote
Old 10-23-2002, 03:30 PM   #11
Stop winking at me!!!
 
Iman74's Avatar
 
Join Date: Dec 2001
Location: CT
Posts: 1,482
Send a message via Yahoo to Iman74
Or you can be like me and just use the Windows Calculator.
Iman74 is offline   Reply With Quote
Old 10-23-2002, 03:34 PM   #12
Member (10 bit)
 
Airmack's Avatar
 
Join Date: Jul 2002
Location: Ohio
Posts: 521
Use my ti 83
Airmack is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 06:17 PM.
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.6.0