Hewlett-Packard HP-16C

Datasheet legend
Ab/c: Fractions calculation
AC: Alternating current
BaseN: Number base calculations
Card: Magnetic card storage
Cmem: Continuous memory
Cond: Conditional execution
Const: Scientific constants
Cplx: Complex number arithmetic
DC: Direct current
Eqlib: Equation library
Exp: Exponential/logarithmic functions
Fin: Financial functions
Grph: Graphing capability
Hyp: Hyperbolic functions
Ind: Indirect addressing
Intg: Numerical integration
Jump: Unconditional jump (GOTO)
Lbl: Program labels
LCD: Liquid Crystal Display
LED: Light-Emitting Diode
Li-ion: Lithium-ion rechargeable battery
Lreg: Linear regression (2-variable statistics)
mA: Milliamperes of current
Mtrx: Matrix support
NiCd: Nickel-Cadmium rechargeable battery
NiMH: Nickel-metal-hydrite rechargeable battery
Prnt: Printer
RTC: Real-time clock
Sdev: Standard deviation (1-variable statistics)
Solv: Equation solver
Subr: Subroutine call capability
Symb: Symbolic computing
Tape: Magnetic tape storage
Trig: Trigonometric functions
Units: Unit conversions
VAC: Volts AC
VDC: Volts DC
Years of production: 1982-1989 Display type: Numeric display  
New price: USD 150.00   Display color: Black  
    Display technology: Liquid crystal display 
Size: 3"×5"×½" Display size: 10(7+2) digits
Weight: 4 oz    
    Entry method: Reverse Polish Notation 
Batteries: 3×"LR44" button cell Advanced functions: Cmem BaseN 
External power:   Memory functions: +/-/×/÷ 
I/O:      
    Programming model: Fully-merged keystroke entry 
Precision: 10 digits Program functions: Jump Cond Subr Lbl Ind  
Memories: 203(0) bytes Program display: Keycode display  
Program memory: 203 program steps Program editing: Auto-insert program entry  
Chipset:   Forensic result:  

hp16c.jpg (33498 bytes)The HP-16C is a member of Hewlett-Packard's highly successful 10-series programmable calculators (after nearly 20 years, the HP-12C is still in production!) I received this beautiful specimen from a friend (thanks, Ted!) after he learned that I am interested in these vintage machines.

The HP-16C is a unique machine: HP's only calculator for programmers, this device could perform integer arithmetic in bases 2, 8, 10, and 16, with a configurable word size of up to 64 bits. A particularly useful feature is the ability to set not only the word size but 1's, 2's complement or unsigned arithmetic, allowing the calculator to accurately match the rules of the computer or processor that you're working with.

Unfortunately, the calculator offers very few floating point functions. Even such essential functions like the natural logarithm are missing, making the implementation of some algorithms fairly difficult.

On the plus side, the calculator offers fully merged program storage (even some three-keystroke combinations like g LBL A use only a single step in program memory), flexible use of memory as program or data registers, and a rich programming model with many conditional functions.

The calculator has 203 bytes of user memory, the contents of which is retained when the calculator is turned off. Initially, all memory is allocated as data registers; the number of registers being a function of the current word size. In floating point mode, the word size is 56 bits (7 bytes), so 203/7=29 storage registers are available. As program steps are entered, data registers are converted to program memory in chunks of 7 bytes, until all data registers are exhausted.

Calculating the Gamma function is a difficult task on this calculator, because it is necessary to provide subroutines for the exponential and the natural logarithm. The program presented below contains these two subroutines (GSB D for the exponential, GSB E for the natural logarithm) as an added bonus. They were a neat exercise; rare is the programmable calculator that has no logarithmic or exponential function built-in!

This program uses 11 storage registers and 122 steps of program memory. Only four bytes remain unused! Memory registers 0 - 7 must be set before using the program, whereas registers 8, 9, A, and I are used for temporary storage.

To use the function, enter the number for which you wish to calculate the Gamma function, then hit GSB A.

M0:    √2π = 2.506628275
M1:    76.18009173
M2:    -86.50532033
M3:    24.01409824
M4:    -1.231739572
M5:    1.208650974e-3
M6:    -5.395239385e-6
M7:    e = 2.718281828

001 - 43,22, A  LBL A
002 - 44  8     STO 8
003 - 6         6
004 - 44 32     STO I
005 - 1         1
006 - 43,22, 0  LBL 0
007 - 45 31     RCL (i)
008 - 45 8      RCL 8
009 - 45 32     RCL I
010 - 40        +
011 - 10        ÷
012 - 40        +
013 - 43 23     DSZ
014 - 22 0      GTO 0
015 - 45 0      RCL 0
016 - 20        ×
017 - 45 8      RCL 8
018 - 10        ÷
019 - 21 E      GSB E
020 - 44 9      STO 9
021 - 45 8      RCL 8
022 - 5         5
023 - 48        .
024 - 5         5
025 - 40        +
026 - 44 8      STO 8
027 - 21 E      GSB E
028 - 45 8      RCL 8
029 - 5         5
030 - 30        -
031 - 20        ×
032 - 45 9      RCL 9
033 - 40        +
034 - 45 8      RCL 8
035 - 30        -
036 - 43,22, d  LBL D
037 - 44 8      STO 8
038 - 1         1
039 - 44 32     STO I
040 - 44 9      STO 9
041 - 20        ×
042 - 43,22, 4  LBL 4
043 - 36        ENTER
044 - 36        ENTER
045 - 45 9      RCL 9
046 - 40        +
047 - 45 9      RCL 9
048 - 43 49     x=y
049 - 43 21     RTN
050 - 33        Rv
051 - 44 9      STO 9
052 - 43 24     ISZ
053 - 33        Rv
054 - 45 8      RCL 8
055 - 20        ×
056 - 45 32     RCL I
057 - 10        ÷
058 - 22 4      GTO 4
059 - 43,22, E  LBL E
060 - 48        .
061 - 5         5
062 - 44 32     STO I
063 - 33        Rv
064 - 43, 5, 1  CF 1
065 - 1         1
066 - 43 3      x>y
067 - 43, 4, 1  SF 1
068 - 43 3      x>y
069 - 34        x-y
070 - 10        ÷
071 - 0         0
072 - 43,22, 2  LBL 2
073 - 34        x-y
074 - 45 7      RCL 7
075 - 43 3      x>y
076 - 22 1      GTO 1
077 - 10        ÷
078 - 34        x-y
079 - 1         1
080 - 40        +
081 - 22 2      GTO 2
082 - 43,22, 1  LBL 1
083 - 33        Rv
084 - 36        ENTER
085 - 34        x-y
086 - 1         1
087 - 30        -
088 - 34        x-y
089 - 1         1
090 - 40        +
091 - 10        ÷
092 - 34        x-y
093 - 44 A      STO A
094 - 33        Rv
095 - 36        ENTER
096 - 36        ENTER
097 - 20        ×
098 - 43,22, 3  LBL 3
099 - 34        x-y
100 - 36        ENTER
101 - 36        ENTER
102 - 45 32     RCL I
103 - 10        ÷
104 - 45 A      RCL A
105 - 40        +
106 - 45 A      RCL A
107 - 43 0      x!=y
108 - 22 5      GTO 5
109 - 43, 6, 1  F1?
110 - 49        CHS
111 - 43 21     RTN
112 - 43,22, 5  LBL 5
113 - 33        Rv
114 - 44 A      STO A
115 - 33        Rv
116 - 43 24     ISZ
117 - 34        x-y
118 - 36        ENTER
119 - 33        Rv
120 - 20        ×
121 - 43 33     R^
122 - 22 3      GTO 3
Share