+Home     Museum     Wanted     Specs     Previous     Next  

Hewlett Packard 9820A Programmable Calculator

Updated 12/19/2021

The Hewlett Packard 9820A was HP's first venture away from its historical Reverse Polish Notation (RPN) entry calculators into an algebraic entry calculator. All of HP's previous calculators, the history-making 9100A, the 9100B, and the 9810A, all used Reverse Polish Notation (RPN), for which HP is famous. Actually, though, RPN was first used internally in the groundbreaking Mathatronics algebraic-entry calculators (which Hewlett Packard paid patent royalties to for every RPN calculator it sold until HP purchased the patents from Barry Wright Corp. after Mathatronics was liquidated). The RPN method was also used for problem entry in Friden's EC-130, which pioneered the use of RPN for entry of math problems.

Reverse Polish Notation uses of a stack of connected registers that helps make complex calculations more manageable without requiring as much use of memory registers for holding temporary results. RPN lends itself well to implementation in electronic form due to the fact that it requires significantly less complex logic than an algebraic-entry calculator. Not everyone liked the mental adjustments required in order to think in RPN. An example would be the calculation:

(6 + 8) ÷ (3 + 9) X 14 + (6 - 2)

To perform such a calculation in RPN form, the key presses would be:

6 [ENTER] 8 [+] 3 [ENTER] 9 [+] [÷] 14 [X] 6 [ENTER] 2 [-] [+]

To some, this method was too tedious to deal with. Using the HP 9820A the problem would be typed into the machine just as it is presented originally above, parentheses and all, making the mental gymnastics required to convert an expression to RPN form unnecessary. Among those that didn't like the RPN methodology were some HP marketing folks, who argued that RPN limited the penetration of HP's calculators into financial and business markets. As a result, the 9820A was produced, which used very similar hardware to the 9810A (HP's second generation RPN calculator), but changed firmware and the display subsystem. Though the 9820A presents an algebraic face to the user, it uses RPN logic internally, translating algebraic user input into internal RPN sequences, solving problems using the RPN stack methodology, then displaying the answer. In programming mode, the algebraic math statements are converted to RPN and stored internally in RPN form. When a stored program is listed out or edited, the RPN sequences are translated back into algebraic form and presented to the user in that way.

A ROM Pack for the HP 9820A

The 9820A in base form is a basic five function calculator (add, subtract, multiply, divide, and square root). Along with the basic functions, the machine has six memory registers (named A, B, C, X, Y and Z), and access to 173 additional memory registers. The calculator has a 16-character 5x7 dot-matrix display, along with a built-in 16-column thermal dot-matrix printer, and magnetic card reader for offline program and data storage. Additionally, the machine is fully programmable in a high-level language called HPL, with test and branch instructions, an alphanumeric prompting input function, alphanumeric display and print functions, and subroutine capabilities. The key to the power of the 9820A lies in three 10-key sections of the keyboard that are uncommitted (except for use as alphanumeric character entry keys for program prompts and printer annotations). These sections of keys can be defined by plug-in ROM modules that add functionality to the machine. While reading above where it was stated that the calculator is a "basic five function calculator", you may have thought to yourself that this seems odd for an HP calculator...normally they are loaded with math functions", and you are right to think this. HP's approach with the 9820A was to allow the buyer to option the machine to their requirements. Option ROM modules include mathematics functions (trig, logarithms, raising numbers to powers, etc.), User Definable Functions (allows user to define function keys to perform specific user-defined functions), Peripheral Control (allows connection of external devices such as plotters, printers, etc.), and others. These ROM packs plug into slots in the top of the case in areas corresponding to the key blocks on the keyboard. Special key overlays are provided with each ROM block to show the assigned function to the keys associated with the ROM pack.

HP 9820A Internal View

The 9820A uses very similar technology as the other machines in the 98x0 series. The 9810A, 9820A, and 9830A all share the same CPU, made up of four plug-in circuit boards crammed with small- and medium-scale integrated circuit logic. HP-designed and manufactured Large-Scale ROM chips store the program(firmware) for the CPU that gives the machine its functionality, and Intel-made 1103 1K-bit static RAM (Random Access Memory) chips provide storage for program steps and memory registers. Hewlett Packard worked in conjunction with Intel on the development of the Intel 1103 1K-bit RAM chips specifically for use in the HP 98x0-series calculators. The base RAM provides 173 storage registers (if no program steps have been entered). Optional RAM can be added to bring total register storage to 429.

A Close-Up on the 16-Character LED Display of the HP 9820A

The 9820A uses a 5x7 dot-matrix LED display, designed and manufactured by Hewlett Packard. The display is made up of four modules with four characters each, for a total of 16 characters. The display scrolls horizontally when lines are longer than 16 characters. Editing keys allow the line in the display to be modified before submitted to the machine for processing.

The 9820A uses an internal binary floating-point numeric representation that provides ten digits of accuracy, with a range of -9.999999999x10-99 to 9.999999999x1099. The calculator can be set up to display results in fixed decimal mode (with zero to nine digits behind the decimal point) or in scientific mode with a selectable number of digits behind the decimal point in the mantissa. As mentioned before, the calculator accepts problems in algebraic fashion, allowing entry of problems essentially as they would be written down on paper. The keyboard has parenthesis keys that can be nested up to 12 levels deep. The machine uses the standard mathematical order of precedence (PEMDAS, an acronym for remembering the order of precedence: Parenthesis, Exponentiation, Multiplication, Division, Addition, Subtraction) rules for evaluating expressions, and accepts implied multiplication. The six single-key memory locations (A, B, C, X, Y, or Z), along with the numbered memory registers (0-172 in base form) can be assigned the results of a calculation by using the assignment key, [→]. For example to calculate the result of the content of register A, times the content of register 100, divided by 17, plus the sum of register X and Y, and put the result in register 101, the equation would be entered as:

[R()] 100 [A] [/] 17 [+] [(] [X] [+] [Y] [)] [→] [R()] 101

As can be seen, the [R()] key references a numbered memory register. Note the use of implied multiplication in the "[R()] 100 [A]", where memory register 100 is recalled, and implicitly multiplied by the content of register A. Once an expression is typed into the machine, the [EXECUTE] key is pressed to cause the machine to evaluate the expression and display the result. As part of the calculation process, the result is automatically also placed in the Z memory register, allowing multi-step calculations to occur. To enter program steps into the machine, expressions and program directives are entered, and the [STORE] key is pressed. This causes the machine to check the syntax of the line, compile it into internal form, assign a line number (starts at 0, and increments one for each line of code), and store the code in program memory. Program memory and numbered register storage are overlapped, so as a program grows, the number of available numbered memory registers decreases. On the 9100A and 9100B, this overlap wasn't enforced, meaning that it was possible to write self-modifying code by referring to memory registers which had been filled with program code. On the 9820A, the division between program storage memory and storage register memory is enforced, so tricks like self-modifying code aren't possible.

HP Magnetic Cards. Top: Storage envelope for 6" card; Middle: 6" Card; Bottom: 10 1/2" Card.

The 9820A provides a built-in magnetic card peripheral for offline storage of programs and/or data. The card reader is similar to that of the HP 9810A, except that the 9820A's reader can accept two different sizes of card. The standard card (HP Part #9126-0012), usable both in the 9810A and 9820A, is six inches long by 2 inches wide, and can hold the content of up to 45 memory registers per side. The extra-capacity card (HP Part #9162-0045) is 10 1/2" inches long, and can store 90 memory registers per side. Both types of card have scored knock outs at each end of the card that, when removed, permanently mark that side of the card as being read-only, protecting the program or data on the card from over-writing.

Cover of HP 9820A Simplified Operator's Manual

The 9820A is a fast machine, with virtually instantaneous results on basic math calculations, and barely detectable crunching on more complex problems. When running programs, the machine is also reasonably fast. The simple program:

0: "LOOP"
1: [Z] [+] 1 [→] [Z]
2: [GTO] "LOOP"

Which simply accumulates a count of the loops in the Z register, accumulates roughly 95 loops per second.

In base form, the 9820A cost nearly $5,000 when introduced in 1972. Optional ROM packs and memory incrementally increased the price, with a machine configured as the one in the museum (Option 002 RAM expansion, User Definable Functions, Mathematics, and Peripheral Control ROM packs) selling for over $7,200.

A little less than a year after the 9820A was introduced, Hewlett Packard introduced a follow-on machine, the 9821A. The 9821A replaced the magnetic card reader of the 9820A with an incremental controlled cassette tape drive, similar to that used in the HP 9830A, allowing for storage of more complex programs, as well as for data-file access through a built-in function ROM that had routines to allow user programs to read/write data to/from the cassette tape.

For much more detailed and comprehensive information on the HP9820A and other HP calculators, Dave Hicks' Museum of HP Calculators provides a wealth of detailed and interesting information.

Text and images Copyright ©1997-2023, Rick Bensene.

All content on this site is not to be gathered, scraped, replicated, or accesed in any way for any use in populating machine learning or intelligence (Artificial Intelligence, a.k.a. AI) databases, language models, graphs, or other AI-related data structures. Such use is a violation of copyright law. Any such access will be reported to the Oregon Attorney General and prosecuted to the fullest extent the law allows.