DreamCalc Logo DreamCalctm
DreamCalc Scientific Graphing Calculator
Math for Business, Science, Engineering & Education
Store   Download   Support   Tutorials   User Guide  
News   Features   Screenshots   Academia   Partners   About  
User Guide:   Contents Page   Index of Functions  

User Guide

Base-N Calculations

Twitter Youtube

Software version: 5.0.4

Base-N Calculations

In DreamCalc, base-N calculations are performed in one of three modes, as follows.

  • 32 Bit 2s Complement Integer
    Integer values only of 4 bytes or less.
  • 64 Bit 2s Complement Integer
    Integer values only of 8 bytes or less.
  • Floating Point Base-N Mode
    Floating point values with 8 byte mantissa & independent sign.

These are distinct from the "Normal Math" mode, even if you set the radix to be decimal. When base-N is enabled, you have the option of selecting the radix and performing LOGIC calculations. You also have the ability to perform mathematical calculations, but you should be aware of base-N range restrictions and integer rounding.

To change the base-N mode, use the Modes→Base-N Modes main menu. Alternatively, use the calculator's [MODE] key.

Setting the Radix

In all base-N modes, you may set the radix to any value between 2 and 16. You'll find you can set commonly used bases, such as decimal, hexadecimal, octal and binary, from the keypad at the touch of a button. Changing the radix does not reset the display — the display value is simply converted. For bases higher than 10, use the keys marked A - F as digits. Additional radix settings can be found under the Modes→Base-N→Other Radix menu, or may be set using the [MODE] key.

Digit Grouping & Padding

You may set digit grouping every four characters for bases which align to byte boundaries, as follows:

  • Binary - nibble grouping
  • Quadrary - byte grouping
  • Hexadecimal - word grouping

For all other bases, digits are not grouped, except decimal which will group in thousands as in Normal Math mode. Digit grouping is enabled by default.

You can also enable or disable zero padding of lead digits. When enabled, lead zeros will be displayed so as to indicate the position of every available digit. Leading zeros are not shown in the decimal radix. This setting is disabled by default.

Both these settings are available from the Numeric Screen page of the Options Window or by using [MODE] key in base-n mode.

Base-N Arithmetic

Integer 2s Complement

In integer 2s complement arithmetic, negative numbers are represented as the value that, when added to a positive number of the same magnitude, equals zero. A negative value is formed by complementing each binary bit of the positive number, and then adding 1. For negative values, the most significant bit (MSB) is always 1. This arithmetic is commonly used by computers when dealing with integers.

In decimal, the minus sign character is used to indicate negative values, but in all other bases it is not shown.

Here is an example in the 32 bit integer mode for hexadecimal radix:

1
[-]
2
[ENTER]
Displays: FFFF FFFF

Converting this value to decimal will show -1.

Hint: In the Numeric Screen page of the Options Window, you will find an option to show negative values in red. This setting will highlight negative 2s complement values.

Floating Point

In floating point base-N mode, 2s complement arithmetic is not used and the sign is held independently. Thus, there are 64 bits of precision plus one extra sign flag. In this mode, the decimal value -1 will be shown as -0x1 when converted to hexadecimal.

The permissible numerical range in floating point base-n mode is +/-18446744073709551615. In the decimal radix, therefore, a maximum of 20 digits is allowed where necessary, but often DreamCalc will present results using only 18 decimal digits. This behavior is normal and ensures accuracy of +/-1 of the last digit. Similarly, rounding is done in other radix as applicable.

See also: Integer & Logic Functions

Privacy & Cookies
W3C HTML    W3C CSS
Home   Download   Store   User Guide   Tutorials   Academia   Partners   About  
Copyright © Big Angry Dog 2023. All rights reserved.