Go Back   Flash Flash Revolution > General Discussion > Chit Chat
Register FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
Old 03-8-2007, 04:10 PM   #1
RandomPscho
FFR Player
 
Join Date: Jun 2006
Location: New York
Age: 32
Posts: 504
Default Base Conversions

Hey all,
I have to make a program that converts from any base number system to another. I know how to do anything to base ten, but how do you go from anything to anything?

Going to base ten is simple:

digit3 * base^2 + digit2 *base^1 +digit1*base^0 etc;
but how do you set it up to go from other bases? I know its easy, but I can't think of the setup -.-

Thanks.
RandomPscho is offline   Reply With Quote
Old 03-11-2007, 07:39 PM   #2
RandomPscho
FFR Player
 
Join Date: Jun 2006
Location: New York
Age: 32
Posts: 504
Default Re: Base Conversions

Thanks for the help everyone :/

I got it working.
RandomPscho is offline   Reply With Quote
Old 03-11-2007, 10:29 PM   #3
AirForceBlue
FFR Player
 
AirForceBlue's Avatar
 
Join Date: Mar 2007
Location: New Orleans, Louisiana
Age: 32
Posts: 64
Send a message via AIM to AirForceBlue
Default Re: Base Conversions

Congrats on getting it working =]

Sorry about that, I honestly didn't know how I could get that done. What language were you doing this in?
AirForceBlue is offline   Reply With Quote
Old 03-12-2007, 08:06 AM   #4
RandomPscho
FFR Player
 
Join Date: Jun 2006
Location: New York
Age: 32
Posts: 504
Default Re: Base Conversions

Java -- all standard classes (String Scanner and StringBuffer is all I used I think :s, oh and the Math class )

Last edited by RandomPscho; 03-12-2007 at 03:26 PM..
RandomPscho is offline   Reply With Quote
Old 04-15-2007, 06:51 PM   #5
Zovistograt
FFR Player
 
Zovistograt's Avatar
 
Join Date: Apr 2007
Location: New York
Posts: 27
Default Re: Base Conversions

I know it has something to do with s.toString(int, int)...with s being a String and those two ints being something and the base you want...I forgot the exact usage though
__________________
http://spzc.net/
Zovistograt is offline   Reply With Quote
Old 04-15-2007, 08:23 PM   #6
RandomPscho
FFR Player
 
Join Date: Jun 2006
Location: New York
Age: 32
Posts: 504
Default Re: Base Conversions

Quote:
Originally Posted by Zovistograt View Post
I know it has something to do with s.toString(int, int)...with s being a String and those two ints being something and the base you want...I forgot the exact usage though
Ummm, what?
RandomPscho is offline   Reply With Quote
Old 04-15-2007, 10:33 PM   #7
g4z33b0
Banned
 
Join Date: Mar 2006
Location: Apex, NC
Age: 33
Posts: 2,618
Send a message via AIM to g4z33b0
Default Re: Base Conversions

Oh damn I wish I had my old C++ base converter for you, it did any conversion from 32 down.
g4z33b0 is offline   Reply With Quote
Old 04-16-2007, 05:15 AM   #8
RandomPscho
FFR Player
 
Join Date: Jun 2006
Location: New York
Age: 32
Posts: 504
Default Re: Base Conversions

Mine does up to 35
RandomPscho is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

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 Off

Forum Jump



All times are GMT -5. The time now is 02:09 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright FlashFlashRevolution