Upload
ruth-barker
View
271
Download
9
Embed Size (px)
Citation preview
©Brooks/Cole, 2003
Foundations of Computer Science from Data Manipulation to Theory of Computation
Behrouz A. Forouzan, Brooks/Cole—Thomson Learning,
Pacific Grove, USA, 2003.
©Brooks/Cole, 2003
Understand the concept of a black box, a data processor, and Understand the concept of a black box, a data processor, and a programmable data processor.a programmable data processor.
Define the Define the von Neumannvon Neumann model and name its components: model and name its components: memory, arithmetic/logic unit, control unit, and input/output.memory, arithmetic/logic unit, control unit, and input/output.
Understand the stored program concept.Understand the stored program concept.
After reading this chapter, the reader should be able to:After reading this chapter, the reader should be able to:OOBJECTIVESBJECTIVES
Understand the sequential execution of statements in a program.Understand the sequential execution of statements in a program.
Name the components of a computer: hardware, software, Name the components of a computer: hardware, software, and data. and data.
©Brooks/Cole, 2003
THE COMPUTERTHE COMPUTERAS A BLOCK BOXAS A BLOCK BOXTHE COMPUTERTHE COMPUTERAS A BLOCK BOXAS A BLOCK BOX
1.11.1
©Brooks/Cole, 2003
Figure 1-1
Data processor model
You can think of a computer as a data processor.
Is it a specific-purpose machine or a general-purpose machine?
©Brooks/Cole, 2003
Figure 1-2
Programmable data processor model
A program is a set of instructions that tells the computer what to do with data.
A program is a set of instructions written in a computer language.
The output data depend on the combination of two factors: the input data and the program.
©Brooks/Cole, 2003
Figure 1-3
Same input data, same program
When the same program is run with the same input, you expect the same output.
©Brooks/Cole, 2003
Figure 1-5
von Neumann model: Four subsystems
Memory Memory is the storage area
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.
©Brooks/Cole, 2003
Figure 1-5
von Neumann model
Stored program concept: The von Neumann model states that the
program must be stored in memory. The memory of modern computers hosts
both a program and its corresponding data. They are stored as binary patterns (a sequence of 0s and 1s) in memory.
Sequential execution of instructions A program is made of a finite number of
instructions. They are executed sequentially.
©Brooks/Cole, 2003
COMPUTERCOMPUTERHARDWAREHARDWARESee Chapter 5See Chapter 5
COMPUTERCOMPUTERHARDWAREHARDWARESee Chapter 5See Chapter 5
1.31.3
©Brooks/Cole, 2003
Figure 1-5
Storing data The von Neumann model does not define how data
must be stored in a computer. A computer can store data in one of two states. You will learn how to store different types of data as
a binary pattern, a sequence of 0s and 1s. Organizing data (data organization)
Although data should be stored only in one form inside a computer, data outside a computer can take many forms.
Data are organized into small units, small units are organized into larger units, and so on.
Data
©Brooks/Cole, 2003
Programs must be stored Programs are stored in
computer memory. (see Figure 1-6)
A sequence of instructions Programs must be a
sequence of instructions. (see Figure 1-7)
Why? Reusability.
Programming
©Brooks/Cole, 2003
Algorithms A step-by-step solution to a program is called an
algorithm. Languages
A computer language has a more limited number of symbols and also a limited number of words.
Software engineering The design and writing of programs in a
structured form. Operating systems
Computer Software
©Brooks/Cole, 2003
Computer generation First generation: vacuum tubs Second generation: transistors Third generation: integrated circuit Fourth generation: micro-computers Fifth generation: multimedia
History