Content-Type: text/html
Enter numbers separated by ENTER key, then press operation key to display the result (= key is not needed). Numbers are stored in a LIFO stack (registers X, Y, Z, T). Display shows the last number (input or result) on the stack (register X). Register S is for storing constants.
STACK EFFECTS: (x, y, z, t, s, are current register values.)
z → T y → Z x → Y,X | op () t → T,Z z → Y y op x → X | -x → X | x → S | z → T y → Z x → Y s → X |
x → T t → Z z → Y y → X | x → Y y → X | 0 → X | 0 → X,Y,Z,T,S |
Reverse Polish Notation: Operations on n0 follow Reverse Polish Notation (RPN) in which operators are entered after the necessary operands. This allows for an unambiguous and concise representation of arithmetic statements without the need for parentheses or rules of operator precedence to specify the order of operations. In standard notation, it is ambiguous whether the statement 1 + 2 * 3 should be computed as (1 + 2) * 3 or 1 + (2 * 3), but can be specified unambiguously in RPN by 1 2 + 3 * or 2 3 * 1 +, respectively.
Precision and Non-Integer Arithmetic: n0 processes all numbers as single-precision signed integers, and supports numbers in the range -2,147,483,648 to 2,147,483,647 without fractional portions (there is no decimal point key). It is possible to operate on non-integer numbers by using the technique of fixed-point arithmetic: The user multiplies input arguments and mentally divides results by appropriate powers of 10 to obtain the required precision.
Model n0 is the first of a series of online calculators inspired by the Hewlett-Packard line of slide rule pocket calculators produced in the 1970s (n0 was designed with refrence to the HP-35 in particular) and the Forth programming language invented by Chuck Moore in 1968.
RPN Calculator Model n0 is powered by Gforth 0.6.2 on the MetaArray host at SDF.