Zoned

The integer is converted using each digit. Each digit is stored binary using 4 bits (1 nibble). ZonedDecimal uses 8 bits (1 byte) or 2 nibbles.

The leading 4 bits (leading nibble) contain the sign: 1111 (F) for unsigned digit, 1100 (C) for a positive and 1101 (D) for a negative one.

The sign of the integer is only stored in the last digit.

1234 (unsigned) results into xF1F2F3F4. +1234 (signed) results into xF1F2F3C4. -1234 (signed) results into xF1F2F3D4.

The hex value is stored in EBCDIC (IBM-1047).

Properties

Link copied to clipboard
Link copied to clipboard