There are various ways in which
calculator
An electronic calculator is typically a portable electronic device used to perform calculations, ranging from basic arithmetic to complex mathematics.
The first solid-state electronic calculator was created in the early 1960s. Pocket-sized ...
s interpret keystrokes. These can be categorized into two main types:
* On a single-step or immediate-execution calculator, the user presses a key for each operation, calculating all the intermediate results, before the final value is shown.
* On an expression or formula calculator, one types in an expression and then presses a key, such as "=" or "Enter", to evaluate the expression. There are various systems for typing in an expression, as described below.
Immediate execution
The immediate execution mode of operation (also known as single-step, algebraic entry system (AES)
or chain calculation mode) is commonly employed on most general-purpose calculators. In most simple four-function calculators, such as the
Windows calculator
Windows Calculator is a software calculator developed by Microsoft and included in Windows. In its Windows 10 incarnation it has four modes: standard, scientific, programmer, and a graphing mode. The standard mode includes a number pad and butto ...
in Standard mode and those included with most early
operating system
An operating system (OS) is system software that manages computer hardware, software resources, and provides common services for computer programs.
Time-sharing operating systems schedule tasks for efficient use of the system and may also in ...
s, each
binary operation
In mathematics, a binary operation or dyadic operation is a rule for combining two elements (called operands) to produce another element. More formally, a binary operation is an operation of arity two.
More specifically, an internal binary op ...
is executed as soon as the next operator is pressed, and therefore the
order of operations
In mathematics and computer programming, the order of operations (or operator precedence) is a collection of rules that reflect conventions about which procedures to perform first in order to evaluate a given mathematical expression.
For exampl ...
in a mathematical expression is not taken into account.
Scientific calculators
A scientific calculator is an electronic calculator, either desktop or handheld, designed to perform mathematical operations. They have completely replaced slide rules and are used in both educational and professional settings.
In some areas ...
, including the Scientific mode in the Windows calculator and most modern software calculators, have buttons for brackets and ''can'' take order of operation into account. Also, for
unary operation
In mathematics, an unary operation is an operation with only one operand, i.e. a single input. This is in contrast to binary operations, which use two operands. An example is any function , where is a set. The function is a unary operation on ...
s, like √ or ''x''
2, the number is entered first, then the operator; this is largely because the display screens on these kinds of calculators are generally composed entirely of
seven-segment characters and thus capable of displaying only numbers, not the functions associated with them. This mode of operation also makes it impossible to change the expression being input without clearing the display entirely.
The first two example have been given twice. The first version is for simple calculators, showing how it is necessary to rearrange operands in order to get the correct result. The second version is for
scientific calculator
A scientific calculator is an electronic calculator, either desktop or handheld, designed to perform mathematical operations. They have completely replaced slide rules and are used in both educational and professional settings.
In some areas ...
s, where
operator precedence
In mathematics and computer programming, the order of operations (or operator precedence) is a collection of rules that reflect conventions about which procedures to perform first in order to evaluate a given mathematical expression.
For exampl ...
is observed. Different forms of operator precedence schemes exist. In the algebraic entry system with hierarchy (AESH),
the precedence of basic mathematical operators is taken into account,
whereas calculators with algebraic entry system with parentheses (AESP)
support the entry of parentheses.
An input scheme known as algebraic operating system (AOS)
combines both.
This is the name Texas Instruments uses for the input scheme used in some of its calculators..
Immediate-execution calculators are based on a mixture of infix and postfix notation: binary operations are done as infix, but unary operations are postfix. Because operators are applied one-at-a-time, the user must work out which operator key to use at each stage, and this can lead to problems. When discussing these problems,
Harold Thimbleby
Harold W. Thimbleby (born 19 July 1955) is a British professor of computer science at Swansea University, Wales. He is known for his works on user interface design within the realm of human computer interaction.
Overview
Harold Thimbleby he ...
has pointed out that button-operated calculators "require numbers and operation signs to be punched in a certain order, and mistakes are easy to make and hard to spot".
Problems can occur because, for anything but the simplest calculation, in order to work out the value of a written formula, the user of a button-operated calculator is required to:
* Rearrange the formula so that the value can be calculated by pressing buttons one at a time, while taking operator precedence and parentheses into account.
* Use memory buttons to ensure that operations are applied in the correct order.
* Use the special buttons and , that do not correspond to operations in the formula, for non-commutative operators.
Mistakes can be hard to spot because:
* For the above reasons, the sequence of button presses may bear little resemblance to the original formula.
* The operation carried out when a button is pressed is not always the same as the button, but could be a previously entered operation.
Examples of difficulties
The simplest example given by Thimbleby of a possible problem when using an immediate-execution calculator is 4 × (−5). As a written formula the value of this is −20 because the minus sign is intended to indicate a negative number, rather than a subtraction, and this is the way that it would be interpreted by a formula calculator.
On an immediate-execution calculator, depending on which keys are used and the order in which they are pressed, the result for this calculation may be different. Also there are differences between calculators in the way a given sequence of button presses is interpreted. The result can be:
* : If the subtraction button is pressed after the multiplication , it is interpreted as a correction of the rather than a minus sign, so that 4 − 5 is calculated.
* : If the change-sign button is pressed before the 5, it isn't interpreted as −5, and 4 × 5 is calculated.
* : To get the right answer, must be pressed last, even though the minus sign isn't written last in the formula.
[.]
The effects of operator precedence, parentheses and non-commutative operators, on the sequence of button presses, are illustrated by:
* : The multiplication must be done first, and the formula has to be rearranged and calculated as −5 × 6 + 4. So ± and addition have to be used rather than subtraction. When is pressed, the multiplication is performed.
* : The addition must be done first, so the calculation carried out is (5 + 6) × 4. When is pressed, the addition is performed.
* : One way to do this is to calculate (5 + 6) / 4 first and then use the button, so the calculation carried out is 1/
5 + 6)/4
* : The two multiplications must be done before the addition, and one of the results must be put into memory.
These are only simple examples, but immediate-execution calculators can present even greater problems in more complex cases. In fact, Thimbleby claims that users may have been conditioned to avoid them for all but the simplest calculations.
Declarative and imperative tools
The potential problems with immediate-execution calculators stem from the fact that they are
imperative. This means that the user must provide details of ''how'' the calculation has to be performed.
Thimbleby has identified the need for a calculator that is more automatic and therefore easier to use, and he states that such a calculator should be more
declarative.
[.] This means that the user should be able to specify only ''what'' has to be done, not how, and in which order, it has to be done.
Formula calculators are more declarative because the typed-in formula specifies what is to be done, and the user does not have to provide any details of the step-by-step order in which the calculation has to be performed.
Declarative solutions are easier to understand than imperative solutions,
and there has been a long-term trend from imperative to declarative methods. Formula calculators are part of this trend.
Many software tools for the general user, such as spreadsheets, are declarative. Formula calculators are examples of such tools.
Using the full power of the computer
Software calculators that simulate hand-held, immediate execution calculators do not use the full power of the computer: "A computer is a far more powerful device than a hand-held calculator, and thus it is illogical and limiting to duplicate hand-held calculators on a computer." (Haxial Software Pty Ltd) Formula calculators use more of the computer's power because, besides calculating the value of a formula, they work out the order in which things should be done.
Infix notation
Infix notation is a method similar to immediate execution with AESH and/or AESP, but unary operations are input into the calculator in the same order as they are written on paper.
Calculators that use infix notation tend to incorporate a
dot-matrix display
A dot-matrix display is a low cost electronic digital display device that displays information on machines such as clocks, watches, calculators, and many other devices requiring a simple alphanumeric (and/or graphic) display device of limited re ...
to display the expression being entered, frequently accompanied by a seven-segment display for the result of the expression. Because the expression is not evaluated until it is fully entered, there is provision for editing the entered expression at any point prior to evaluation, as well as replaying entered expressions and their answers from memory.
Most
graphing calculators
A graphing calculator (also graphics calculator or graphic display calculator) is a handheld computer that is capable of plotting graphs, solving simultaneous equations, and performing other tasks with variables. Most popular graphing calculat ...
by
Casio
is a Japanese multinational electronics manufacturing corporation headquartered in Shibuya, Tokyo, Japan. Its products include calculators, mobile phones, digital cameras, electronic musical instruments, and analogue and digital watches. It ...
and
Texas Instruments
Texas Instruments Incorporated (TI) is an American technology company headquartered in Dallas, Texas, that designs and manufactures semiconductors and various integrated circuits, which it sells to electronics designers and manufacturers globall ...
use this method. On its
scientific calculator
A scientific calculator is an electronic calculator, either desktop or handheld, designed to perform mathematical operations. They have completely replaced slide rules and are used in both educational and professional settings.
In some areas ...
s,
Sharp
Sharp or SHARP may refer to:
Acronyms
* SHARP (helmet ratings) (Safety Helmet Assessment and Rating Programme), a British motorcycle helmet safety rating scheme
* Self Help Addiction Recovery Program, a charitable organisation founded in 199 ...
calls this method Direct Algebraic Logic (D.A.L.),
Casio
is a Japanese multinational electronics manufacturing corporation headquartered in Shibuya, Tokyo, Japan. Its products include calculators, mobile phones, digital cameras, electronic musical instruments, and analogue and digital watches. It ...
calls this method the Visually Perfect Algebraic Method (V.P.A.M.), and Texas Instruments calls it the Equation Operating System (EOS).
Reverse Polish notation
In reverse Polish notation,
also known as postfix notation, all operations are entered after the
operand
In mathematics, an operand is the object of a mathematical operation, i.e., it is the object or quantity that is operated on.
Example
The following arithmetic expression shows an example of operators and operands:
:3 + 6 = 9
In the above examp ...
s on which the operation is performed. Reverse Polish notation is parenthesis-free, which usually leads to fewer button presses needed to perform an operation. By the use of a
stack
Stack may refer to:
Places
* Stack Island, an island game reserve in Bass Strait, south-eastern Australia, in Tasmania’s Hunter Island Group
* Blue Stack Mountains, in Co. Donegal, Ireland
People
* Stack (surname) (including a list of people ...
, one can enter formulas without the need to rearrange operands.
Hewlett-Packard
The Hewlett-Packard Company, commonly shortened to Hewlett-Packard ( ) or HP, was an American multinational information technology company headquartered in Palo Alto, California. HP developed and provided a wide variety of hardware components ...
's
calculators
An electronic calculator is typically a portable electronic device used to perform calculations, ranging from basic arithmetic to complex mathematics.
The first solid-state electronic calculator was created in the early 1960s. Pocket-size ...
are well-known examples among calculators which use RPN. Early models, such as the
HP-35
The HP-35 was Hewlett-Packard's first pocket calculator and the world's first ''scientific'' pocket calculator: a calculator with trigonometric and exponential functions. It was introduced in 1972.
History
In about 1970 HP co-founder Bill Hewle ...
, used RPN entirely without any alternative methods. Later models can switch between RPN and another notation, such as the
HP-12C
The HP-12C is a financial calculator made by Hewlett-Packard (HP) and its successor HP Inc. as part of the HP Voyager series.
Functionality
The HP-12C is HP's longest and best-selling product, in continual production since its introduction i ...
Platinum which includes both RPN and immediate execution (with operations performed strictly in the order in which inputs are entered), the
HP 33s with both RPN and a hybrid of immediate/infix algebraic notation (operations are performed in accordance with standard order of operations, but single-operand functions are input with the operand first followed by the operator), and its successor the
HP 35s
The HP 35s (F2215A) is a Hewlett-Packard non-graphing programmable scientific calculator. Although it is a successor to the HP 33s, it was introduced to commemorate the 35th anniversary of the HP-35, Hewlett-Packard's first pocket cal ...
with both RPN and standard algebraic infix notation.
Note: The first example illustrates one of the few cases where reverse Polish notation does not use the fewest button presses – provided one does not rearrange operands. If one would do so then only six keystrokes would be needed.
BASIC notation
BASIC notation is a particular implementation of infix notation where functions require their
parameters
A parameter (), generally, is any characteristic that can help in defining or classifying a particular system (meaning an event, project, object, situation, etc.). That is, a parameter is an element of a system that is useful, or critical, when ...
to be in brackets.
This method was used from the 1980s to the 1990s in BASIC programmable calculators and
pocket computer
A pocket computer was a 1980s-era user programmable calculator-sized computer that had fewer screen lines,
Some had only one line and often fewer characters per line, than the Pocket-sized computers introduced beginning in 1989. Manufacturers in ...
s. Texas Instruments would later implement the method in many of its graphing calculators, including the
TI-83 and
TI-84 Plus series
The TI-84 Plus is a graphing calculator made by Texas Instruments which was released in early 2004. There is no original TI-84, only the TI-84 Plus, the TI-84 Plus Silver Edition models, and the TI-84 Plus CE. The TI-84 Plus is an enhanced ve ...
. Most
computer algebra systems
A computer algebra system (CAS) or symbolic algebra system (SAS) is any mathematical software with the ability to manipulate mathematical expressions in a way similar to the traditional manual computations of mathematicians and scientists. The de ...
also use this as the default input method.
In BASIC notation, the formula is entered as it would be entered in
BASIC
BASIC (Beginners' All-purpose Symbolic Instruction Code) is a family of general-purpose, high-level programming languages designed for ease of use. The original version was created by John G. Kemeny and Thomas E. Kurtz at Dartmouth College ...
, using the
PRINT
command – the
PRINT
command itself being optional. On pressing "ENTER" or "=", the result would be displayed. As with standard infix notation, typing mistakes in the entered formula could be corrected using the same editor function as the one used when programming the calculator.
For the second example, two options are given depending on if the BASIC programmable pocket computers have dedicated trigonometric keys or not.
Ten key notation
The ten-key notation input method first became popular with accountants'
paper tape adding machines. It generally makes the assumption that entered numbers are being summed, although other operations are supported. Each number entered is followed by its sign (+/−), and a running total is kept. An assumption is made that the last operand can be implicitly used next, so by just entering another + (for example), one will reuse the most recent operand. Ten key input mode is available in printing calculators from companies such as
Sharp
Sharp or SHARP may refer to:
Acronyms
* SHARP (helmet ratings) (Safety Helmet Assessment and Rating Programme), a British motorcycle helmet safety rating scheme
* Self Help Addiction Recovery Program, a charitable organisation founded in 199 ...
, and in software calculators like Judy's TenKey used by accounting firms. Online tenkey training and certification tools are available as well, and some businesses use
ten key typing speed as an employment criterion.
Mathematical display
Modern computer algebra systems, as well as many scientific and graphing calculators, allow for "pretty-printing", that is, entry of equations such that
fractions
A fraction (from la, fractus, "broken") represents a part of a whole or, more generally, any number of equal parts. When spoken in everyday English, a fraction describes how many parts of a certain size there are, for example, one-half, eight ...
,
surds and
integral
In mathematics
Mathematics is an area of knowledge that includes the topics of numbers, formulas and related structures, shapes and the spaces in which they are contained, and quantities and their changes. These topics are represented i ...
s, etc. are displayed in the way they would normally be written. Such calculators are generally similar in appearance to those using infix notation, but feature a full dot-matrix display and templates for entering expressions, which are navigated using arrow keys on the calculator. The templates contain spaces for values or expressions to be entered, and empty values would typically result in a syntax error, making it more cumbersome to navigate than standard infix notation; standard infix notation is often an option on such calculators as well.
Casio used to call this feature ''Natural Display'' or ''Natural textbook display'', but now uses ''Natural-VPAM''. Sharp calls this ''WriteView'' on its scientific calculators and simply ''Equation Editor'' on its graphing calculators. HP calls this its ''Textbook'' display setting, which can be used in both RPN and Algebraic mode and in both the ''Stack'' and in the ''Equation Writer'' application.
Mathematica
Wolfram Mathematica is a software system with built-in libraries for several areas of technical computing that allow machine learning, statistics, symbolic computation, data manipulation, network analysis, time series analysis, NLP, optimizat ...
calls this ''Semantic-Faithful Typesetting''.
Mathcad
Mathcad is computer software for the verification, validation, documentation and re-use of mathematical calculations in engineering and science, notably mechanical, chemical, electrical, and civil engineering. Released in 1986 on DOS, it introduce ...
calls this ''standard math notation''.
Maple
''Acer'' () is a genus of trees and shrubs commonly known as maples. The genus is placed in the family Sapindaceae.Stevens, P. F. (2001 onwards). Angiosperm Phylogeny Website. Version 9, June 2008 nd more or less continuously updated since http ...
has a ''Math Equation Editor'', but does not have a special name for this input method. Texas Instruments calls it ''MathPrint,'' incorporating it in its high-end calculators, such as the
TI-Nspire series
The TI-Nspire is a graphing calculator made by Texas Instruments, which was released in July 2007, notable for featuring a non-QWERTY keyboard and a different key-by-key layout than its predecessors.
Development
The original TI-Nspire ...
, and in 2011 added the feature to its TI-84 series with the 2.55 OS update.
For the second example, two options are given, depending on whether the calculators will automatically insert needed parentheses or not. Machines equipped with an alphanumeric display will display
SIN(30)×COS(30)
before is pressed.
See also
*
Calculator
An electronic calculator is typically a portable electronic device used to perform calculations, ranging from basic arithmetic to complex mathematics.
The first solid-state electronic calculator was created in the early 1960s. Pocket-sized ...
*
Comparison of software calculators
This is a list of notable software calculators.
Immediate execution calculators (button-oriented)
Expression or formula calculators (command-line oriented)
See also
* Software calculator
* Calculator input methods
* Formula calculator
* C ...
*
Computer algebra system
A computer algebra system (CAS) or symbolic algebra system (SAS) is any mathematical software with the ability to manipulate mathematical expressions in a way similar to the traditional manual computations of mathematicians and scientists. The de ...
*
Graphing calculator
A graphing calculator (also graphics calculator or graphic display calculator) is a handheld computer that is capable of plotting graphs, solving simultaneous equations, and performing other tasks with variables. Most popular graphing calculat ...
*
Keystroke programming Keystroke programming describes a specific way of programming by which each keystroke on a device or application is recorded in some way and then played back so that the recorded key-presses can be repeated multiple times. Keystroke programming is m ...
*
Mathematical notation
Mathematical notation consists of using symbols for representing operations, unspecified numbers, relations and any other mathematical objects, and assembling them into expressions and formulas. Mathematical notation is widely used in mathematic ...
*
Pocket computer
A pocket computer was a 1980s-era user programmable calculator-sized computer that had fewer screen lines,
Some had only one line and often fewer characters per line, than the Pocket-sized computers introduced beginning in 1989. Manufacturers in ...
*
Programmable calculator
Programmable calculators are calculators that can automatically carry out a sequence of operations under control of a stored computer programming, program. Most are Turing complete, and, as such, are theoretically general-purpose computers. Howe ...
*
Scientific calculator
A scientific calculator is an electronic calculator, either desktop or handheld, designed to perform mathematical operations. They have completely replaced slide rules and are used in both educational and professional settings.
In some areas ...
References
Further reading
*
* (13 pages)
* (5 pages)
* (64 pages)
*
(13 of 702 pages)
* (4 pages)
* (35 pages)
* (12 pages)
*
*
{{DEFAULTSORT:Calculator Input Methods
Calculators
Mathematical notation