Hexadecimal Calculator


Hexadecimal calculator with real time simultaneous display of decimal and hexadecimal values. Enter a value in hexadecimal and the value is converted and displayed in the decimal window as the hexadecimal value is entered. Switch the mode to decimal and when decimal values are entered they are converted in real time to hexadecimal and displayed in the hexadecimal window. The binary value is also converted in real time and is easily accessible by sliding the display down in landscape mode.


Hexadecimal Calculator Landscape Left

The calculator uses a unique snap-action preview character as a visual indication that a key is pressed. When a key is pressed the key character is displayed in red on the right side of the active input window. When the key is released the character snaps into place in the active input window. If the character displayed is not the intended key, move your finger to the desired key until its character is displayed and then release, or move off of the keyboard and release to cancel the key press.


There are three data types supported; signed integer, unsigned integer and floating-point. All data types are 64 bit values. Values can be entered in either hexadecimal or decimal for all three data types. When the data type is changed, the value in the active window remains unchanged and the value in the inactive window will be converted to the new data type based on the value in the active window.


Bitwise logical operations can be performed on both hexadecimal and integer decimal values. The bitwise operations supported are AND, OR, XOR, left shift , right shift and inverse.


The keyboard will change depending on the selected data type and current input mode i.e. hexadecimal or decimal. Keys that are not valid for a particular state are not visible.


Operating Instructions


To provide quick access to settings and the help screen the app is set up as one continuous page in landscape mode as shown in the figure below. The virtual scroll wheel (3) will appear in landscape mode indicating that other features can be accessed by sliding your finger up or down along it. The scroll wheel will always appear on the side opposite the phone status bar. Landscape mode is the perferred mode of operation since the wider screen allows for larger font sizes for easy viewing.


Calculator details with baloon references
  • 1. Background color select menu
  • 2. Accent color select menu
  • 3. Virtual scroll wheel
  • 4. Data type menu
  • 5. Binary text window (b2)
  • 6. Hexadecimal text window (b16)
  • 7. Decimal text window (b10)
  • 8. Keyboard
  • 9. Help screen

When the app is started the keyboard and two text windows are visible. The top window is the hexadecimal window (labeled b16) and the bottom window is the decimal window (labeled b10). The active input window will have a white background and the inactive window will have a gray background. To change the active window press the H/D (hex/decimal) key. The keyboard will vary depending on the input mode and the selected data type. Keys that are not valid for the current input mode or selected data type are not visible. For example in hexadecimal mode the A B C D E and F keys are always visible, in decimal mode they are not visible.


When a key is pressed a preview character representing the key pressed will show up in red on the right side of the active input window. If the preview character is not the intended key, slide your finger to the desired key and then release your finger. To cancel any key press slide you finger off the keyboard until the preview character is no longer visible and release. If the key pressed is a numeric value (0 - 9 or A - F) it will snap into place in the active input window when the key is released. If it is an operator that requires a second value,(such as the + key) the operator will be displayed until the next value is started. To change the operation press a different operator key and the preview character will change to the new operator. Or to cancel an operation press the backspace key. If the key pressed is an operator that does not require a second value (such as +/- key) the preview character will only be visible while the key is being pressed. Once the key is released the operation will be performed.


To perform an operation; enter a value, press an operator key, enter a value and press the equal (=) key. The result will be displayed after the equal key is released. For example enter 4 + 3 = and when the equal key is released 7 will be displayed. A running operation can also be performed by pressing an operator key in place of the equal key. For example enter 4 + 3 + when the plus key is released 7 + will be displayed indicating that the next value entered will be added to 7. A running operation can also contain mixed operators. Consider the following key sequence: 7 + 3 * 2 / 5 = when the equal key is released 4 will be displayed. The operations are performed in the order they are entered; first 3 is added to 7 and the result is 10; then 10 is multiplied by 2 and the result is 20; finally 20 is divided by 5 and the result is 4.


There are three data types that can be selected; signed integer, unsigned integer and floating-point. All data types are 64 bit values. To convert a value from the current data type to a different data type, use the scroll wheel to slide the screen down until the data type menu is displayed. Then select the new data type. The value in the active input window will remain unchanged and the value in the inactive window will change to the equivalent value in the new data type based on the value in the active window. For example if the current conditions are as follows; mode is hexadecimal, data type is signed integer, the value in the (active) b16 window is FFFF FFFF FFFF FFFF and the value in the b10 window will be -1. If the unsigned integer data type is selected the value in the b16 window will remain unchanged and the value in the b10 window will change to 18446744073709551615.


When the floating-point data type is selected values can also be entered in hexadecimal or decimal mode. When entering values in floating-point hexadecimal mode they are treated as though they are left justified. For example if 3FF is entered in the b16 window, it is set to 3FF0 0000 0000 0000 internally before being converted to decimal, yielding a value of 1 in the b10 window. In floating-point decimal mode values in the b10 window are limited to 20 characters. For large numbers use the exponent key (Exp).


An undo (UNDO) key is provided to undo an operation, a change in data type or clear key press. An operation which operates on two values (such as +) is added to the undo buffer when the operation is performed. For example if 4 + 3 = is pressed 7 will be displayed. Pressing the undo key changes the value back to 4. When the data type is changed the current value is stored in the undo buffer before the data type is changed. This can be useful since changing the data type can result in an error or loss of data. For example in signed integer decimal mode and the value in the b10 window is -1 changing the data type to unsigned integer will result in a underflow error. Pressing the undo key will change the data type back to signed integer and restore the b10 window to -1. Another common situation is when changing from floating-point decimal mode to an integer data type. Since the decimal digits (digits after the decimal point) will be lost when changing to an integer data type and this may not be the intended result, pressing the undo key will change the data type back to floating-point and restore the value in the b10 window. When the clear key is pressed, the value in the text windows are added to the undo buffer before the clear operation is performed. If the undo key is pressed after a clear key press, the text windows will be restored to their previous value. The undo buffer stores the last ten operations, data type changes or clear key presses.


To change the accent or background color, switch the orientation to landscape mode. Then slide your finger down along the virtual scroll wheel to pull the background and accent color menus into view. Press and release on the desired setting. The new setting will take effect when the press is released. The settings are saved on the device so that the next time the application is started the new settings will be used.


The help screen can be viewed from landscape mode by sliding your finger up along the virtual scroll wheel. The key functions are described and any notes for the application can be viewed here. At the bottom of the help screen the calculator version and support information is shown.