HP 50g Base Conversion

02062014, 08:17 PM
Post: #1




HP 50g Base Conversion
Hello friends,
I don't know wether the HP 50g has a build in function for base conversion of integer in exact mode. The program "T2BAS" convert every number in base ten to a choosen base. The program "BAS2T" do it the other way. My programs works with a special out and input, you kann see it below. Stack 5: 451 Stack 4: 7 Stack 3: 7:{"1" "2" "1" "3"} Stack 2: 7:{"1" "2" "1" "3"} Stack 1: 451 Stack 5 shows the number 451 stack 4 the number 7 this number is the new base on stack 3 you see the output of "T2BAS": a tagged list with the digits new based. the tag shows you the base. stack 2 is the input for "BAS2T" and gives you the output on stack 1. Remark: the base and the digits are always given in base 10, the programs functioned well for example base 234 (digit range from 0 to 233) or 17 and so on. Here is the code: "T2BAS" Code: %%HP: T(3)A(R)F(,); "BAS2T" Code: %%HP: T(3)A(R)F(,); Greetings peacecalc 

02122014, 07:39 AM
Post: #2




RE: HP 50g Base Conversion
yes, the HP50G has a base conversion functionality built in. You'll find it by pressing keys leftshift then 6 (Convert), then option 2 (Base). From there you can change the base to Hex, Dec, Oct and Bin and can access the conversion function R>B (decimal to whatever base you choosed) and B>R (the other way round). I've tried it out with exact mode activated and it works.
All that is described in chapter 19 of the user guide. So your programs have the advantage to work with any base, not only 2,8,10 and 16. Thank you very much for your contribution. Best regards Karl 

« Next Oldest  Next Newest »

User(s) browsing this thread: 1 Guest(s)