Converting numbers between modes
When you switch between modes, or recall a number from a memory register or the clipboard (paste), conversions are applied following these rules:
- When switching away from the Complex mode, the imaginary part of all stack registers are lost.
- When switching into a binary mode, the fractional part of all stack registers are lost.
- When selecting a smaller word size in binary modes (to 16 or 8 bits), the most significant bits of all stack registers are lost.
- The binary numbers are always treated as signed 2’s complement, so for example the value (hex)
FF will translate into -1 when 8-bit word size is selected, otherwise
255.
- When you switch into one of the binary modes (from Decimal or Complex), the values of all stack registers must normally fit into the current word size. If any value is too large (e.g. 200 when 8 bit operation is selected), the switch will not be allowed. You can adjust this setting with
Binary overflow as zero in the Configuration Dialog.
- When a memory register containing a Decimal, Complex or Fractional number is recalled to the
X register in a binary mode, the value must always fit into the current word size, otherwise the recall operation is not performed. The fractional and imaginary parts are lost.
- When a memory register containing a binary number is recalled to the X register in a binary mode, the high-order bits are lost if the current word size is too small.
- A number pasted from the clipboard in binary mode will always be truncated as appropriate, i.e., a fractional part as well as high-order bits are chopped off if needed.