HP 3000 Manuals

External-Decimal Numbers [ Compiler Library/XL Reference Manual ] MPE/iX 5.0 Documentation


Compiler Library/XL Reference Manual

External-Decimal Numbers 

Figure 4-2 shows the format of external-decimal numbers.

[]
Figure 4-2. External-decimal Format External-decimal numbers have the following characteristics: * Each digit is expressed by eight bits. * An indication of the sign of the number is included in the representation of the low-order digit. * In storage, the low-order digit may be any byte of a 32-bit word. * Bytes to the left of the byte containing the high-order digit are not part of the number field and may have any contents, even though they may be part of the same 32-bit word. Likewise, bytes to the right of the byte containing the sign bits are not part of the field and may have any contents, even though they may be part of the same 32-bit word. Bytes that are outside of the field will not be accessed or modified. * Subsequent bytes to the left of the low-order digit (Figure 4-2) contain successively higher-order digits. * There are no unused bytes between the low-order digit and the high-order digit. * The length may be up to 28 digits. * The storage address is the address of the byte that contains the high-order digit. Table 4-1 shows the low-order digit for positive, negative, and unsigned numbers. The dollar sign ($) prefix indicates a hexadecimal number. Table 4-1. Low-Order Digits of External-Decimal Numbers -------------------------------------------------------------------------------------------- | | | | Low-Order Digit, | Low-Order Digit, | | Decimal Number | External-Decimal Number | | | | -------------------------------------------------------------------------------------------- | | | | | Unsigned Positive Negative | | | | -------------------------------------------------------------------------------------------- | | | | 0 | $30 $7b { $7d } | | | | | 1 | $31 $41 A $4a J | | | | | 2 | $32 $42 B $4b K | | | | | 3 | $33 $43 C $4c L | | | | | 4 | $34 $44 D $4d M | | | | | 5 | $35 $45 E $4e N | | | | | 6 | $36 $46 F $4f O | | | | | 7 | $37 $47 G $50 P | | | | | 8 | $38 $48 H $51 Q | | | | | 9 | $39 $49 I $52 R | | | | -------------------------------------------------------------------------------------------- In the table, the letters A through R, and the braces, are the ASCII equivalents of the hexadecimal numbers shown. Digits other than the low-order digit conform with the "Unsigned" column of Table 4-1.


MPE/iX 5.0 Documentation