Java Reference
In-Depth Information
all data must be brought into main memory before a program can manipulate it. When
the computer is turned off, everything in main memory is lost.
Main memory is an ordered sequence of cells, called memory cells. Each cell has a unique
location in main memory, called the address of the cell. These addresses help you access
the information stored in the cell. Figure 1-1(b) shows main memory with some data.
Today's computers come with main memory consisting of millions to billions of cells.
Although Figure 1-1(b) shows data stored in cells, the content of a cell can be either a
programming instruction or data. Moreover, this figure shows the data as numbers and
letters. However, as explained later in this chapter, main memory stores everything as
sequences of 0 sand 1 s. The memory addresses are also expressed as sequences of 0 sand 1 s.
1
SECONDARY STORAGE
Because programs and data must be stored in main memory before processing, and
because everything in main memory is lost when the computer is turned off, information
stored in main memory must be transferred to some other device for longer-term storage.
A device that stores longer-term information (unless the device becomes unusable or you
change the information by rewriting it) is called secondary storage. To be able to
transfer information from main memory to secondary storage, these components must be
connected directly to each other. Examples of secondary storage are hard disks, floppy
disks, flash memory, ZIP disks, CD-ROMs, and tapes.
INPUT/OUTPUT DEVICES
For a computer to perform a useful task, it must be able to take in data and programs and
display the results of the manipulation of the data. The devices that feed data and
programs into computers are called input devices. The keyboard, mouse, and secondary
storage are examples of input devices. The devices that the computer uses to display and
store results are called output devices. A monitor, printer, and secondary storage are
examples of output devices. Figure 1-2 shows some input and output devices.
Input devices
Output devices
FIGURE 1-2 Some input and output devices
Search WWH ::




Custom Search