Chapter 1 : Introduction To Computers
And Programming Language
Objectives
What is a computer, its category and component
To become familiar with computer software, computer
hardware and computer environments
To know about the history of programming languages
To understand writing, editing, compiling, and linking
programs
What is a computer?
An electronic device, with two major components.
Computer
Hardware
Software
Computer Hardware
Hardware for a typical computer system include the
following components :
1. Input devices - keyboard, mouse
2. Central processing unit (CPU)
3. Primary Storage or main memory - RAM
4. Output Devices - monitor, printer
5. Auxiliary or secondary storage - hard disc
Basic Hardware Components
Computer Software
Software is divided into 2 categories
Software
System Software
Application Software
System Software
Normally supplied by the manufacturer of the
computer
Consists of utility programs and operating aids that
facilitate the use and performance of the computer
Includes the computers operating system
Related software that manages the systems resources
and control the operations of the hardware.
Application Software
Designed to perform a specific task such as course
registration or banking and a general-purpose such as
processor (eg. Ms Word)
May be acquired by purchasing off-the-shelf or by
designing for own purpose (custome made)
Off-the-shelf : prewritten and ready to use
Custom made : written by in-house, consulting firm or
software house
Where are the application and system
software?
Computing Environment
Personal Computing
Time-Sharing
Client / Server Computing
Internet Computing
Personal computing environment
Time-sharing environment
The client/server environment
History Of Computer Languages
Computer language evolution
The only language understood by a computer is
machine language
History Of Computer Languages (cont.)
1.Machine Language
Computer only understand this language.
Series of 1s and 0s
Difficult to write.
Low level language
2. Symbolic Language
Unique to particular computer.
Use mnemonics symbols. E.g. MUL Multiply
Easier to understand.
History Of Computer Languages (cont.)
3. High-Level Language
Portable to many different computers.
Instruction are coded
Eg. COBOL (Business), FORTRAN (Scientific),
BASIC, Pascal, C, C++, Java etc.
4. Natural Language
Like our natural language (such as English, French, or
Chinese)
Its use is still quite limited.
Program Development
A computer understands a program only if the program
is coded in its machine language.
Programmer have to write the program and turn it into
an executable (machine language) file.
Programmer have to understand the problem -> break
into actions-> execute by the computer.
3 steps in the process :
-Writing and editing program
-Compiling the program
-Linking the program
Program Development
Steps in the solution must be written in a programming
language (the source code)-> use text editor.
Source code(source file) must be converted into machine codes
that the computers microprocessor can understand(compiled)->
done by compiler.
C++ Compiler preprocessor (scan for preprocessor
directive)
- translation (converting the program to
machine language)
Linker assembles other functions into executable program.
Loader locates the executable programs and reads it into
memory and control is given to the programs to begin