Introduction To Computing

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

CHAPTER 1

Introduction to Computing

CONTENTS
1.1 Computing Systems 2
1.2 Computer Organization 14
Exercises 20

I wish these calculations had been executed by steam.


CHARLES BABBAGE

One machine can do the work of fifty ordinary men. No machine can do the work
of one extraordinary man.
ELBERT HUBBARD

Where a computer like the ENIAC is equipped with 18,000 vacuum tubes and
weighs 30 tons, computers in the future may have only 1000 vacuum tubes and
weigh only 1-1/2 tons.
POPULAR MECHANICS MARCH 1949

640K ought to be enough for anyone.


BILL GATES 1981

So IBM has equipped all XTs with what it considers to be the minimum gear for a
serious personal computer. Now the 10-megabyte disk and the 128K of memory are
naturals for a serious machine.
PETER NORTON 1983

1
2    ◾   Programming in C++ for Engineering and Science

T he modern electronic computer is one of the most important products of the twen-
tieth century. It is an essential tool in many areas, including business, industry, govern-
ment, science, and education; indeed, it has touched nearly every aspect of our lives. The
impact of the twentieth-century information revolution brought about by the development of
high-speed computing systems has been nearly as widespread as the impact of the nineteenth-
century industrial revolution. In this chapter we begin with some background by describing
computing systems, their main components, and how information is stored in them.
Early computers were very difficult to program. In fact, programming some of the earli-
est computers consisted of designing and building circuits to carry out the computations
required to solve each new problem. Later, computer instructions could be coded in a lan-
guage that the machine could understand. But these codes were very cryptic, and pro-
gramming was therefore very tedious and error prone. Computers would not have gained
widespread use if it had not been for the development of high-level programming lan-
guages that made it possible to enter instructions using an English-like syntax.
Fortran, C, C++, Java, and Python are some of the languages that are used extensively in
engineering and scientific applications. This text will focus on C++ but will also describe
some properties of its parent language, C, noting features that these two languages have in
common, as well as their differences.

1.1 COMPUTING SYSTEMS


Four important concepts have shaped the history of computing:

1. The mechanization of arithmetic


2. The stored program
3. The graphical user interface
4. The computer network

This section briefly describes a few of the important events and devices that have imple-
mented these concepts. Additional information can be found on the website for this book
described in the preface.

1.1.1 Machines to Do Arithmetic


One of the earliest “personal calculators” was the abacus (Figure 1.1a), with movable beads
strung on rods to count and to do calculations. Although its exact origin is unknown, the
abacus was used by the Chinese perhaps 3000 to 4000 years ago and is still used today
throughout Asia. Early merchants used the abacus in trading transactions. The ancient
British stone monument Stonehenge (Figure  1.1b), located near Salisbury, England, was
built between 1900 and 1600 BC and, evidently, was used to predict the changes of the
seasons. In the twelfth century, a Persian teacher of mathematics in Baghdad, Muhammad
ibn-Musa al-Khowarizm, developed some of the first step-by-step procedures for doing
computations. The word algorithm, used for such procedures, is derived from his name.
Introduction to Computing    ◾   3 

(a)

(b)

(c)

FIGURE 1.1 (a) Abacus. (Image courtesy of the Computer History Museum.) (b) Stonehenge.
(c) Slide rule.
4    ◾   Programming in C++ for Engineering and Science

The English mathematician William Oughtred invented a circular slide rule in the early
1600s, and more modern ones (Figure 1.1c) were used by engineers and scientists through
the 1950s and into the 1960s to do rapid approximate computations.
In 1642, the young French mathematician Blaise Pascal invented one of the first mechan-
ical adding machines to help his father with calculating taxes. This Pascaline (Figure 1.2a)
was a digital calculator because it represented numerical information as discrete digits, as
opposed to a graduated scale like that used in analog instruments of measurement such
as slide rules and nondigital thermometers. Each digit was represented by a gear that
had 10 different positions (a ten-state device) so that it could “count” from 0 through 9
and, upon reaching 10, would reset to 0 and advance the gear in the next column so as to
represent the action of “carrying” to the next digit. In 1673, the German mathematician
Gottfried Wilhelm von Leibniz invented an improved mechanical calculator (Figure 1.2b)
that also used a system of gears and dials to do calculations. However, it was more reliable
and accurate than the Pascaline and could perform all four of the basic arithmetic opera-
tions of addition, subtraction, multiplication, and division. A number of other mechanical
calculators followed that further refined Pascal’s and Leibniz’s designs, and by the end of
the nineteenth century, these calculators had become important tools in science, business,
and commerce.

1.1.2 The Stored Program Concept


The fundamental idea that distinguishes computers from calculators is the concept of a
stored program that controls the computation. A program is a sequence of instructions
that the computer follows to solve some problem. An income tax form is a good analogy.
Although a calculator can be a useful tool in the process, computing taxes involves much
more than arithmetic. To produce the correct result, one must execute the form’s precise
sequence of steps of writing numbers down (storage), looking numbers up (retrieval), and
computation to produce the correct result.
The stored program concept also gives the computer its amazing versatility. Unlike most
other machines, which are engineered to mechanize a single task, a computer can be pro-
grammed to perform many different tasks. Although its hardware is designed for a very
specific task—the mechanization of arithmetic—computer software programs enable the
computer to perform a wide variety of tasks, from navigational control of the space shuttle
to word processing to musical composition.

(a) (b)

FIGURE 1.2 (a) Pascaline. (b) Leibnitz’s calculator. (Images courtesy of the Computer History
Museum.)
Introduction to Computing    ◾   5 

The Jacquard loom (Figure  1.3a), invented in 1801 by the Frenchman Joseph Marie
Jacquard, is an early example of a stored program automatically controlling a hardware
device. Holes punched in metal cards directed the action of this loom: a hole punched in
one of the cards would enable its corresponding thread to come through and be incorpo-
rated into the weave at a given point in the process; the absence of a hole would exclude
an undesired thread. To change to a different weaving pattern, the operator of this loom
would simply switch to another set of cards. Jacquard’s loom is thus one of the first exam-
ples of a programmable machine, and many later computers would make similar use of
punched cards.

(a) (b)

(c)

FIGURE 1.3 (a) Jacquard Loom. (Image courtesy of the Computer History Museum.) (b) Charles
Babbage. (c) Difference Engine.

You might also like