0% found this document useful (0 votes)
53 views23 pages

Introduction To Computers: Topic 1

The document provides an overview of computers and their basic components. It discusses that computers have both hardware and software. The hardware consists of the central processing unit, memory, input/output devices, and storage devices. The software is divided into system software, which manages resources, and application software, which helps users solve problems. The document also introduces different computer languages from machine language to high-level languages like C++, and explains the basic process of program development.

Uploaded by

y shuang
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
53 views23 pages

Introduction To Computers: Topic 1

The document provides an overview of computers and their basic components. It discusses that computers have both hardware and software. The hardware consists of the central processing unit, memory, input/output devices, and storage devices. The software is divided into system software, which manages resources, and application software, which helps users solve problems. The document also introduces different computer languages from machine language to high-level languages like C++, and explains the basic process of program development.

Uploaded by

y shuang
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 23

Topic 1

Introduction to Computers

1
What is a Computer?
 A computer is a system made up of 2 major
components:
 Hardware and Software

 Hardware is the physical equipment.

 Software is the collection of programs


(instructions) that make the hardware does its
work.

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

 System software manages the hardware


resources of a computer.
 These programs include the operating system.

 Application software consists of programs that


are used to help users solve their problems.
 These programs include those that you will write.

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++.

 But a computer understands a program


only if it is coded in the computer’s
machine language.

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.

FIGURE: Computer Language Evolution


PROGRAM 1-1The Multiplication Program in Machine Language
Note
The only language understood by computer
hardware is machine language.
PROGRAM 1-2 The Multiplication Program in Symbolic Language
Note
Symbolic language uses symbols, or mnemonics, to
represent the various machine language instructions.
PROGRAM 1-3 The Multiplication Program in C++

# include <iostream>
using namespace std;

cin >> number1;

continued
PROGRAM 1-3 The Multiplication Program in C++ (continued)

cin >> number2;

cout << result;


Addition Material:
Popular High-Level Languages
 C
 C++ (an object-oriented language, based on C)
 Java
 C#
 Pyton
 COBOL (COmmon Business Oriented Language)
 FORTRAN (FORmula TRANslation)
 BASIC (Beginner All-purpose Symbolic Instructional Code)
 Pascal (named for Blaise Pascal)
 Ada (named for Ada Lovelace)
 Visual Basic (Basic-like visual language developed by
Microsoft)
 Delphi (Pascal-like visual language developed by Borland)
……
Program Development
 It is the job of the programmer to write the
program using programming language and
then turn it into an executable (machine
language) file.

 There are 3 steps in this process:


 Writing (coding) and editing the program
 Compiling the program
 Linking the program with the required library files

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

› It makes it easier to develop and execute


programs.

› The IDE we will use is called Microsoft Visual


Studio.

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.

 IDEs normally consist of a source code editor, a


compiler and/or interpreter, build-automation
tools, and (usually) a debugger.

 Sometimes a version control system and various


tools to simplify the construction of a GUI are
integrated as well.

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.

You might also like