
TI83 Calc  Converting Binary to Decimal
Hi,
Does anyone know how to convert Binary numbers (eg. 11001) to Decimal numbers (eg. 25) using a program on a TI83?
Thanks,
Neil

not sure of how the code would go, but:
i would loop for each digit starting on the right, and keep a running total of the number. If the number is a 1, add 2^character position (ones digit=1,10s digit=2,...). Loop until the last character is reached.
Here is a javascript that will do that, if you want to try changing it to fit the ticalc:
PHP Code:
<script type="text/javascript">
var myNum = "11011"
var newNum = parseInt(myNum, 2)
alert(newNum)
</script>
Last edited by steelersfan88; 03202004 at 10:41 PM.

The only problem is I'm not sure the calc can get individual digits from a variable. Is there one? Or is there another way of doing so?
Thanks,
Neil

Try this link, maybe this will do it: here

Thanks, but it looks like that is programed in BASIC. The calculator has it's own programming language, which I am using.
Thanks,
Neil

Yes, the calculator has it's own programming language  TI83 BASIC. As far as I can see, that program should be suitable, as should this one.
Adam

Wow  I downloaded that last Zip and looked in HEX.83G and it looked nothing like the TI programming language I'm used to. Maybe I need some special program to view it properly. Is there a mathamatical formula to convert binary to dec? I've got a programme which converts decimal to binary.
Thanks for your help,
Neil

do you have the silver edition, or regular?

I have the TI83 Plus.
Thanks,
Neil

the reason its not showing is because you don't have the TI83 fonts installed on your computer, you'll need to do that then open it up in word... or the TI software

Not to worry  I've invented my own. It converts bases 29 to base 10 (Normal). Here it is. > is store.
Lbl 0
ClrHome
Disp "ENTER NUM"
Prompt A
Disp "Base:"
Prompt F
A>E
ClrHome
Output(1,1,E)
0>C
1>D
While A>0
round(0.1A,0)*10>B
D(AB)+C>C
0.1B>A
FD>D
End
Output(8,1,C)
Pause
Menu("AGAIN?","YES",0,"NO",1)
Lbl 1
Stop
Neil

Error discovered, wont work for bases above 5.
Neil

Try "Int" or "Floor" or something instead of "Round". Does that fix it?

You could make the user's binary number be stored in a string and then use sub() to get numbers out of that string.
The only problem is that you would get "1" instead of 1 (or "0" instead of 0)
I don't know function in Basic to convert the "1" to the 1 (SURE WOULD LIKE TO KNOW A WAY), so you would have to do it like this
Input "binary number",str1
length(str1)>A
0>R
for(i,1,A)
If sub(str1,i,1)="1"
R+2^(i1) > R
end
Disp R
Oops, now I wrote the complete program for you, oh well...
EDITED to get out a little bug (which I made due to the little time I took to write it)
EDITED I mistyped the correction
Last edited by GreatMagicalHat; 04212005 at 02:34 PM.

Originally Posted by GreatMagicalHat
Input "binary number",str1
length(str1)>A
0>R
for(i,1,A)
If sub(str1,i,1)="1"
R+2^(i1) > R
end
Disp R
sorry to drag up a thread from the dead, but searching google to find a simple binary conversion program for the ti83 i stumbled upon this site. This code ALMOST works properly, there is just one little mistake. When the ti puts the number into a string the msb of the binary number is given the string position of 1. With your code the msb is given the least weight. For this to be fully functional you would want to use:
Input "binary number",str1
length(str1)>A
0>R
0>i
for(i,1,A)
If sub(str1,i,1)="1"
R+2^(AI) > R
end
Disp R
Thread Information
Users Browsing this Thread
There are currently 2 users browsing this thread. (0 members and 2 guests)
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

