Computers and Computing^1
Computers are intelligent devices that mimic human behavior with respect
to remembering data and events, processing information, and making logical
decisions. Information is stored, recalled, manipulated, and combined in their
circuitry to achieve a desired effect.
To properly understand the design and master the implementation of
the C++ programming language, it is necessary to have a general familiarity
with the basic computer components and their function, and recognize how
instructions are translated into machine language code.
1.1 Hardwareandsoftware........................
Physical components including wires, electronics, circuits, cards, boards, and
various peripheral devices are classified ashardware. Permanent information is
stored in permanent recordable media such as hard disk drives (HDD), com-
monly called hard drives (HD), compact disks with read-only memory (CD-
ROM), and digital versatile discs (DVD). Old-timers fondly recall the era of
tapes and floppy disks.
CPU
The centerpiece of computer hardware is the central processor housed in
the motherboard. The main component of the processor is a microchip fabri-
cated as a compact integrated circuit, called the central processing unit (CPU)
or the microprocessor. A modern CPU contains over fifty million transistors.
Its function is to perform numerical computations and make logical decisions,
collectively called operations. The control unit (CU) of the CPU interprets and
prioritizes instructions, and the arithmetic logic unit (ALU) executes instruc-
tions.
A microprocessor can be rated in terms of its clock frequency or clock rate,
which is the frequency of an internal vibrating crystal expressed in number of
cycles per second (Hertz, abbreviated as Hz). Today’s microprocessors vibrate
at a few GHz, that is, a few trillion cycles per second. The clock rate is the