This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's TI-BASIC subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.

This forum is locked: you cannot post, reply to, or edit topics. TI-Basic => TI-BASIC
United-TI Archives -> TI-Basic
 
    » Goto page 1, 2  Next
» View previous topic :: View next topic  
Author Message
frankwthompson


Newbie


Joined: 28 Apr 2004
Posts: 1

Posted: 28 Apr 2004 08:22:57 pm    Post subject:

I'm trying to make a base changer for my TI-83+ right now, like base 10 (regular numbers) to something like binary (10101110). I also want to be able to change numbers from a different base to base 10. I got it working for changing from base 10 to another, but I can't get it to do the opposite. For bases other than 10, I was thinking of having the user input each number individually, like for the trinary number 20101 the user would input 2, then it would ask if the user would done, then the user would input 0, 1, 0, and 1, each time (except for the last) asking if there are more numbers. Could someone help me with storing the numbers that they enter and recognizing how many they entered?
Back to top
Fr0sty


Member


Joined: 27 Nov 2003
Posts: 202

Posted: 28 Apr 2004 08:36:24 pm    Post subject:

You could TRY


Code:
Input Str1
Length(Str1


and that will give you the length.


Code:
expr(str1


will give you the value.

I think if you want to change bases, you could use logarithms? I'm not really sure how my algebra II teacher explained that...
Back to top
Ray Kremer


Member


Joined: 16 Feb 2004
Posts: 237

Posted: 29 Apr 2004 12:22:59 am    Post subject:

You can probably find several base changing programs at ticalc.org. Or google for the routine if you still want to write the code on the 83 yourself.
Back to top
Darth Android
DragonOS Dev Team


Bandwidth Hog


Joined: 31 May 2003
Posts: 2104

Posted: 29 Apr 2004 05:04:22 pm    Post subject:

i have a prgm that can convert up to an 8 digit number from any base 2-32 to any base 2-32. ill try to find it.
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 29 Apr 2004 05:22:41 pm    Post subject:

Also, ln(x)/ln(b is the base b log of x. That might help.
Back to top
Awesome1


Advanced Member


Joined: 28 Jan 2004
Posts: 269

Posted: 29 Apr 2004 07:18:01 pm    Post subject:

What is a "base"? I really don't understand what u guys are talking about? Can someone kindly explain what a "base" is and tell me what's it used for?
Back to top
Jeremiah Walgren
General Operations Director


Know-It-All


Joined: 24 May 2003
Posts: 1937

Posted: 29 Apr 2004 09:33:09 pm    Post subject:

Awesome1 wrote:
What is a "base"? I really don't understand what u guys are talking about? Can someone kindly explain what a "base" is and tell me what's it used for?

The "base" frank is talking about, I believe, has to deal with number bases. The number system most people are used to is base 10. Basically, this means that the numbering system starts at 0 and increases 10 times before starting over. Example: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10. It could continue on, 11, 12, 13, etc until it hits 20. Then the process would start again.

Binary would start at 0, representing 0, then increase by one to get 1, then it would start over again at 0 with a 10 in front, representing two. Then 11, 100, 101, 111, etc. (Representing 3, 4, 5, 6, and 7 respectively.)

It's been a while since the concept was explained to me, and I even thought about it, but I think that's the general idea. I probably got the whole thing mixed up, so you may want to take a look at this.

The other base people are talking about is the logarithmic base.

A logarithmic equation is y=log a x (y equals log base a of x) where a is the base and x is the number (with y as your outcome). (The inverse of that is a^y=x, if you wanted to know.) Sir Robin posted what's the called the change of base formula. Since your calculator can only handle two bases, base 10 and base e, you need a way to type different bases (such as base 3 or something) into your calculator. That's what that does.

Hopefully I got all the info right... Neutral By the way, I think Omnicalc has a base change function, but I'm not quite sure.
Back to top
Darth Android
DragonOS Dev Team


Bandwidth Hog


Joined: 31 May 2003
Posts: 2104

Posted: 29 Apr 2004 11:07:49 pm    Post subject:

yes, omnicalc has a base change function, it modifes the ourput from the processor.

in simple:
a base is how many #'s can be in a place value before it overflows into teh next place value.
base 2, you can have 2 #'s, a 0 and a 1.
base 10 (normal) you can have anythign from a 0-9. once you hit 10, you move over into another place value.
Back to top
Ray Kremer


Member


Joined: 16 Feb 2004
Posts: 237

Posted: 30 Apr 2004 02:41:10 am    Post subject:

As a further example, base 16, aka hexadecimal:
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 1A, 1B, 1C, 1D, 1E, 1F, 20, 21, 22, ...

There are 10 kinds of people in the world, those who understand binary and those who don't.
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 30 Apr 2004 04:10:53 pm    Post subject:

Then there's fractional bases, which use the number of digits in the next integer base, but work differently. And for all bases less than 2, there is more than one way to express a number.

But for most cases, you don't need to worry about these.


Last edited by Guest on 30 Apr 2004 05:56:27 pm; edited 1 time in total
Back to top
Awesome1


Advanced Member


Joined: 28 Jan 2004
Posts: 269

Posted: 30 Apr 2004 05:39:39 pm    Post subject:

Ah ok, makes more sence now, never heard of them probably since im in geometry, unless my teacher sucks....lol thanks for the info people Wink
Back to top
Fr0sty


Member


Joined: 27 Nov 2003
Posts: 202

Posted: 30 Apr 2004 10:11:22 pm    Post subject:

Yeah, it's algebra II Laughing
Back to top
Jeremiah Walgren
General Operations Director


Know-It-All


Joined: 24 May 2003
Posts: 1937

Posted: 30 Apr 2004 11:03:07 pm    Post subject:

Fr0sty wrote:
Yeah, it's algebra II  Laughing

I'm in Calculus currently, so I've had logarithmic stuff taught to me three years in a row now. Kind of gets in your head, ya know? (Though I can never actually explain it too well...)
Back to top
Ray Kremer


Member


Joined: 16 Feb 2004
Posts: 237

Posted: 01 May 2004 12:18:03 am    Post subject:

Sir Robin wrote:
Then there's fractional bases, which use the number of digits in the next integer base, but work differently. And for all bases less than 2,  there is more than one way to express a number.

Fractional bases? Bases less than 2? First I've heard of such things. Crazy dren, man. Craaaaaaazy.
Back to top
Adm.Wiggin
aka Tianon


Know-It-All


Joined: 02 Jun 2003
Posts: 1874

Posted: 01 May 2004 12:26:25 am    Post subject:

Bases are Algebra II? wow, I'm ahead of my classmates Laughing.

Base converters are hard yet fun to make Laughing.


Last edited by Guest on 01 May 2004 12:26:41 am; edited 1 time in total
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 01 May 2004 11:16:21 am    Post subject:

Bases are Algebra II, Honors Algebra I, or Computer Science, whichever you take first.
Back to top
Darth Android
DragonOS Dev Team


Bandwidth Hog


Joined: 31 May 2003
Posts: 2104

Posted: 04 May 2004 01:47:35 am    Post subject:

http://nwps.ws/~dragonfire/programs/BASE.8xp
it will convert any length number bases 2-32 into any base 2-32
it will ask for the number, which you simply type in, then the base the number's in, and then teh base you want it to display in.
[base 32 is numbers 0-9 and letters A-V for those that care]


Last edited by Guest on 04 May 2004 01:47:46 am; edited 1 time in total
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 04 May 2004 05:01:43 pm    Post subject:

Does it do fractions? Like, 1.5 decimal = 1.1 binary.
Back to top
Adm.Wiggin
aka Tianon


Know-It-All


Joined: 02 Jun 2003
Posts: 1874

Posted: 04 May 2004 07:27:36 pm    Post subject:

that is not correct of course Wink
Back to top
X1011
10100111001


Active Member


Joined: 14 Nov 2003
Posts: 657

Posted: 04 May 2004 07:40:38 pm    Post subject:

Yes it is, 1*10^0 + 5*10^-1 = 1*2^0 + 1*2^-1

Last edited by Guest on 04 May 2004 07:41:25 pm; edited 1 time in total
Back to top
Display posts from previous:   
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
    » Goto page 1, 2  Next
» View previous topic :: View next topic  
Page 1 of 2 » All times are UTC - 5 Hours

 

Advertisement