Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Introduction to Computers
(in Chapter 1)
1/19/2011 2
OBJECTIVES
1
Chapter 1 Sections
1.1 Introduction
1.2 What Is a Computer?
1.3 Computer Organization
1.4 Machine Languages, Assembly Languages and High-Level Languages
Introduction
Subscribe to free e-mail newsletter at
http://www.deitel.com/newsletter/subscribe.html
2
Intro to Internet and World Wide Web How to
Program: 4/e
Structure and Content
JavaScript, XHTML and CSS
– in early chapters
– solid foundation for subsequent chapters
Applications of the textbook content
– prepares for more advanced study in C++, Java, C#, Visual Basic.NET,
and general object-oriented programming
– enables development of applications with graphical user interfaces
(GUIs) delivered through a browser
• applications that are not limited to the desktop
• applications that are portable
– run on multiple platforms (i.e., different types of computers
running different operating systems).
– includes multimedia capabilities
– apply database technologies
7
What is a Computer?
Device
Performs computations fast
Performs yes/no decisions fast
Fastest supercomputers today
– perform hundreds of billions of additions per
second
3
What is a Computer?
Supercomputers: most powerful
Computer programs: sets of instructions
that tell the computer what to do
Computer
C t programmers: people l who
h
construct computer programs
10
11
12
4
Input Unit
Gets data and computer programs into the
system
Input devices
– keyboard
k b d
– mouse
– scanner
– microphone
– etc.
13
Output Unit
Takes info from computer and transfers it
to output devices
Output devices
– monitor
it
– printer
– network
– etc.
14
Memory Unit
Fast-access, low capacity (relatively),
storage
RAM, memory, primary memory, core
memory are other terms used
This memory is volatile
– when power is lost, the info in memory is no
longer there
15
5
Arithmetic and Logic Unit
ALU (lingo)
Performs calculations (+, -, *, /)
Decisions (compare two items in memory
and
dddecide
id if th
they are th
the same))
16
17
18
6
Early Computing
Before 1960
Batch processing: computers performing
one task at a time
– submit
b it a ‘j‘job’
b’ on punched
h d cards,
d gett output
t t
(paper printout) the next day
Computer fills a room
No PCs
19
20
Timesharing
During the 1960s and 70s
Multiple users access one large computer
in another room through a terminal
– keyboard
k b d andd screen
OS directs computer to handle one user’s
job for a few seconds, then another, etc.
Timesharing allowed different clients to
“pay” for only the portion of time they used
the processor 21
7
Personal Computing
1970s
– silicon chip technology
– smaller computers
– Apple (1977)
– IBM PC (1981)
Stand-alone computers on your desk
Boot from floppy disk with OS on floppy
Store work on floppy disks
Share work by sharing floppy disks
22
Distributed Computing
Network stand-alone units together to
facilitate sharing
– work (files)
– equipment (printers)
Local area networks (LAN)
23
Client/Server Computing
Server: provides a common data store for
multiple users
– file server
– application server
– web server
– database server
Client: desktop computer uses data from
the common data store on the server
24
8
Hardware Trends
Computer hardware costs have steadily
decreased in relation to the capability of
the devices purchased
Moore
Moore’ss Law: Every year or two you can
buy twice as much computing power for
the same amount of money
25
Other OS
LINUX
– open-source: the source code is freely
available to users who can modify it to suit
their needs
UNIX
– proprietary (Bell Labs)
– written in C programming language
27
9
Software
Instructions to command the computer to
perform actions and make decisions
JavaScript and PHP are popular software
development
p languages
g g for web-based
applications
Development of instruction sets is called
programming or coding
28
29
Machine Language
The “natural language” of a specific
machine
Determined by the hardware design of the
machine
Machine dependent: any given machine
language can be used on only one type of
computer
Cumbersome for humans
30
10
Machine Language Program
Example
31
Assembly Language
Use English-like abbreviations for strings
of numbers
Assembler: a translator program that
translates English
English-like
like assembly language
statements into machine language
32
11
High-Level Language
Single statements accomplish substantial
tasks
Instructions look almost like everyday
English and math
34
High-Level Languages
More desirable from programmer’s standpoint
Examples of high-level languages
– C
– C++
– Visual Basic.NET
– C#
– Java
These are among the most powerful and widely used
languages today
36
12
Other High-Level Languages
Fortran (FORmula TRANslator)
COBOL (Common Business Oriented
Language)
Pascal
P l
Ada
37
13
Advantages/Disadvantages of
Interpreted Language
Advantage over compilers in scripting
An interpreted program can begin executing as soon as it is
downloaded to the client’s machine, without the need to be
compiled first
Disadvantage is interpreted scripts generally run slower
Interpreted languages are more portable than compiled
languages
– Interpreters can be implemented for each platform on
which the interpreted languages need to executed
Interpreted languages more dynamic than compiled
languages
– For example, server-side applications can generate code
in response to user interactions, and that code can then be
40 interpreted in a browser.
1/19/2011 41
14