A calculator is a computer system – more precisely an “embedded system”.Why “Embedded”, is below…
A calculator consists essentially of the following hardware components:
- The input unit – these are the buttons of the calculator.
- The output unit – this is the display of the calculator.
- A “central processing unit” – also called CPU – this is the actual “computing unit”
The CPU plays the central role here:
- It eselects the keyboard and evaluates its inputs.
- It performs the actual calculations according to the keyboard input.
- It controls the display and outputs the inputs / calculation results.
But the CPU doesn’t do anything without a “program”.This is where the “embedded software” comes into play. This is the program that performs the above inputs / calculations and outputs.
You can imagine this like a program on your PC, only that the hardware and the display are directly controlled there.
It is called “embedded” because the software is firmly embedded in the system.This means that it does not require any software from the outside.
This program – also called the “firmware” – is usually fixed in a so-called “”non-volatile” memory – the ROM (Read Only Memory) is housed, which is already inserted into the CPU (programmed) with many calculators already during the production of the calculator (let’s leave really expensive computers aside, at which one “Software Updates” can make a”
I.d.R. this program is not interchangeable, and therefore cannot be lost when the computer is switched off.
As soon as you turn on the calculator, this program starts immediately and initializes the hardware.
Roughly speaking, it first configures the input ports to which the keyboard is connected and the output ports that are used to control the display.The “ports” are the electrical single-output interfaces (salopp the “wires”) and which the keyboard/display are connected to the CPU.
Then, if necessary,some memory areas used internally for the calculator are initialized (e.g. variable memory) and finally an infinite loop starts, in which from now on periodically:
- waiting for keystrokes.
- These inputs are interpreted and the calculation(s) are performed accordingly.
- The result of the calculation is output on the display.
Thus, the firmware has also stored a small algorithm (program sequence) per mathematical function, which corresponds to the implementation of the corresponding function.
While the trivial operations (,-,*,:) very small routines, there are certainly more complex routines in this firmware.
For example, if a sine is to be calculated, then the input value (which was previously received by the keyboard) is probably called an algorithm (program function).”Taylor Series Development” (see also Sinus and Cosine – Wikipedia).
The result of this series development – i.e. the result of the sine – will then output the CPU on the display.
This happens for all functions assigned to the buttons of the calculator.The logarithm will have another Taylor series – as a power series – implemented as a SW algorithm in this firmware etc.
By the way – if you use an old calculator that still has slow CPU’s in it (often these were only 4-bit CPUs), then calculate a slightly more complicated function, such as the above mentioned sinus.
You will then be able to observe for sure that the display often stays black for a moment during the calculation – at least longer than if you only have something trivial like +/- etc.Expects. This shows that the processor is already busy for a few hundred milliseconds to calculate the Taylor series 😉
I hope that is so understandable?