Decimal to octal conversion for the HP-12C



#2

Probably some of you are interested in mechanical calculators too. Watch this: http://www.youtube.com/watch?v=LGQTocT0Xr4

Therefore I tried to write a short program for the HP-12C this morning. Here it is.

Decimal to octal conversion on the HP-12C

01  STO 0
02 8
03 STO 1
04 0
05 RCL 0
06 X=0?
07 GTO 22
08 8
09 /
10 ENTER
11 INTG
12 STO 0
13 -
14 RCL 1
15 *
16 1
17 0
18 STO*1
19 RDN
20 +
21 GTO 05
22 RDN
23 GTO 00

Usage: Integer decimal number [R/S]


On the other hand, the stack registers are enough.

Decimal to octal conversion for the HP-12C ver.2.

01  0
02 X<>Y
03 8
04 X<>Y
05 X=0?
06 GTO 28
07 8
08 /
09 INTG
10 ENTER
11 RDN
12 RDN
13 LST X
14 FRAC
15 X<>Y
16 *
17 LST X
18 RDN
19 +
20 X<>Y
21 1
22 0
23 RDN
24 RDN
25 RDN
26 *
27 GTO 04
28 RDN
29 RDN
30 GTO 00

Usage: Integer decimal number [R/S]


Edited: 11 Nov 2009, 10:14 a.m.


Possibly Related Threads...
Thread Author Replies Views Last Post
  HP 35s polar/rectangular conversion CD Dodds 6 987 11-28-2013, 02:39 PM
Last Post: Dieter
  [WP 34s] Pressure Conversion Factors Timothy Roche 8 1,300 11-04-2013, 07:17 PM
Last Post: Dave Shaffer (Arizona)
  More programs for polar-rectangular conversion on HP Prime Michael de Estrada 4 866 11-04-2013, 12:43 AM
Last Post: Michael de Estrada
  HP Prime: Conversion factors Paul Townsend (UK) 19 1,962 08-27-2013, 09:19 AM
Last Post: Nigel J Dowrick
  Binary versus Decimal prefixes bill platt 22 2,123 04-27-2013, 11:22 AM
Last Post: Walter B
  Decimal/Binary Conversions for the HP 39gii - 3/16/2013 Eddie W. Shore 0 400 03-16-2013, 04:30 PM
Last Post: Eddie W. Shore
  33s Decimal Point Matt Agajanian 4 758 11-06-2012, 09:20 PM
Last Post: Matt Agajanian
  Obtaining More Decimal Digits (50g) Eddie W. Shore 3 655 09-13-2012, 05:38 PM
Last Post: Gilles Carpentier
  WP34S conversion, yet another but with a difference Geoff Quickfall 23 2,264 06-22-2012, 02:54 PM
Last Post: Marcus von Cube, Germany
  [WP-34s] Conversion proposal Alexander Oestert 19 1,825 06-15-2012, 05:36 AM
Last Post: fhub

Forum Jump: