The Museum of HP Calculators

HP Forum Archive 19

[ Return to Index | Top of Index ]

HP 35s. Base conversions, fast way
Message #1 Posted by Pablo P (Spain) on 30 June 2010, 2:00 p.m.

Hi all, we know that base conversions in HP 35s require many keystrokes. Input of numbers in bases other than 10 require the suffix to be explicitly entered. Apart from that, to type A B C D E F digits require the hexadecimal mode to be set. I will prove that these programs will reduce the keystrokes in many situations.

HP 35s. Base conversions, fast way.

Table of Contents ================= 1 Using the program 1.1 Example 1: Convert (F1)h to decimal 1.2 Example 2: Convert (63)d to binary 1.3 Example 3: Convert (99)d to hexadecimal and return to decimal mode 1.4 Example 4: Convert (FF)h to binary, go back to decimal mode and later convert (17)o to binary 2 Program listing 3 Registers 4 Revision

1 Using the program ~~~~~~~~~~~~~~~~~~~~

This set of programs are intended to do base conversions using less keystrokes. I will show you some examples comparing the standard way and the use of this set of programs:

1.1 Example 1: Convert (F1)h to decimal ----------------------------------------

This is the best case. When you convert from hexacecimal to any other base:

Original method This program -----------------+-------------- blue-key XEQ 1 D 2 ENTER 1/x (F) 1/x (F) 1 1 blue-key blue-key 1 1 6 6 blue-key R/S 1 1

11 keystrokes 9 keystrokes

1.2 Example 2: Convert (63)d to binary ---------------------------------------

This is the worse case. When you convert from non-hexacecimal to other base:

Original method This program -----------------+-------------- blue-key XEQ 1 B 4 ENTER 6 6 3 3 ENTER R/S

6 keystrokes 6 keystrokes

After converting the base, the calculator is set on binary mode (in this example). In many situations we want to go back to decimal mode to do other calculations. I will show you this in the next example.

1.3 Example 3: Convert (99)d to hexadecimal and return to decimal mode -----------------------------------------------------------------------

Original method This program -----------------+-------------- blue-key XEQ 1 H 2 ENTER 9 9 9 9 ENTER R/S blue-key R/S 1 1

9 keystrokes 7 keystrokes

1.4 Example 4: Convert (FF)h to binary, go back to decimal mode and later convert (17)o to binary --------------------------------------------------------------------------------------------------

This is a common situation.: We do a conversion. Then we go back to decimal mode to do other stuff. And after a while we need to make other conversion to the same base as before:

Original method This program -----------------+--------------- blue-key XEQ 1 B 2 ENTER 1/x (F) 1/x (F) 1/x (F) 1/x (F) blue-key blue-key 1 1 6 6 blue-key R/S 1 R/S 4 R/S blue-key 1 1 7 1 blue-key blue-key 1 1 7 4 R/S 1 7 blue-key 1 7 ENTER

23 keystrokes 17 keystrokes

2 Program listing ~~~~~~~~~~~~~~~~~~

Line Instruction Notes ------+-------------+----------- B001 LBL B B002 HEX B003 SF 10 B004 ->BIN see note* B005 BIN B006 STOP press R/S B007 DEC B008 STOP B009 GTO B002

Line Instruction Notes ------+-------------+----------- D001 LBL D D002 HEX D003 SF 10 D004 ->DEC see note* D005 DEC D006 STOP press R/S D007 GTO D002

Line Instruction Notes ------+-------------+----------- H001 LBL H H002 DEC H003 SF 10 H004 ->HEX see note* H005 HEX H006 STOP press R/S H007 DEC H008 STOP H009 GTO H002

Line Instruction Notes ------+-------------+----------- O001 LBL O O002 HEX O003 SF 10 O004 ->OCT see note* O005 OCT O006 STOP press R/S O007 DEC O008 STOP O009 GTO O002

* To insert the right arrow press: EQN, BLUE-KEY, 2, RIGHT-KEY, CLEAR-KEY, CLEAR-KEY, CLEAR-KEY

3 Registers ~~~~~~~~~~~~

No registers used.

4 Revision ~~~~~~~~~~~

06/30/10 - First version.

Edited: 30 June 2010, 2:05 p.m.


[ Return to Index | Top of Index ]

Go back to the main exhibit hall