|
-
Jul 19th, 2005, 08:07 AM
#1
Thread Starter
Fanatic Member
Conversions - Dec to Hex, Oct, Bin
How can i convert the following?
Last edited by x-ice; Jul 21st, 2005 at 09:28 AM.
-
Jul 19th, 2005, 08:12 AM
#2
-
Jul 19th, 2005, 08:45 AM
#3
Thread Starter
Fanatic Member
Re: Conversions - Dec to Hex, Oct, Bin
 Originally Posted by manavo11
Ok i dont understand the conversion from decimal to hex, can anyone explain? (nevermind, i get it now)
Last edited by x-ice; Jul 19th, 2005 at 10:34 AM.
-
Feb 27th, 2006, 02:32 PM
#4
Fanatic Member
Re: Conversions - Dec to Hex, Oct, Bin
I want to convert contents of a text box from decimal to binary... how do i do this?
-
Feb 27th, 2006, 03:44 PM
#5
Re: Conversions - Dec to Hex, Oct, Bin
First convert the string to numeric data type. (Long)
Then see post#3 of this very old thread.
Also, for VB.NET see this this thread.
For working with ONLY small numbers see this thread.
-
Feb 28th, 2006, 12:06 PM
#6
PowerPoster
Re: Conversions - Dec to Hex, Oct, Bin
ABC (base 16) to base 10 = (12 * 16^0) + (11 * 16^1) + (10 * 16^2) = 2748
2748 (base 10) to base 16
= 2748 / 16 = 171 remainder 12
= 171 / 16 = 10 remainder 11
= 10 / 16 = 0 remainder 10
Convert the remainders into the proper letters and place them bottom to top.
10, 11, 12 = ABC
This conversion works fine in any scenerio. Just replace the 16 with whatever base you want. You must use ints however, double precision division will corrupt this.
"From what was there, and was meant to be, but not of that was faded away." - - Steve Damm
"The polar opposite of nothingness is existance. When existance calls apon nothingness it shall return to nothingness." - - Steve Damm
"When you do things right, people won't be sure if you did anything at all." - - God from Futurama
-
Feb 28th, 2006, 03:04 PM
#7
Fanatic Member
Re: Conversions - Dec to Hex, Oct, Bin
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|