## Using the Wang 700 as a Calculator

### Display Functions

The logarithmic and root functions (keys on the left-most keypad and above number-entry keypad) are all performed on the current value of the X display. No other registers are altered by these functions.
KeyFunction
1/XCompute the Inverse of the display
LOGeXCompute the Natural Logarithm of the display
LOG10XCompute the Base-10 Logarithm of the display
exCompute the Natural Exponent of the display
10xCompute the Base-10 Exponent of the display
X2Compute the Square of the display
INT XTruncate the display to an integer
√XCompute the Square Root of the display
|X|Compute the Absolute value of the display

### Register-Display Functions

General math functions (add, subtract, multiply, divide), and moving data around, are all done between the X display and a register or Y display.

The register operations available are:
KeyFunction
STORE (or ↑)Copy X display value into register
RECALL (or ↓)Copy register value into X display
-Subtract X display from register
×=Multiply register by X display
÷=Divide register by X display
↑↓=Exchange register with X display

The target register is selected based on the address keywords INDIR (indirect, using Y display), DIR or DIRECT (second key code is register number), or none (implied) as Y display.

For DIRECT addressing, register numbers may be entered using the toggle switches and keys 00 through 15. Note, register numbers are effectively interpreted as decimal so using the keys 10 through 15 is not recommended. The toggle switches are used to form the first digit of the register number, normally 0-9, in binary. Special codes exist for accessing registers above 99, but do not have dedicated keys. In the case of accessing register above 99, the first digit may range above 9 in order to access register above 199. For example, register 243 may be accessed using the "DIR+100" codes and register "number" 14 03 (143 + 100 = 243).

### Calculator Example

As an example, consider converting degrees Fahrenheit into degrees Celsius. The basic formula is:
```C = (F - 32) * 5 / 9
```

Note, the calculator has no concept of precedence or parenthesis, so the calculation must be performed in a deliberate order so that precedence is maintained. The first part to perform is the F - 32. Next, that result is multiplied by 5. Finally, that result is divided by 9. Note, an alternate order is to compute 5 / 9 (and possibly store it someplace more permanent) and then multiply by that pre-computed value. For simplicity in example, the first approach is used.

So, the steps required to convert 70 degrees Fahrenheit into degrees Celsius would be:
KeyDisplay, after pressing key
7+.000000000000
+7
0+.000000000000
+70
+70.0000000000
+70.0000000000
3+70.0000000000
+3
2+70.0000000000
+32
-+38.0000000000
+32.0000000000
5+38.0000000000
+5
×+190.000000000
+5.00000000000
9+190.000000000
+9
÷+21.1111111111
+9.00000000000

So, the answer is that 70 degrees Fahrenheit equals (approximately) 21 degrees Celsius.