Elements of a Computer System
A computer is an electronic device capable of performing commands. The basic commands
that a computer performs are input (get data), output (display result), storage, and performance
of arithmetic and logical operations.
In today’s market, personal computers are sold with descriptions such as a Pentium 4
Processor 2.80 GHz, 1 GB RAM, 250 GB HD, VX750 19″ Silver Flat CRT Color
Monitor, preloaded with software such as an operating system, games, encyclopedias, and
application software such as word processors or money management programs. These
descriptions represent two categories: hardware and software. Items such as ‘‘Pentium 4
Elements of a Computer System | 3
Processor 2.80 GHz, 1GB RAM, 250 GB HD, VX750 19″ Silver Flat CRT Color Monitor’’
fall into the hardware category; items such as ‘‘operating system, games, encyclopedias, and
application software’’ fall into the software category. Let’s consider the hardware first.
Major hardware components include the central processing unit (CPU); main memory
(MM), also called random access memory (RAM); input/output devices; and secondary
storage. Some examples of input devices are the keyboard, mouse, and secondary storage.
Examples of output devices are the screen, printer, and secondary storage. Let’s look at
each of these components in greater detail.
Central Processing Unit and Main Memory
The central processing unit is the ‘‘brain’’ of the computer and the single most expensive
piece of hardware in a computer. The more powerful the CPU, the faster the computer.
Arithmetic and logical operations are carried out inside the CPU. Figure 1-1(a) shows some
Main memory, or random access memory, is connected directly to the CPU. All
programs must be loaded into main memory before they can be executed. Similarly, 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.
FIGURE 1-1 Hardware components of a computer and main memory
4 | Chapter 1: An Overview of Computers and Programming Languages
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 0s and 1s. The memory addresses are also expressed as sequences of 0s and 1s.
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 permanent storage.
The device that stores information permanently (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 directly connected to each other. Examples of secondary storage are hard disks, flash
drives, floppy disks, 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 calculations. 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 results are called output
devices. A monitor, printer, and secondary storage are examples of output devices.
Input devices Output devices
Elements of a Computer System
Software are programs written to perform specific tasks. For example, word processors
are programs that you use to write letters, papers, and even books. All software is written
in programming languages. There are two types of programs: system programs and
System programs control the computer. The system program that loads first when you
turn on your PC is called the operating system. Without an operating system, the
computer is useless. The operating system monitors the overall activity of the computer
and provides services. Some of these services include memory management, input/output
activities, and storage management. The operating system has a special program that
organizes secondary storage so that you can conveniently access information.
Application programs perform a specific task. Word processors, spreadsheets, and
games are examples of application programs. The operating system is the program that
runs application programs.