Immediate Execution
With the immediate execution mode of operation each binary operation is executed as soon as the next operator is pressed, therefore the order of operations in a mathematical expression is not taken into account. Scientific calculators have buttons for brackets and these calculators can take order of operation in to account. Also for unary operations like √ or x2 the number is entered first then the operator. Simple 4-function calculators, such as those included with most operating systems, usually use this input method.
| Formula | Key strokes | Key stroke count |
|---|---|---|
| 2 × 3 + 1 =
1 + 2 × 3 = |
6
6 |
|
| 3 0 SIN × 3 0 COS = | 8 | |
| 5 - 3 = | 4 | |
| 1 5 + 1 0 + 1 0 + 1 0 = | 12 |
The first example has 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 calculators, where operator precedence is observed.
The immediate execution calculators are based on a mixture of infix and postfix notation: binary operations are infix but unary operations are postfix. Because operators are applied one at a time, the user must work out which operator button to use at each stage and this can lead to problems. When discussing these problems, Professor Harold Thimbleby 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, 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, whilst 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 1/x, 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 a previously entered operation.
Read more about this topic: Calculator Input Methods
Famous quotes containing the word execution:
“If Germany is to become a colonising power, all I say is, God speed her! She becomes our ally and partner in the execution of the great purposes of Providence for the advantage of mankind.”
—W.E. (William Ewart)
“If I were asked to chose between execution and life in prison I would, of course, chose the latter. Its better to live somehow than not at all.”
—Anton Pavlovich Chekhov (18601904)