Re: Simple Problem ??
- To: mathgroup at smc.vnet.net
- Subject: [mg39234] Re: [mg39226] Simple Problem ??
- From: "Mihajlo Vanevic" <mvane at eunet.yu>
- Date: Wed, 5 Feb 2003 00:10:59 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
Try base = 2; number = 11111111; ToExpression[ToString@Evaluate@base <> "^^" <> ToString@Evaluate@number] or FromDigits[IntegerDigits@number, base] Regards, Mihajlo Vanevic mvane at EUnet.yu 2003-02-04 ************************************************************** * At 2003-02-04, 02:23:00 * AON NEWS, frodo.biggins at gmx.net (nospam) wrote: ************************************************************** >Hi >it seems I have a simple problem, but I cannot find a (simple)solution: > >if I type 2^^1000111 mathematica calculates the correct dec. number > >but if I type: base=2; number=1000111; base^^number all I get is a error >message ??? > >So a function Convert[number_,base_] for base convertions cannot work ... >Any ideas >Thx >Werner >-- > >*************************************************************************** >Prof. Mag. Werner CYRMON >HTBLuVA Wr. Neustadt Abt. EDVO >http://edvowww.htlwrn.ac.at/cyx >*************************************************************************** >If you can imagine it, you can do it! Walt Disney >*************************************************************************** >Want to learn math with fun or calculating some stuff online: >Look at http://Onlinemath.htlwrn.ac.at **************************************************************