Welcome To COS151!
Welcome To COS151!
to COS151!
1.1
CHAPTER 1
Introduction
1.2
Objectives
After studying this chapter, the student should be able to:
Define the Turing model of a computer.
1.3
Understanding Computer Systems
Computer system
Combination of all the components required
to process and store data using a computer
Hardware
Equipment associated with a computer
Software
Computer instructions
Tell the hardware what to do
Programs
Instructions written by programmers
1.4
Understanding Computer Systems
(continued)
Programming
Writing software instructions
Computer hardware and software accomplish three
major operations
Input
Data items such as text, numbers, images, and sound
Processing
Calculations and comparisons performed by the central
1.5
1‐1 TURING MODEL
1.6
1‐1 TURING MODEL
Alan Turing
1.7 (1912 – 1954)
1.1.1 Data processors
• Before discussing the Turing model, let us define a
computer as a data processor.
• A computer acts as a black box
• that accepts input data,
• processes the data, and
• creates output data (Figure 1.1).
• Although this model can define the functionality of a
computer today, it is too general.
1.8
1.1.2 Programmable data processors
• The Turing model is a better model for a general-
purpose computer.
• This model adds an extra element to the specific
computing machine: the program.
• A program is a set of instructions that tells the computer
what to do with data. Figure 1.2 shows the Turing model.
Figure 1.2 A computer based on the Turing model
1.9
Figure 1.3 The same program, different data
1.10
Figure 1.4 The same data, different programs
1.11
1.1.3 The universal Turing machine
• First description of a modern computer:
• A machine that can do any computation if the
appropriate program is provided
• Can be proved that a very powerful computer and a
Turing machine can compute the same thing given
appropriate data and an appropriate program
• A universal Turing machine can compute anything
that is computable!
1.12
1‐2 VON NEUMANN MODEL
• A universal Turing machine stores data in memory
• Early programming using switches & wiring
• Around 1944 – 1945, John von Neumann proposed
the following:
• Programs and data are logically the same
• Programs and data should be stored in memory
• Programs and data are stored in the same format
(binary patterns of 0s and 1s in memory)
• Sequential instruction execution (fetch-decode-
execute cycle)
1.13
1.2.1 Four subsystems
• Computers built on the von Neumann model divide the
computer hardware into four subsystems: memory,
arithmetic logic unit, control unit, and input/output
(Figure 1.5).
1.14
1.2.2 The stored program concept
• The von Neumann model states that the program must be
stored in memory.
• This is totally different from the architecture of early
computers in which only the data was stored in memory:
the programs for their task were implemented by
manipulating set of switches/changing the wiring system.
• The memory of modern computers hosts both a program
and its corresponding data.
• This implies that both the data and programs should have
the same format, because they are stored in memory.
• In fact, they are stored as binary patterns in memory—a
sequence of 0s and 1s.
1.15
1.2.3 Sequential execution of instructions
• A program in the von Neumann model is made of a finite
number of instructions.
• In this model, the control unit fetches one instruction
from memory, decodes it, then executes it.
• Instructions are executed one after another.
• Of course, one instruction may request the control unit to
jump to some previous or following instruction, but this
does not mean that the instructions are not executed
sequentially.
• Sequential execution of a program was the initial
requirement of a computer based on von Neumann model
• Today’s computers execute programs in the order that is
the most efficient.
1.16
1‐3 COMPUTER COMPONENTS
• We can think of a computer as being made up of three
components:
• computer hardware,
• data, and
• computer software.
1.17
1.3.1 Computer hardware
• Computer hardware today has four components under the
von Neumann model, although we can have different
types of memory, different types of input/output
subsystems, and so on.
• We discuss computer hardware in more detail in Chapter
5.
1.3.2 Data
• The von Neumann model clearly defines a computer as a
data processing machine that accepts the input data,
processes it, and outputs the result.
1.18
1.3.3 Computer software
• The main feature of the Turing or von Neumann models
is the concept of the program.
• Although early computers did not store the program in
the computer’s memory, they did use the concept of
programs.
• Programming those early computers meant changing the
wiring systems or turning a set of switches on or off.
• Programming was therefore a task done by an operator or
engineer before the actual data processing began.
1.19
Figure 1.6 Program and data in memory
1.20
Figure 1.7 A program made of instructions
1.21
1‐4 HISTORY
• In this section we briefly review the history of
computing and computers.
• We divide this history into three periods:
• Mechanical machines (before 1930)
• Electronic computers (1930–1950)
• (Modern) Computer generations (1950–present)
1.22
1‐4 HISTORY
Mechanical machines (before 1930)
Several computing machines were invented that
bear little resemblance to modern computers
17th century, Blaise Pascal, a French
mathematician and philosopher, invented the
Pascaline
Late 17th century, Gottfried Leibniz, a German
mathematician, invented Leibniz’ Wheel
The first machine that used the idea of storage
and programming was the Jacquard loom,
invented by Joseph-Marie Jacquard at the
beginning of the 19th century
1.23
1‐4 HISTORY
A Pascaline (1652)
https://www.youtube.com/watch?v=uOcNkhooEoc
1‐4 HISTORY
Jacquard Loom
(Deutsches Technikmuseum, Berlin)
https://www.youtube.com/watch?v=OlJns3fPItE
1‐4 HISTORY
Mechanical machines (before 1930)
In 1823, Charles Babbage invented the
Difference Engine. Later, he invented the
Analytical Engine that parallels the idea of
modern computers.
In 1890, Herman Hollerith, working at the
US Census Bureau, designed & built a
programmable machine that could
automatically read, tally, and sort data
stored on punched cards
1‐4 HISTORY
Colossus Mark 2
1‐4 HISTORY
1.38
1‐6 OUTLINE OF THE COURSE
1.39