Data Representation

The processor represents data in the following modes:

  • Signed Numeric (SN)
  • Unsigned Numeric (UN)
  • Unsigned Alpha (UA)

Conversion between signed and unsigned 4-bit representation and 8-bit representation is accomplished automatically during the execution of instructions.

Signed Numeric (SN)

Data is interpreted in units of four bits (one digit). The sign is interpreted as a separate and leading 4-bit unit. The 4-bit code is interpreted by the arithmetic units as follows:

4-bit Code Digit Sign Code
0000 0 +
0001 1 +
0010 2 +
0011 3 +
0100 4 +
0101 5 +
0110 6 +
0111 7 +
1000 8 +
1001 9 +
1010 A (Undefined*) +
1011 B (Undefined*) +
1100 C (Undefined*) +
1101 D (Undefined*) -
1110 E (Undefined*) +
1111 F (Undefined*) +
Note: Undefined - The hexadecimal digits A through F are hereafter referred to as “undigits”. Use of undigits in an arithmetic operand, except for the sign digit, will cause an Invalid Arithmetic Data fault. See Compatibility Notes A.16.

When the result of an operation is signed, the sign-digit is stored as follows:

Sign Sign Digit
+ 1100 (C)
- 1101 (D)

When the sign digit is interpreted as plus, it compares as HIGH relative to a sign digit interpreted as MINUS.

In the examples that are given at the end of the description of many of the instructions, the plus symbol (+) is used to indicate a sign digit value of 0 through 9, A, B, C, E, or F. The symbol also is used to represent a plus sign value that can be stored within the processor. The letter C is used to indicate that the processor has written a plus sign into memory. The letter D is used to indicate the minus sign except that the minus symbol (-) is used to represent a minus sign value that can be stored within the processor.

Unsigned Numeric (UN)

Data is interpreted in units of four bits (one digit). Unsigned data fields are assumed to be positive.

Unsigned Alpha (UA)

Data is interpreted in units of eight bits (one byte or one character).

The internal representation of alpha data is in the Extended Binary Coded Decimal Interchange Code (EBCDIC).

Eight-bit data is considered unsigned except in the case of the MOVE ALPHANUMERIC, MOVE NUMERIC, and EDIT instructions. Additional details are given in the descriptions of these instructions.

Alphanumeric comparisons are binary and thus the low-to-high collating sequence for EBCDIC is symbols, alphas, and then numeric.

processor_state/data_representation.txt · Last modified: 2011/07/27 09:01 by scott
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki