Hello, Cemetech

[nts: Post screenies here]
<< IMAGES ARE OUTDATED


Have you ever been ask to Convert Binary into Hex or Letter or even Decimals?!
Now with this convertor you can convert Binary into Decimal, Hexadecimals, and letters. just by typing the Binary Number into the convertor.

so far the Convertor concludes of:

BINCONVP.8xp | Allows binary to convert into Decimal. Also convertor to display information.

BH2LET.8xp | Allows the binary/hex numbers to become letters.


Convertor converts Binary to:

Decimal | EX: 1, 2, 3, 4

Hexadecimal | EX: AF, 8A, A, 5A

Letters | EX: A, B, C, D

* I need a way to convert Binary to Decimal to Hexadecimal

Oh and if you were wondering Razz :




Converts from any base to another base. Even does bases like 13, although I don't really see much use in converting to/from it. Razz

Can't convert to/from bases larger than 36 since I'm not sure what you use after letters in base conversions (e.g. base16 [hex]: 0-F, base36: 0-Z).

Code (Unoptimized, coded this in about half an hour):

Code:
ClrHome
0->K
" "->Str2
0->A:0->Q
0->dim(L1
0->dim(L2
Input "Base: ",C
Input "[|>]Base: ",B
If C=10
Then
   Input "Number: ",A
Else
   Input "Number: ",Str0
   For(Q,1,length(Str0))
      0->L
      Repeat sub(Str0,Q,1)=Str2
         L+1->L
         sub("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",L,1)->Str2
      End
      L-1->L2(Q)
   End
   For(R,1,Q-1)
      A+L2(R)*C^(Q-1-R)->A
   End
End

A->X:0->theta
While X!=0
   iPart(X/B)->Y
   BY->Z
   theta+1->theta
   X-Z->L1(theta)
   Y->X
End
ClrHome
Output(1,1,"b"
Output(1,2,C
Output(1,4,"[|>]b"
Output(1,6,B
For(F,1,theta)
   theta+1-F->C
   If C>16
   Then
      Repeat C<16
      C-16->C
      D+1->D
      End
   Else
      1->D
   End
   Output(1+D,C,sub("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",L1(F)+1,1)
End
You could make a version called "ALL YOUR BASE" and have you enter the base and value as the input and then it will spit out all bases 2-36?

Maybe that would be a good mini programming comp idea?
I looked up if a Base37 system exists and this article hurt my head. Razz

Apparently, there is a Base37. But bases aren't limited to natural numbers and you can use -2 or any other rational number, or even irrational numbers, AND even COMPLEX NUMBERS as bases!
What about using quaternions as bases? I'm sure there are some practical applications of this as well (using complex or irrational numbers as bases).
You could try out my Base Calc program here, and if you like it, feel free to use the badly disorganized code: http://ceme.tech/DL1795
It will calculate equations in any base (e.g. F0+6A), but to do that, it first converts it to decimal, solves the equation, and then converts it back to the correct base.
If you can find the code used to do this, It could give you some pointers on how I solved the conversions (Although it's very similar to KaluW_'s solution). Smile
There are actually already many, many, many programs for this, and I limited myself to just TI-BASIC CE programs in the Cemetech archives. Smile

Also, check out this good general-purpose script at the bottom of the TI BASIC Routines post.
_iPhoenix_ wrote:
There are actually already many, many, many programs for this, and I limited myself to just TI-BASIC CE programs in the Cemetech archives. Smile

Also, check out this good general-purpose script at the bottom of the TI BASIC Routines post.


Those are Base Convertor Confused . This is a Binary Convertor it only Converters Base 2 number to only Base 10, 16 and Text. Very Happy

I guess it a base convertor but those don't convert base 2 numbers to text including "|,./()" and lowercase letters.
  
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
Page 1 of 1
» All times are GMT - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement