LokiBin in RealBasic Calculator

Craig A. Finseth, fin@finseth.com.

This documentation covers the LokiBin in RealBasic calculator. LokiBin is a RPN binary calculator. Other versions of this and similar calculators can be found at the Loki site. Enjoy.

LokiBin is provided as free software under the GNU Public License. Both the binary RealBasic project file and an XML dump (which includes full source) are provided as part of the distribution. RealBasic can be obtained from the Real Software site.

Installation: just copy the

file somewhere convenient and run it. No other files are required. On Macintosh systems, be sure to use the Finder (or equvalent tool) for the copying.

The file RPN.html provides a quick introduction to RPN.

Copyright 2002,3,5 by Craig A. Finseth.


Notes

LokiBin is your basic RPN calculator. All numbers are integers with a word size of 2 to 32 bits (selectable).

You can enter numbers in binary, octal, decimal, or hex (user selectable). If you sent the entry mode to, say, octal, the program will only let you enter the digits 0-7. You can fool the program if you like, but the results may be unexpected.

The "C Style" entry mode allows you to specify different formats "on the fly." It uses:

Entry is always case-independent. "C Style" displays in hexadecimal.

All forms of the value in the X register are shown to the right.

Math is correct except that addition, subtraction, multiplication, division, and modulo operate only in 2's complement mode.


Keyboard Equivalents

Almost all commands can be given from the keyboard. The available keys are as listed.

keyoperation
space, CR, LFEnter
BS, DELerase last character
0-9enter digit
A-Fenter hex digit
!binary not
#clear X
&binary and
|binary or
^binary xor
~negation; change sign (shows as +/-)
+addition
-subtraction
*multiplication
/division
%modulo
@clear
Kkey in: accept a key and enter its ASCII value
Lrecall last X
Ppopulation count (number of 1 bits)
Rroll down
Sswap X and Y
Xused for C Style entry
Zleading zero count

Version History

1.0, 2002-09-09, first release

1.1, 2003-05-14

1.2, 2005-08-13


Go to Craig Finseth's home page, http://www.finseth.com/.