I often use a mix of hexadecimal and decimal in my calculations, and needed a calculator that could do this conveniently. I designed this calculator with the following goals:
This is the documentation page. The calculator is here.
The top two rows of buttons map to F1 to F12 of the keyboard, with Shift for the top row, and without Shift for the second row.
When a button has a red label above, or blue label below the main label, the red function is accessed by holding Shift, while the blue function is accessed by holding Ctrl.
Unlike most calculators, the decimal point and exponent functions share one key. When entering a number, pressonce to enter the fractional part, and press again to enter the exponent. Some examples:
The backspace key is used for three similar operations:
Converting between bases is done by changing the display mode using the Bin, Dec, and Hex buttons. Changing the mode changes the base for all numbers in the display.
Entering numbers: The base can be changed while entering a number, to allow mixed-base expressions. When entering a number, pressing Bin/Dec/Hex once changes the base only for the number being entered without changing the display mode. Pressing a second time changes the display mode. The base of a number being entered can also be changed with the Shift and Ctrl keys. Typing digits while holding Shift changes the base to decimal, while holding Ctrl changes the base to Hexadecimal.
For example, to calculate C00 (hexadecimal) + 128 (decimal), type
c00+80=c80 in hexadecimal mode or
3072+128=3200 in decimal mode. Individual numbers
being entered can be in a different base than the current display mode.
The same calculation in RPN mode would be
+( ) +( ) ,
with a result of
3200 (decimal), or
Typing a digit that exceeds the maximum allowed by the current mode also automatically changes the base. For example, typingwhile in binary mode automatically changes the number to decimal, while typing changes the number to hexadecimal, regardless of whether Shift or Ctrl are held.
The current display mode is shown by the yellow highlight on the Bin, Dec, and Hex buttons. This indicates the base that is used to display numbers, and is also the default base used when entering a new number.
When entering a number, the base of the current number is shown in the display and on the Bin/Dec/Hex buttons.
The right side of the bottom row of the display shows
one of the Bin/Dec/Hex button labels has an underline. These are only shown when entering a number. If the yellow highlight is on
a different Bin/Dec/Hex button than the underline, it indicates that the number is being entered in a different base
than the base used to display numbers.
There are two input notations supported:
Unary operations (operations with one operand) are usually input after their operand (e.g.,), but most can also be entered before the operand (e.g., ) with the interpretation determined by context. This context-dependent interpretation can be confusing, especially when it interacts with operator precedence rules. For example, results in sqrt(12), but results in (ln(1))2.
The button layout is slightly different between the two modes. RPN mode uses ankey to enter multiple numbers without an operator in between, while infix mode requires , , and keys.
The Numpad layout matches the numeric keypad and navigation keys of a typical full-size keyboard. Hexadecimal numbers can be entered using the numeric keypad while holding down Ctrl. This places the A to F keys near the numeric keys, to allow entering hexadecimal numbers without jumping all over the keyboard.
The Hexadecimal layout is intended for mouse or touchscreen devices where there is no need for buttons to be arranged to match a keyboard. With more buttons, all sixteen hexadecimal digits are arranged in numerical order and available without using Ctrl.
The Touch 42 layout arranges the sixteen hexademical digits into four groups of four. Each digit is entered by dragging from one of the four start squares to one of four end squares, which provides 16 different combinations. For example, dragging from the lower-left square to the upper-right square results in the digit 2. The numbers 0, 4, 8, and C only require a single tap/click because they have the same start and end square. Because there are only four buttons instead of sixteen, less precise clicking/tapping is required. In exchange, most digits are line segments instead of just a point.
If set to something other than None, the result of every operation is truncated to an integer of the selected number of bits. This is useful when you want to use fixed-length two's complement integers including its overflow behaviour.
Select degrees or radians as the unit for angles for trigonometric functions.