Computing: Free Pascal Programming

Basic arithmetic operations hexadecimal numbers calculator.


Download SimpleHexCalculator desktop application (Windows 64bit) Download SimpleHexCalculator source code (Lazarus/Free Pascal)

Description: Simple calculator application, that may be used to perform basic arithmetic operations (addition, subtraction, multiplication, integer division) with hexadecimal numbers. The application supports byte, word, double-word, and quad-word operands, negative numbers representation depending on the size actually used: with "bytes", FF = -1; with "words", FF = 00FF = 255, -1 being FFFF. Integer division may be used either to calculate the division result, or the remainder. Please, note that there is no operator precedence. Thus, for example, 1 + 2 * 3 = 9 (and not 7, as you might have expected).
Number input may be done by ignoring the leading zeros. Thus, entering 100 means 0100 (256) when working with words, entering FF means FF (-1) when working with bytes, 000000FF (255) when working with double-words. The number of digits that you may enter depends on the actual operand size, thus when working with words, you cannot enter a number with 5 or more digits. Division by 0 yields an "Error". A result that is greater than the maximum, or less than the minimum for the actual size yields an "Overflow". Thus, for example, when working with bytes, the result must be in the interval [-128, 127].
The calculator includes a simple Memory feature (note that MR may only be used if you haven't started to enter a number). The Clear button erases the actual number input if you have started to enter a number, otherwise, it resets the calculator (except for the memory content). Changing the operand size always resets the calculator, including resetting the memory content to 0.

Free Pascal features: Basic controls: Menus, push buttons, edit fields, comboboxes.

Screenshot:

Simple hexadecimal calculator PC application

If you like this application, please, support me and this website by signing my guestbook.