Browse Prior Art Database

Zoned or Packed Decimal Operand Detector

IP.com Disclosure Number: IPCOM000078247D
Original Publication Date: 1972-Dec-01
Included in the Prior Art Database: 2005-Feb-25
Document File: 3 page(s) / 30K

Publishing Venue

IBM

Related People

Franklin, JW: AUTHOR

Abstract

In a data processing system, such as defined in the manual entitled "IBM System/370 Principles of Operation", form number GA22-7000-2, decimal instructions are provided for arithmetic, shifting, and editing operations on decimal data. At present, processing of this data requires knowledge of whether or not the operands in main storage are in the packed or zoned format, and further instructions are provided for converting operands from one format to the other. As defined in the above-mentioned manual, all decimal arithmetic is accomplished using operands in the packed format. Therefore, if decimal operands are initially in a zoned format, which is produced normally by source document input devices, this data must be converted to the packed format prior to any arithmetic operations.

This text was extracted from a PDF file.
At least one non-text object (such as an image or picture) has been suppressed.
This is the abbreviated version, containing approximately 52% of the total text.

Page 1 of 3

Zoned or Packed Decimal Operand Detector

In a data processing system, such as defined in the manual entitled "IBM System/370 Principles of Operation", form number GA22-7000-2, decimal instructions are provided for arithmetic, shifting, and editing operations on decimal data. At present, processing of this data requires knowledge of whether or not the operands in main storage are in the packed or zoned format, and further instructions are provided for converting operands from one format to the other. As defined in the above-mentioned manual, all decimal arithmetic is accomplished using operands in the packed format. Therefore, if decimal operands are initially in a zoned format, which is produced normally by source document input devices, this data must be converted to the packed format prior to any arithmetic operations.

The subject matter described discloses that utilization can be made of the difference between a zoned and packed decimal operand, to permit further manipulation of the data without prior knowledge of the format, and eliminate the need for converting from one to the other.

In the drawing, the two forms of decimal data are shown. On the left at 1 is shown a variable-length decimal operand in the zoned format, and at 2 is shown a decimal operand in the packed format. Decimal operands can be of a variable length, as specified in the instruction, and the length will indicate the number of 8-bit bytes or characters 3 to be included in the operand. Within each of the characters 3 are two 4-bit digits 4 and 5. The right-hand digit 4 in the zoned format is a binary-coded decimal (BCD) data digit (D), and the left-hand digit 5 will either be a zone code (Z), or a code representing the sign (S) of the operand. In the case of the packed format shown at 2, each of the digits within a character will be a BCD data digit (D) except for the lowest order or right-hand character, wherein the right-hand digit represents the sign (S) of the operand.

It should be noted that each of the leftmost digits of each character in the packed decimal format must be a valid BCD digit representing the decimal numbers 0 - 9. By providing a suitable detector 6 for examining the leftmost digit, the format of the decimal operand can be determined to be packed if the detector 6 recognizes a valid decimal digit. Alternatively, it is noted that the leftmost digit of each character in the zoned decimal format is an invalid BCD character and by providing a suitable detector 7 for inva...