Template:Short description Template:Use dmy dates Template:Infobox Calculator

The HP-42S RPN Scientific is a programmable RPN Scientific hand held calculator introduced by Hewlett-Packard in 1988. It is a popular calculator designed for science and engineering students.

OverviewEdit

Perhaps the HP-42S was to be released as a replacement for the aging HP-41 series as it is designed to be compatible with all programs written for the HP-41. Since it lacked expandability, and lacked any real I/O ability, both key features of the HP-41 series, it was marketed as an HP-15C replacement.

The 42S, however, has a much smaller form factor than the 41, and features many more built-in functions, such as a matrix editor, complex number support, an equation solver, user-defined menus, and basic graphing capabilities (the 42S can draw graphs only by programs). Additionally, it features a two-line dot matrix display, which made stack manipulation easier to understand.

Production of the 42S ended in 1995.<ref name="HPM_HP42S"/>

SpecificationsEdit

File:Hp42s battery compartment.jpeg
HP-42S battery compartment and the IR diode
File:HP42S Calculator Internal Teardown.jpg
HP-42S calculator internal teardown
  • Series: Pioneer
  • Code Name: Davinci
  • Introduction: 1988-10-31
  • 64 KB of ROM
  • 8 KB of RAM
  • Functions: Over 350
  • Expandability: Officially no other than IR printing (32 KB memory upgrade<ref name="Hosoda_2007"/> and over-clocking hardware<ref>Template:Citation</ref> hacks are possible)
  • Peripherals: HP 82240A infrared printer

FeaturesEdit

ProgrammingEdit

{{#invoke:Labelled list hatnote|labelledList|Main article|Main articles|Main page|Main pages}}

The HP-42S is keystroke-programmable, meaning that it can remember and later execute sequences of keystrokes to solve particular problems of interest to the user. The HP-42S uses a superset of the HP-41CX FOCAL language.

All programs are stored in one continuous program space, and may be created and edited by switching to programming mode, using the Template:Keypress key. Subroutines are enclosed in Template:Keypress/Label (name of subroutine) and Template:Keypress/Return ( halts execution unless it is in a subroutine in which case it returns to the caller). Keystrokes (of functions) are enclosed between Template:Keypress and Template:Keypress or Template:Keypress.

In a running program, a Template:Keypresslabel causes program execution to branch to the specified label and continue running at that line.Executing a GTO instruction from the keyboard moves the program pointer to the corresponding label. No program lines are executed.

Template:Keypress is used in much the same way with one important difference: after an Template:Keypress instruction has transferred execution to the specified label, the next RTN (return) or END instruction causes the program to branch back to the instruction that immediately follows the XEQ instruction.Programs/Subroutines can also be executed with the help Template:Keypresslabel (Execute) key. Important difference is that Template:Keypress executes the label and returns to previous subroutine and continues execution from the line following Template:Keypress,whereas Template:Keypress branches to the label specified and doesn't return.

Template:KeypressTemplate:KeypressTemplate:Keypress packs the current subroutines and moves to new program space.Template:KeypressTemplate:Keypressnnnn can be used to reach a particular line of program.

Programming examplesEdit

A simple program to calculate area of circle

Step Instruction Comment
00 { 6-Byte Prgm }
01 Template:KeypressTemplate:KeypressTemplate:KeypressTemplate:KeypressTemplate:Keypress Start of program "AREA"
02 Template:KeypressTemplate:Keypress Prompts for Value of R and stores it in R
03 Template:Keypress Squares the value in X register
04 Template:Keypress Puts π on the stack
05 Template:Keypress Multiplies values in X and Y register
Template:Keypress or Template:Keypress Returns control (and result in X) to either the user or to a calling program.

Program instructions like Template:Keypress, Template:Keypress, Template:Keypress halt the program execution,which can be continued by pressing Template:Keypress.

Template:Keypress is used to view contents of a register,For example R in the above example.

Using Integral and Equation SolverEdit

It is necessary to write a program or subroutine that evaluates f(x) for the function which needs to be solved or integrated. Variables used in program should be declared using Template:Keypress

Here is a sample program to solve the equation °F = (9/5×°C) + 32

Step Instruction Comment
00 { 31-Byte Prgm }
01 Template:KeypressTemplate:KeypressTemplate:KeypressTemplate:KeypressTemplate:Keypress Start of program "TEMP"
02 Template:KeypressTemplate:Keypress Declares F as a variable for solver
03 Template:KeypressTemplate:Keypress Declares C as a variable for solver
04 Template:KeypressTemplate:Keypress Recall F
05 Template:Keypress
06 Template:Keypress
07 Template:Keypress
08 Template:KeypressTemplate:Keypress Recall C
09 Template:Keypress
10 Template:Keypress
11 Template:KeypressTemplate:Keypress
12 Template:Keypress
Template:Keypress or Template:Keypress Returns control (and result in X) to either the user or to a calling program.

After, accessing the solver using Template:Button Template:Keypress (Template:Keypress ), select program Template:Keypress.

In a similar way, expressions can be integrated. After selecting the variable of integration, enter the lower limit and then press on Template:Keypress, similarly input Template:Keypress (upper limit) and Template:Keypress (accuracy).

EmulatorsEdit

HP 42s can be accessed through Android Emulators like Emu42 and Free42.

WP 34sEdit

WP 34S project uses a modern HP financial calculator HP 30b as the starting point to create an advanced scientific RPN calculator. It is a more powerful scientific (non-graphing) calculator compared to the original HP 42s.<ref>https://commerce.hpcalc.org/34s.php</ref>

Functionality

  • Euler's Beta and Riemann's Zeta functions, Bernoulli and Fibonacci numbers, Lambert's W, the error function as well as Chebyshev's, Hermite's, Laguerre's and Legendre's orthogonal polynomials, and testing for primality,
  • Many statistical distributions and their inverses like Poisson, Binomial, Geometric as well as Cauchy-Lorentz, Exponential, Logistic, Weibull for reliability analysis, Lognormal and Gaussian with arbitrary means and standard deviations,
  • Programmable sums and products, first and second derivatives

Programmability

  • RPN keystroke programmable à la HP-41 - up to 925 steps in RAM - numeric and/or alpha labels, thousands of steps burnable into flash banks.
  • Externally programmable by developers via JTAG interface

Reference BooksEdit

File:RPN Books.png
Reference Books

Guides and Collections of Keystroke Programs

Documentation for the HP 42S calculator at hpcalc.org<ref>https://literature.hpcalc.org/all</ref><ref>https://literature.hpcalc.org/all#model:42S</ref>


Educational Texts on RPN calculators


Collection of Algorithms/Keystroke Programs for HP 41/HP 42S

See alsoEdit

ReferencesEdit

Template:Reflist

Further readingEdit

|CitationClass=web }}

  • {{#invoke:citation/CS1|citation

|CitationClass=web }}

External linksEdit

|CitationClass=web }}

Template:HP calculators