Sharp EL-5120
# Sharp EL-5120

The Sharp EL-5120 is a scientific programmable calculator. It has about 1 KB of total RAM available to the user, and has 4 basic operational modes:

* Real mode: it is the basic operational mode for directly performing standard algebraic and statistical calculations, as well as evaluating user-defined functions and numerically integrating them.
* NBase: can switch between Binary, Octal, Decimal and Hexadecimal base. Most functions from Real Mode don't work in this mode, but boolean operators for each numerical base are available. Hexadecimal base calculation are performed in 32 bits (8 digits) and there is support for signed operation, but Binary base is limited to 16 bits, though.
* Solver: an interactive expression solver which can, in theory, numerically solve any equation versus any variable, using Newton's method. It may however fail to solve certain classes of equations depending on the expression format and starting values of the variables, so it is often necessary to rewrite the expression or experiment with initial values.
* Program mode: Here the user can enter and execute short programs written in a language closely resembling a cut-down version of FORTRAN or BASIC. Programs can be made to operate in either Real or NBase mode, but not a mixture of both.

## Main features

* 3-line alphanumeric LCD display.
* Alphanumeric keyboard with SHIFT and ALPHA keys.
* All the standard trigonometrical functions (SIN, COS, TAN) as well as their inverse and hyperbolic versions.
* All of the standard power raising, logarithmic etc. functions
* Some functions like statistical operations and boolean logic functions are accessed via sub-menus, and thus they are not printed on any visible key.
* 28 global user variables (A through Z plus ANS and θ), stored in CMOS memory.
* Up to 9 local variables for each mode of operation and equation, solver or program file, with user defined names. Unlike the 28 global ones, using these local variables consumes user RAM.
* 1 and 2 variables statistics, has only a simple linear regression analysis.
* File "saving", "loading" and "deleting" from the small user RAM. Each mode can store its own "files", containing e.g. the last calculation or expression, a solver equation or a program plus any eventual local variables and the last ANS value.
* Expression evaluator (in Real mode).
* Numerical integration using Simpson's rule.
* Numerical equation solver vs a specific variable using Newton's method.
* Programs and solver equations can "exchange data" between them by appropriate use of the global variables, for solving more complex problems.
* Adjustable contrast.
* Uses one 3V CR2025 lithium battery.

## Disadvantages

* Lack of built-in support for complex numbers (can only be emulated via a program or equations).
* Programs and equation files eat up RAM quickly, especially if they contain local variables.
* Local program variables cannot be removed once added without deleting the program.
* Integration/solver functions can be slow or erratic.
* Only one kind of statistical regression (linear).
* Lack of any built-in application formulae or physical constants, these have to be defined and saved by the user as expression and local variables, with a notable expense of RAM.
* Lack of some built-in functions like a simultaneous linear equations system or second grade equations solver, thus forcing to implement them by programming.
* The programming language used consumes RAM too quickly due to weak construction, lacking a proper FOR-like statement and thus forcing to use long and costly LABEL, GOTO and GOSUB statements.

## Sample programs

Please note that the actual notation might be different, as some special EL-5120 characters cannot be directly typed on a PC, e.g. the square root and fraction operator:

