Showing posts with label memory registers. Show all posts
Showing posts with label memory registers. Show all posts

Friday, October 10, 2025

Retro Review: HP 67

Retro Review: HP 67


I won a HP 67 from the HHC 2025 Conference in Orlando, Florida last September. Be on the lookout for a list of videos by the hpcalc.org's YouTube page soon. It's always a good time.


Bruce Gordon donated the HP 67 to the conference and I'm grateful and appreciative. I love the box, the calculator, the leather cover, and the manuals.









Quick Facts


Company: Hewlett Packard

Years: 1976 - 1984

Type: Scientific, RPN (Reverse Polish Notation)

Memory: 20 memory registers, 224 steps


Batteries: originally Ni-Cad, there are battery packs that can use AAA batteries (Ebay seller: waterhosko, https://www.ebay.com/usr/waterhosko)


DISCLAIMER:  I am not page for referring the website on eBay, nor I do not guarantee that inventory is available.  


Features:


* Trigonometric, logarithmic, exponential functions

* Probability: n! (the factorial function only accepts positive integers)

* Integer part, fractional part, absolute value, round to fix settings

* Polar/Rectangular, Degree/Radian, Hours/Hours-Minutes-Seconds (HMS) conversions

* Percent and percent change


Non-Continuous Memory


The memory on the HP 67 is not continuous. When the calculator is turned off, all memory is lost. The only way to save the memory registers and the steps require the use of thin memory cards and the built-in card reader. Each card has two sides, which can hold 112 steps per side. With decades-old calculators like the HP 67, the card reader has stopped working. It can be repaired and when I get the chance, I will leave it to the repair experts.


Memory Registers


There are 20 memory registers but they are split up: 10 primary registers and 10 secondary registers. The set of registers can be switch by pressing [ f ] (P<>S). This really comes into play when working with statistical data (see next section).


Statistics


The HP 67 has the standard statistics functions including sums, means, and standard deviations. When calculating statistics, the following stored on the secondary registers:


RS9 (19): n

RS8 (18): Σxy

RS7 (17): Σy^2

RS6 (16): Σy

RS5 (15): Σx^2

RS4 (14): Σx


Clearing these registers require this key sequence: [ f ] (CL REG) [ f ] (P<>S). To access the statistics registers after entering the data, start by pressing [ f ] (P<>S).


The mean function, [ f ] (x-bar):

Y: average of y-values

X: average of x-values


The standard sample deviation, [ g ] (s):

Y: sample deviation of y-values

X: sample deviation of x-values


Programming


As mentioned before, the HP 67 can hold programs up to 224 program steps. Steps involving shift keys [ f ], [ g ], and [ h ], along with [ GTO ] and [ LBL ], are merged with the next key press to help save space. However, each press of the digit keys and the decimal point take one step each. For instance, 475.2 takes five steps ([ 4 ], [ 7 ], [ 5 ], [ . ], [ 2 ]) while sequences such as [ GTO ] [ 1 ] and [ f ] (√x) take one step each.


Always available are five user keys that double as ten lettered labels: A, B, C, D, E, a, b, c, d, and e. The lower case labels are shifted of their capital letter counter parts. There are also ten numerical labels, 0-9, available for use.


There are eight comparison tests:


Gold tests (use the [ f ] shift): x=0, x≠0, x<0, x>0

Blue tests (use the [ g ] shift): x=y, x≠0, x≤y, x>y


The registers I and (i) are used for indirect addressing. We have special functions to store to Register I, the ST I and RC I functions. The DSZ and ISZ only work on register 1.


DSZ: Decrease register I by 1 and skip the next instruction if the result is I=0.

ISZ: Increase register I by 1 and skip the next instruction if the result is I=0.


There are four flags. Flags 0, 1, and 2 are user flags. Flag 2 gets cleared automatically when tested. Flag 3 is the entry flag, which is set automatically when a number is entered or a data card is read. Like Flag 2, Flag 3 is cleared automatically when tested.


For more details, here is an excellent article on HP-67 (and the similar HP-97) programming by the MoHPC (Museum of HP Calculators) web page: https://www.hpmuseum.org/prog/hp67prog.htm


As mentioned before, when the calculator is turned off, all memory is reset. When available, save your programs to a data card first.



Program Collection


Download here:

https://drive.google.com/file/d/114H4D0hcOjxDj_MHQNvwDBUJV3chlpdC/view?usp=sharing



List of Programs (all programs on the file are relatively short, less than 35 steps):


Countdown of HP 67 "seconds"

Random Numbers

Snell's Law

Circle: Area and Circumference

Sphere: Surface Area and Volume

Angle Between 2 Lines with Slopes x and y

Sum of Powers

Adding Complex Numbers

Multiplying Complex Numbers

Complex Number to a Real Power

Permutation

Combination (with duplicating X and Y stack values)

Speed of Sound Approximation (in meters per second)

Finance: Present Value Annuity Factor (including setting N and I% with monthly payments)

Distance Between Two Points (x,y) and (z,t)

Horizontal Curve


When the HP 67 is Turned Off


* All memory is cleared

* The display setting is reset to FIX, DSP 2 (display 2 digits)

* The angle setting is reset to Degrees


Notes


* The number format and the number of decimal points displayed are set separately. For format, the HP 67 offers fixed (FIX), scientific notation (SCI), and engineering format (ENG). For this calculator, do not enter a number after FIX, SCI, or ENG. Setting the number of digits require the use of the display (DSP) key. For instance, if I want to set the HP 67 to fixed setting with 4 decimal places, the keystroke sequence required would be [ f ] (FIX) [DSP] [ 4 ].


* It takes getting used to use a shift key [ h ] before swap (x<>y) and roll down (R↓). Usually they are primary key functions.


* The card reader did not operate, but for machines that are now 50 years old, it's understandable because they do break down. If I get it repaired, I'm leaving it to the professionals.


* There are no internal guard digits. The HP 67, as it seems to be the case for the entire Classic series and possibly later series such as the Voyagers, carries out calculations to fit the 10 digit screen and that's it.


Example:


Set FIX, DSP 9.


2 √ 1.41 - 100 ×


Result:

HP 67 (DSP 9): 0.421356200

HP 45 (FIX 9): 0.421356200

HP 15C CE (FIX 9): 0.421356200

HP 42S, original (ALL): 0.421356237



* This is the only calculator I know that stores the six statistical sum results in secondary registers. I'll have to remember to do the P<>S command first. In later models the registers are not split in this fashion, and that I am grateful for.


* The display is nice, clean, and I do get a small thrill from working with red LED displays.


* There is also a learning curve when all of the shifted functions are listed BELOW the primary keys:

[ primary function ]

        h (black)

g (gold) b (blue)



It's a classic for a reason and I love it. The keyboard is clean and the keys are responsive.


Eddie


All original content copyright, © 2011-2025. Edward Shore. Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited. This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author.

Saturday, May 3, 2025

Casio fx-3900Pv: Linear System, Poisson Kernel, Normal Distribution, 3 x 3 Matrix Determinant

Casio fx-3900Pv: Linear System, Poisson Kernel, Normal Distribution, 3 x 3 Matrix Determinant


Today, we feature four programs for the classic Casio fx-3900Pv calculator. The fx-3900Pv has 300 steps.


My review from 2023: https://edspi31415.blogspot.com/2023/05/retro-review-casio-fx-3900pv.html


One of the great features of the early “inexpensive” algebraic keystroke programmable calculators (1980s) is that the programs can be seen and edited.


The programs listed will require inputs to be stored in to the memory registers prior to running the program by using the [ Kin ] key.



Casio fx-3900Pv: 2 x 2 Systems


This program solves 2 x 2 linear systems. The Constant memory registers (K1 – K6) are mapped as follows:


K4 * x + K5 * y = K6

K1 * x + K2 * y = K3


The equations are solved as follows:

x = (K2 * K6 – K5 * K3) / M

y = (-K1 * K6 + K4 * K3) / M

where M = (K4 * K2 – K1 * K5)


This program takes 36 steps.


Code:

Kout 4 (determinant)

×

Kout 2

-

Kout 1

×

Kout 5

=

Min

HLT (Pause program, shows determinant. We want a nonzero-determinant.)


(

Kout 2

×

Kout 6

-

Kout 5

×

Kout 3

)

÷

MR

=

HLT (Solve for x)


(

Kout 1

+/-

×

Kout 6

+

Kout 4

×

Kout 3

)

÷

MR

= (Solve for y)


Examples


Example 1

x – y = 5

x + 3 * y = 9


Store the parameters: 1 Kin 4, -1 Kin 5, 5 Kin 6; 1 Kin 1, 3 Kin 2, 9 Kin 3

Results: det = 4, x = 6, y = 1


Example 2

3 * x + 16 * y = 49

5 * x – 2 * y = 22


Store the parameters: 3 Kin 4, 16 Kin 5, 49 Kin 6; 5 Kin 1, -2 Kin 2, 22 Kin 3

Results: det = -86, x = 5.23255814, y = 2.081395349



Casio fx-3900Pv: Poisson Kernel


The program calculates the kernel using the formula:


Pr(θ) = (1 – r^2) / (1 – 2 * r * cos θ + r^2),

0 ≤ r < 1, -π < θ ≤ π


This program takes 22 steps.


Store r in register 1, θ in register 2.


Code:

Rad (Mode 5)

(

1

-

Kout 1

x^2

)

÷

(

1

-

2

×

Kout 1

×

Kout 2

cos

+

Kout 1

x^2

)

=


Examples


Example 1:

r = 0.5, θ = 2.1

0.5 Kin 1, 2.1 Kin 2

Result: 0.4273879049


Example 2:

r = 0.268, θ = 0.842

0.268 Kin 1, 0.842 Kin 2

Result: 1.298397221


Source:

“Poisson Kernel” Wikipedia. May 28, 2024. https://en.wikipedia.org/wiki/Poisson_kernel

Retrieved November 26, 2024


Casio fx-3900Pv: Normal Distribution (Integration)


The program, which is ran in Integration Mode (Mode 1):


∫( e^(-t^2 / 2) / √(2 * π) dt, a, b)


To calculate, really approximate the integral:

MODE 1 P#

Store a level n (1-9), SHIFT RUN

Lower limit RUN

Upper limit RUN


The level n corresponds to the integration intervals 2^n. The higher n is, the longer the calculation takes but the accurate the integral is.


The integrated variable is stored in memory M. Start the function using Min.


Code:

Min

(

MR

x^2

+/-

÷

2

)

e^x

÷

(

2

×

π

)

√

=


Examples


The following examples will use n = 4.


Example 1: lower limit = 0, upper limit = 3. Result: 0.49865

(actual ≈ 0.4986501019)


Example 2: lower limit = -1, upper limit = 1. Result: 0.6827

(actual ≈ 0.6826894921)


Example 3: lower limit = -2, upper limit = 1.5. Result: 0.910443

(actual ≈ 0.910 4426667)



Casio fx-3900Pv: 3 x 3 Determinant


This program calculates the determinant of a 3 x 3 matrix. How are we to do this with only seven memory registers?


The program sets the matrix as:


[ [ 1st input, 2nd input, 3rd input ] [ K4, K5, K6 ], [ K1, K2, K3 ] ]


The user will be stop execution three times. At each time, enter the element corresponding to the top row.


For example:


[ [ 1, 2, 3 ] [ 4, 5, 6 ] [ 7, 8, 9 ] ]


Store 4 in K4, 5 in K5, 6 in K6; 7 in K1, 8 in K2, 9 in K3. While running, enter 1, 2, then 3 during program execution.


The determinant is stored to memory M. This program takes 40 steps.


Code:

(

Kout 5

×

Kout 3

-

Kout 2

×

Kout 6

)

×

ENT # (enter a legitimate number to continue, prompt for row 1, column 1)

=

Min


(

Kout 4

×

Kout 3

-

Kout 6

×

Kout 1

)

×

ENT # (prompt for row 1, column 2)

=

M-


(

Kout 4

×

Kout 2

-

Kout 5

×

Kout 1

)

×

ENT # (prompt for row 1, column 3)

=

M+


MR


Examples


Example 1:

[ [ 1, 5, 6 ] [ 2, 7, 8 ] [ 11, 4, 3 ] ]


Store:

(2nd row) 2 Kin 4, 7 Kin 5, 8 Kin 6

(3rd row) 11 Kin 1, 4 Kin 2, 3 Kin 3

Run the program (P1-P4): 1 RUN, 5 RUN, 6 RUN

Result: -15


Example 2:

[ [ -3, 0, 9 ] [ 0 , -3, 9 ] [ 9, -3, 0 ] ]


Store:

(2nd row) 0 Kin 4, -3 Kin 5, 9 Kin 6

(3rd row) 9 Kin 1, -3 Kin 2, 0 Kin 3

Run the program (P1-P4): -3 RUN, 0 RUN, 9 RUN

Result: 162


Until next time,


Eddie


All original content copyright, © 2011-2025. Edward Shore. Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited. This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author.

Saturday, January 11, 2025

RPN with HP 15C & DM32: Solving Simple Systems

RPN with HP 15C & DM32: Solving Simple Systems


Welcome to another edition of RPN with HP 15C & DM32.


Many Approaches to a Solving Problems


This blog covers two ways to solve the simple linear system of two equations:


x + y = a

x – y = b


In matrix form:


[ [ 1, 1 ] [ 1, - 1] ] * [ [ x ] [ y ] ] = [ [ a ] [ b ]


The inverse of the coefficient matrix [ [ 1, 1 ] [ 1, - 1] ]:


[ [ 1, 1 ] [ 1, - 1] ] ^-1 = [ [ 0.5, 0.5 ] [ -0.5, 0.5 ] ]


[ [ x ] [ y ] ] = [ [ 0.5, 0.5 ] [ -0.5, 0.5 ] ] * [ [ a ] [ b ] ]


The solution to the system is:


x = (a + b) / 2

y = (a – b) / 2



As far as keying the solutions in the calculator, we can address this two ways. The first, and probably the easier method, is to use memory registers. The second is to use stack operations such as swap (x<>y), roll up (R↑), roll down (R↓), enter (ENTER) as duplication, and the Last X function (LST x). Both the HP 15C and DM32 use a four-level stack.



The Memory Register Approach


Start with the stack as follows:


Y: a

X: b

The results are presented as:


Y: y

X: x


Memory Registers used:


HP 15C: R1 = a, R2 = b

DM32: A, B


HP 15C Code:


001

42, 21, 11

LBL A

002

44, 2

STO 2

003

34

X<>Y

004

44, 1

STO 1

005

30

-

006

16

CHS

007

2

2

008

10

÷

009

45, 2

RCL 2

010

45, 40, 1

RCL + 1

011

2

2

012

10

÷

013

43, 32

RTN



DM32 Code (31 bytes):


T01 LBL T

T02 STO B

T03 x<>y

T04 STO A

T05 -

T06 +/-

T07 2

T08 ÷

T09 RCL B

T10 RCL + A

T11 2

T12 ÷

T13 RTN


The Stack Approach


Start with the stack as follows:


Y: a

X: b

The results are presented as:


T : original contents of the z stack

Z: original contents of the z stack

Y: y

X: x


This time no memory registers are used


HP 15C Code:


001

42, 21, 12

LBL B

002

40

+

003

43, 36

LST x

004

2

2

005

20

×

006

34

X<>Y

007

36

ENTER

008

33

R↓

009

30

-

010

16

CHS

011

2

2

012

10

÷

013

43, 33

R↑

014

2

2

015

10

÷

016

43, 32

RTN



DM32 Code (24 bytes):


S01 LBL S

S02 +

S03 LAST x

S04 2

S05 ×

S06 x<>y

S07 ENTER

S08 R↓

S09 -

S10 +/-

S11 2

S12 ÷

S13 R↑

S14 2

S15 ÷

S16 RTN



Examples


Example 1:

x + y = 32

x – y = 16


32 ENTER 16 (run program)


Results: y = 8, x = 24


Example 2:

x + y = 9

x – y = -8


Results: y = 8.5, x = 0.5



Until next time,


Eddie


All original content copyright, © 2011-2025. Edward Shore. Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited. This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author.

HP 15C: The I Squared Rule and HHC 2026

HP 15C: The I Squared Rule and HHC 2026 HHC 2026 Videos Before we start, the videos for HHC 2026 are up! Please take a look, ev...