Base-N and logic functions are listed in alphabetical order below. The calculator must be in a base-N mode to access these functions.
<< (Shift left)
Bitwise shift left where the MSB is lost. This is a postfix function which may be repeated as many times as
required. If the value represents a floating point value with a fractional part, it is first converted to 64
bit integer for the operation.
>> (Shift Right)
Bitwise shift right where the LSB is lost. This is a postfix function which may be repeated as many times as
required. If the value represents a floating point value with a fractional part, it is first converted to 64
bit integer for the operation.
AND
Performs a bitwise AND operation between two integer values. If either argument represents a floating point
value with a fractional part, it is first converted to 64 bit integer for the operation and any fractional
component will be lost.
BE⇔LE
Exchanges the byte order between Big Endian (network order) and Little Endian (Intel). Works with either 32
or 64 bit integers. If the value represents a floating point value with a fractional part, it is first
converted to 64 bit integer for the operation and any fractional component will be lost.
Example:
[HEX] 944
[BE⇔LE]
Displays: 4409 0000 (hex)
BE⇔LE acts as a toggle, and pressing it again reverses the operation.
BIN
Sets the radix to binary, converting the display value as required.
DEC
Sets the radix to decimal, converting the display value as required.
HEX
Sets the radix to hexadecimal, converting the display value as required.
KB
Displays the current value as a multiple of 1024 and shows an appropriate KB, MB, GB, TB indication.
Example:
[DEC]
34329232
[KB]
Displays: 32 MB
[KB]
Displays: 34329232 KB
This operation works in a similar way to the [ENG] key and may be pressed several times to adjust the
magnitude. The underlying numerical value remains unchanged. It may also be used in combination with
[SHIFT].
NOT
Performs a bitwise NOT operation on the input value. If the value represents a floating point value with a
fractional part, it is first converted to 64 bit integer for the operation and any fractional component will be
lost.
OCT
Sets the radix to octal, converting the display value as required.
OR
Performs a bitwise OR operation between two integer values. If either argument represents a floating point
value with a fractional part, it is first converted to 64 bit integer for the operation and any fractional
component will be lost.
REM
REM divides the first argument by the second, and returns the remainder.
Example:
[DEC]
13 [REM] 9
[ENTER]
Displays: 4
DreamCalc handles signed input according to the rules defined for the "%" operator in C99 and C++11.
The following examples illustrate this.
- 8 REM 7 = 1
- 8 REM -7 = 1
- -8 REM 7 = -1
- -8 REM -7 = -1
The MOD function is similar, but handles signed input differently.
XNOR
Performs a bitwise XNOR operation between two integer values. If either argument represents a floating point
value with a fractional part, it is first converted to 64 bit integer for the operation and any fractional
component will be lost.
XOR
Performs a bitwise XOR operation between two integer values. If either argument represents a floating point
value with a fractional part, it is first converted to 64 bit integer for the operation and any fractional
component will be lost.
See also: Base-N Calculations
|