Transcript Document
FOUNDATIONS OF
COMPUTER SCIENCE
From Data Manipulation to Theory of
Computation
主讲:李艳
云南农业大学
Computers
and Data
Computer
Hardware
Book
organization
Computer
Software
Data
Organization
Advanced
Topics
Chapter 1: Introduction
Chapter 2: Data Representation
Chapter 3: Number Representation
Chapter 4: Operations on Bits
Chapter 5: Computer Organization
Chapter 6: Computer Network
Chapter 7: Operating Systems
Chapter 8: Algorithms
Chapter 9: Programming Languages
Chapter 10: Software Engineering
Chapter 11: Data Structures
Chapter 12: Abstract Data Types
Chapter 13: File Structures
Chapter 14: Databases
Chapter 15: Data compression
Chapter 16: Security
Chapter 17: Theory of Computation
计算机导论
Chapter 1
Introduction
1.1 THE COMPUTER AS A BLACK BOX
DATA PROCESSOR
You can think of a computer as a data processor. Using
this definition, a computer acts as a black box that accepts
input data, processes the data, and creates output data.
Although this model can define the functionality of a
computer today, it is too general.
It is not clear how many types or sets of operations a
machine based on this model can perform.
计算机导论
PROGRAMMABLE DATA PROCESSOR
This model adds one extra element to the computer: the
program. A program is a set of instructions written in a
computer language that tells the computer what to do with
data.
In the new model, the output data depend on the
combination of two factors: the input data and the program.
计算机导论
Same program, different input data
计算机导论
Same input
data,
different
programs
计算机导论
1.2 VON NEUMANN MODEL
Every computer today is based on the von Neumann model.
It is based on three ideas.
FOUR SUBSYSTEMS
The model defines a computer as four subsystems: memory,
arithmetic logic unit, control unit, and input/output.
计算机导论
• Memory
Memory is the storage area. It is where programs and data
are stored during processing.
• Arithmetic Logic Unit (ALU)
The ALU is where calculation and logical operations take
place.
• Control Unit
The control unit controls the operations of the memory,
ALU, and the input/output subsystem.
• Input/Output
The input subsystem accepts input data and the program
from outside the computer; the output subsystem sends
the result of processing to the outside.
计算机导论
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 were
stored in memory.
Both the data and programs should have the same format
because they are stored in memory. They are, in fact,
stored as binary patterns (a sequence of 0s and 1s ) in
memory.
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, interprets it, and then
executes it.
计算机导论
1.5 COMPUTER SOFTWARE
PROGRAMS MUST BE STORED
A SQUENCE OF INSTRUCTIONS
Another requirement of the model is that the program must
be a sequence of instructions. Each instruction operates on
one or more data items.
计算机导论
ALGORITHMS
The step-by-step solution is called an algorithm.
LANGUAGES
A computer language has a more limited number of symbols
and also a limited of words .
SOFTWARE ENGINEERING
Software engineering is the design and writing of structured
programs. Today, it is not acceptable just to write a program
that does a task; the program must follow strict principles and
rules.
OPERATING SYSTEMS
An operating system originally worked as a manager to
facilitate access of the computer components for a program.
Today, operating systems do much more.
计算机导论
1.6 HISTORY
MECHANICAL MACHINES (BEFORE 1930)
BIRTH OF ELECTRONIC COMPUTERS (1930-1950)
• Early Electronic Computers
The early computers of this period did not store the
program in memory; all were programmed externally.
The first general-purpose, totally electronic computer was
made by John Mauchly and J.Presper Eckert and was
called ENIAC (Electronic Numerical Integrator and
Calculator). It was completed in 1946.
• Computers Based on the von Neumann Model
The first computer based on von Neumann’s idea was
made in 1950 at the University of Pennsylvania and was
called EDVAC (Electronic Discrete Variable Automatic
Computer).
计算机导论
COMPUTER GENERATIONS (1950-PRESENT)
Computer built after 1950 are following, more or less, the
von Neumann model. The computers has become faster,
smaller, and cheaper, but the principle is almost the same.
Each generation witnesses some major change in
hardware or software (but not the model).
• First Generation (roughly 1950-1959)
The first generation is characterized by the emergence of
commercial computers. Computers were bulky and used
vacuum tubes as electric switches.
计算机导论
• Second Generation (roughly 1959-1965)
Second-generation computers used transistors instead of
vacuum tubes. This reduced the size of computers as well as
their cost. Two high-level programming languages,
FORTRAN and COBOL , were invented and made
programming easier.
• Third Generation (roughly 1965 -1975 )
The invention of integrated circuit (transistors, wiring, and
other components on a single chip) reduced the cost and
size of computers even further. Minicomputers appeared
on the market. Software industry was born.
计算机导论
• Fourth Generation (approximately 1975-1985)
The fourth generation saw the appearance of
microcomputers. Advances in the electronics industry
allowed whole computer subsystems to fit on a single
circuit board. This generation also saw the emergence of
computer networks.
• Fifth Generation (approximately 1985-NOW)
The fifth generation witnessed the appearance of laptop
and palmtop computers, improvements in secondary
storage media (CD-ROM, DVD, etc.), the use of
multimedia, and the phenomenon of virtual reality.
计算机导论
SUMMARY
Computer science, in this text, means issues
related to a computer.
A computer is a programmable data processor
that accepts input data and programs and outputs
data.
A program is a set of instructions executed
sequentially that tells the computer what to do with
data.
Every computer today is based on the von
Neumann model.
计算机导论
SUMMARY (continued)
The von Neumann model specifies a memory
subsystem, an arithmetic logic unit subsystem, a
control unit subsystem, and an input/output
subsystem.
Data and programs are stored in computer
memory.
A step-by-step solution to a problem is called an
algorithm.
A program is written in a computer language.
Software engineering is the design and writing of
programs in a structured form.
计算机导论
Thanks!
计算机导论