Introduction To Computers: Topic 1
Introduction To Computers: Topic 1
Introduction to Computers
1
What is a Computer?
A computer is a system made up of 2 major
components:
Hardware and Software
2
Computer Hardware
Computer hardware consists of 5 parts:
Central processing unit (CPU)
Primary storage or main memory
Input devices
Output devices
Auxiliary storage devices
3
Computer Hardware
4
Memory Cells in Primary Storage
Memory
Cells
Address Contents
0 -27.2 Memory cells
can contain
1 -354 program
2 -0.005 instructions and
data for a
3 -H program
...
...
.
9999998 -d
9999999 --26
Computer Software
Computer software is divided into 2 broad
categories:
System software and Application software
6
Computer Languages
To write a program for a computer, we must
use a computer language or programming
language.
The programming language we will use is called
C++.
7
To write a program for a computer, we must use a
computer language. Over the years computer
languages have evolved from machine language to
natural languages.
# include <iostream>
using namespace std;
continued
PROGRAM 1-3 The Multiplication Program in C++ (continued)
16
Program Development
#include<iostream>
using namespace std;
int main (void)
{ ……
file
file
file
17
Program Development
› Text Editor
Used to type program code and save in source file.
› Compiler
Used to convert C++ program to machine
language and create an object file.
Converting C++ program to machine language is
called compilation.
If the compiler finds any errors in the C++
program, the compilation will not be successful
and no object file is created.
18
Program Development
› Linker
Used to link or combine the object file with other
object files from the C++ library and create an
executable file.
The C++ library contains many useful program
parts that we can combine with our program.
19
Program Execution
› Loader
To run or execute the executable file.
This involves loading the file into main memory
and passing control to the program.
Executabl
input e file
Comput Loade
Loade
program er rr
user outpu
t
20
Integrated Development Environment
› An integrated development environment (IDE) is a
computer software that combines :
Text editor
Compiler
Linker
Loader
21
Additional Material:
Integrated Development Environment
An integrated development environment (IDE)
(also known as an integrated design environment
and integrated debugging environment) is
computer software to help computer programmers
develop software.
22
Additional Material: IDE (cont.)
IDEs provide a user-friendly framework for many
modern programming languages.
Examples:
C/C++:- Visual Studio, Borland C, etc.
Java:- NetBean, JBuilder, JCreator, etc.
Eclipse is a multi-language Integrated
development environment (IDE) comprising a
base workspace and an extensible plug-in
system for customizing the environment. It can
be used to develop applications in Java and, by
means of various plug-ins, other programming
languages including Ada, C, C++, COBOL,
Fortran, Haskell, JavaScript, Perl, PHP, Python,
Ruby, etc.