boundaries, rather the boundaries are determined by the individual programs being used.">
DATA STORAGE CONCEPTS
You learned in chapter 2 that a computer's primary storage area is divided into four areas, each serving a specific purpose. The input storage area accepts and holds input data to be processed. The working storage area holds intermediate processing results. The output storage area holds the final processing results. The program storage area holds the processing instructions (the program). You also learned that these separate areas do not have built-in physical boundaries, rather the boundaries are determined by the individual programs being used.
You also may recall in chapter 2, we talked about the different types of primary storage used in computers and how they differ from one another. Some were magnetic in nature, such as magnetic core storage; others were electronic, such as semiconductor and bubble storage. For purposes of simplicity, we have selected magnetic core storage to show you how data is represented and stored in the computer's primary memory.
BITS AND BYTES
A bit is a single binary digit. It represents the smallest unit of data just like the good old American penny). However, computers usually do not operate on single bits, rather they store and manipulate a fixed number of bits. Most often, the smallest unit or number of bits a computer works with is eight bits. These eight bits make up a byte. You just learned that both EBCDIC and ASCII codes use eight bits (excluding the parity bit), and that eight bits represent a single character, such as the letter A or the number 7. Thus, the computer can store and manipulate an individual byte (a single character) or a group of bytes (several characters, a word) at a time. These individual bytes, or groups of bytes, form the basic unit of memory.
Primary storage capacities are usually specified in number of bytes. The symbol "K" is used whenever we refer to the size of memory, especially when the memory is quite large.The symbol K is equal to 1,024 units or positions of storage. Therefore, if a computer has 512K bytes (not bits) of primary storage, then it can hold 512 X 1,024 or 524,288 characters (bytes) of data in its memory.
MAGNETIC CORE STORAGE
In primary storage, many magnetic cores are strung together on a screen of wire to form what is called a core plane (fig. 4-8, view A). As you may know, each core can store one binary bit (0 or 1) of data. A core is magnetized by current flowing through the wires on which the core is strung. Hence, a core magnetized in one direction represents a binary 0, and when magnetized in the opposite direction, a binary 1. It is the direction that the core is magnetized that determines whether it contains a binary 0 or a binary 1 (refer to fig. 4-8, view B). These core planes look very much like small window screens and are arranged vertically to represent data as shown in figure 4-8, view C. In looking at this figure, you will notice that nine planes are needed to code in 8-bit EBCDIC. The ninth plane provides for a parity (check) bit. Figure 4-8, view C, shows DP-3 in EBCDIC code, even parity.
Figure 4-8A. - Core storage with DP-3 represented using 8-bit EBCD1C code.
Figure 4-8B. - Core storage with DP-3 represented using 8-bit EBCD1C code.
Figure 4-8C. - Core storage with DP-3 represented using 8-bit EBCD1C code.
STORAGE CAPACITY AND ADDRESSES
The storage capacity of an address is designed and built into the computer by the manufacturer. Over the years several different design approaches to partition primary storage have been used. With this in mind, let's take a look at some of the ways primary storage is partitioned into addresses.
One way to design or organize the primary storage section is to store a fixed number of characters (bytes) at each address location. We can then reference these characters as a single entity called a word, as illustrated in figure 4-9, view A. The name CHARLIE (address location 400) or the amount he is paid, in this case
$69.00 (address location 401), are each treated as a single word. Computers that are built to retrieve, manipulate, and store a fixed number of characters in each address are said to be word-oriented, word-addressable machines, or fixed-word-length computers.
Figure 4-9A. - Fixed-word-length vs variable-word-length storage.
FIXED-LENGTH WORDS, CONTAINING EIGHT CHARACTERS EACH, OCCUPYING TWO ADDRESS LOCATIONS (WORD ADDRESSABLE).
Another way to design the primary storage section is to store a single character, such as the letter L or the number 8, in each address location. An address is assigned to each location in storage. Computers designed in this way are said to be character-oriented or character addressable. We also call them variable-word-length computers. Therefore, the name CHARLIE (fig. 4-9 , view B) now requires seven address locations (300 through 306), while amount paid ($69.00) occupies six address locations (307 through 312).
Figure 4-9B. - Fixed-word-length vs variable-word-length storage. VARIABLE-LENGTH WORDS (CHARACTER ADDRESSABLE)
Whether a computer addresses a group of bytes as a word or addresses each byte individually is a function of the circuitry. Both designs have advantages and disadvantages. Variable-word-length computers make the most efficient use of available storage space, since a character can be placed in every storage location. In a fixed-word-length computer, storage space may be wasted. For example, if the storage capacity in each address of a fixed-word-length computer is eight bytes, and some of the data elements to be stored contain only three or four characters, then many of the storage positions in each word are not being used.
Fixed-word-length computers have faster calculating speeds. They can add two data words in a single operation. This is not so with character-addressable computers. Here, only one digit (byte) in each number can be added during a single machine operation. Thus, eight steps are required to complete the calculation.
The larger mainframe computers (super-computers like the CRAY-1 and CYBER 205) use only fixed-word-length storage. Most microcomputers use the variable-word-length approach allowing them to operate on one character at a time. Somewhere in between these two extremes are the dozens of existing minicomputer and mainframe models that have what is called built-in flexibility.
These flexible computers are byte-oriented but can operate in either a fixed- or variable-word-length mode through the use of proper program instructions. Let's take a look at how these flexible computers operate in a variable- and fixed-word-length environment.
Working in a variable-word-length environment, each address holds one alphanumeric character as shown in figure 4-9, view B.Since a byte usually represents a single alphanumeric character, unless you are using packed decimal, a flexible computer is often said to be byte-addressable. Don't become confused; the terms character-addressable, character-oriented, and byte-addressable all have the same meaning. By using the appropriate program instructions, a programmer can retrieve a stored data element by identifying the address of the first character (say position 300 as in fig. 4-9, view B) and specifying the number of address locations to be included in the word. In this case there are seven, positions 300 through 306.
When a flexible computer is working in a fixed-word-length environment, each address identifies a group of bytes that can be operated on as a unit. This processing method helps to achieve faster calculating speeds. A programmer can use program instructions to cause the computer to automatically retrieve, manipulate, and store, as a unit, a fixed word of say, two, four, or eight bytes of data in one machine operation by identifying the address of the first character of data. At the same time all remaining bytes are acted upon as a unit moving from left to right. Figure 4-10 illustrates the different word lengths possible with many byte-addressable computers. They are half-word (2 bytes), full-word (4 bytes), and double-word (8 bytes).
Figure 4-10. - Word lengths used on flexible byte-addressable computers.
By now, you should have a good idea of how primary storage locations are identified by their storage addresses, how these addressable storage locations are used, and how the storage capacity at an address can vary depending on the design of the computer.
Now, let's go one step further, to see how these bits and bytes are represented (coded) on some of the more common secondary storage media.
SECONDARY STORAGE DATA ORGANIZATION
Remember, secondary storage devices (also called auxiliary or mass storage devices) are those devices which are not part of the central processing unit (cpu). They include: external core; semiconductor, thin film, and bubble memories; punched cards; paper tape; and several different types of mass storage, such as magnetic tape, disk, and drum.
You already know it takes a certain number of bits to make one byte (normally eight), and when bytes are grouped together at a single address they make up a word in the computer's memory. When data is recorded on some type of magnetic storage medium, such as disk or tape, it is normally organized by bits, characters (bytes), fields, records, and files (fig. 4-11). The following definitions should help you understand the relationship between bits, characters, bytes, words, fields, records, and files.
Figure 4-11. - Data organization.
BIT - The smallest unit of data; it represents one binary digit (0 or 1).
CHARACTER (BYTE) - A group of related bits (usually eight) that make up a single character-letter, number, or special character.
WORD - A group of related bytes that are treated as a single addressable unit or entity in memory.
FIELD - One or more related characters that are treated as a unit of information. A field (also referred to as a data item) may be alphabetic, numeric, or alphanumeric, and may be either fixed or variable in length. For example, your social security number (SSN) is of a fixed length; that is, it's always 9 positions in length. Whereas, names are variable length because they may be from 2 to 25 positions in length.
RECORD - A group of related fields, all pertaining to the same subject; a person, a thing, or an event. For example, your payroll record (LES statement) might include fields for your name, amount paid, taxes withheld, earned leave, and any allotments you might have. On the other hand, a supply inventory record might consist of fields containing stock number, the name of the item, its unit price, the quantity on hand, and its bin location.
FILE - A collection of related records, such as the payroll or supply inventory records. Normally, all records within the file are in the same format.
When processing data, we think in terms of data files. For example, to process a parts inventory, you would need the master parts inventory file and the file that contains up-to-date information on each part that has been issued. The master parts inventory file would have a record for every part in the inventory. The update file, parts issued file, would have a record for each part issued. You would use a program to read the records on the parts issued file and update the matching records on the master parts inventory file. Depending on whether the data is stored on magnetic tape or disk or in internal storage, the program would use different methods to access storage to obtain the data. In the next section you'll learn about storage access methods.
Q.15 What area in the computer's primary storage area holds the processing instructions
Integrated Publishing, Inc.
6230 Stone Rd, Unit Q Port Richey, FL 34668
Phone For Parts Inquiries: (727) 493-0744