Previous Topic Next topic Print topic


Computer Memory Natural Boundaries

The fundamental natural boundaries of a modern computer's memory are usually based on an eight-bit character, known as a byte. Within this fundamental framework, machines fall into two broad categories; those with no other natural boundaries, called here byte-storage computers, and those with other natural boundaries based upon multiples of the fundamental boundary of the byte, called here word-storage computers.

In byte-storage mode, COBOL assigns numeric storage so that each numeric item occupies the minimum number of bytes (see the section Selection Of Character Representation And Radix); the SYNCHRONIZED clause has no meaning in the context and hence has no effect.

Within word-storage computers, natural boundaries can occur at 2-byte, 4-byte and/or 8-byte boundaries. The COBOL language can provide such data item storage-assignment and synchronization when the COMPUTATIONAL clause and possibly the SYNCHRONIZED clause are used. This word-storage assignment of COMPUTATIONAL format data is controlled by the Compiler directive IBMCOMP.

Table 1. COMP(UTATIONAL) Format Data Item Character-Position (Byte) Storage Assignment
Number of Digits (9s) in PICTURE Representation Number of Characters (Bytes) of Storage Assigned
Signed Unsigned Byte-Storage Mode Word-Storage Mode
1-2 1-2 1 2
3-4 3-4 2 2
5-6 5-7 3 4
7-9 8-9 4 4
10-11 10-12 5 8
12-14 13-14 6 8
15-16 15-16 7 8
17-18 17-19 8 8
19-21 20-21 9 16
22-23 22-24 10 16
24-26 25-26 11 16
27-28 27-28 12 16
29-31 29-31 13 16
32-33 23-33 14 16
34-35 34-36 15 16
36-38 37-38 16 16
Previous Topic Next topic Print topic