(11C/12C/17B/65) Base Conversion - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Software Libraries (/forum-10.html) +--- Forum: General Software Library (/forum-13.html) +--- Thread: (11C/12C/17B/65) Base Conversion (/thread-468.html) |
(11C/12C/17B/65) Base Conversion - Thomas Klemm - 01-19-2014 06:45 PM Description: This program allows to convert numbers from one base to another. Register: Reg 1: from-base Reg 2: to-base Program: STO 0 RCL 1 RCL 2 - x<>y LBL 0 RCL 1 x<>y RCL 2 ÷ INT x=0 GTO 1 R↓ × R↓ × STO + 0 R↓ GTO 0 LBL 1 RCL 0 Examples: Dec - Bin Reg 1: 10 Reg 2: 2 21 - 10101 Hex - Dec Reg 1: 16 Reg 2: 100 0xCAFE = 12:10:15:14 12101514 - 51966 Base Conversion for HP-12C - Thomas Klemm - 06-21-2014 10:21 PM Code: 01 - 44 0 STO 0 Example: 201410 → 37368 10 STO 1 8 STO 2 2014 R/S This is another solution that uses the function NPV: Code: 01 - 36 ENTER Example: 201410 → 37368 10 STO PMT 8 STO FV 2014 R/S Base Conversion for HP-17b/17bii - Thomas Klemm - 06-21-2014 10:27 PM BC:ANS= N+ (FROM-TO)\(\times\) \(\Sigma\)(I:0:LOG(N)\(\div\)LOG(TO):1: L(N:IDIV(N:TO))\(\times\)FROM^I ) Example: DEC → OCT Code: 2014 10 → FROM 8 → TO 2014 → N ANS Base Conversion for HP-65 - Thomas Klemm - 02-23-2024 12:10 PM Code: 001: 23 : LBL Code: Title: Base Conversion Registers R1: n R2: from R3: to Examples Base conversion between 40 and 100. Initialization 40 STO 2 100 STO 3 Encoding 1503243917 A 38631977 Decoding B 38631977 A 1503243917 References |