Sei sulla pagina 1di 34

Introduction to

Computer Systems

Lesson 1
What is a computer?
A computer is a device that can accept
input, process this input to produce
meaningful output.
The process is usually done according to a
predetermined set of instructions.
Components of a computer
Hardware
Software
Hardware
The physical computer and its
components are known as hardware.
Software
Software is a set of instructions
written by humans and given to the
computer.
These instructions (programs) tell the
computer which operations to apply to
the data, to ultimately produce
informational output.
Types of Software
Software types typically fall into 2
categories:
System Software
Application Software
System software
System software manages the
hardware components
Examples of system software includes:

Operating System a software that makes the


computer work
Security Software that protects the computer
from intrusion
Device Drivers that communicate with
hardware such as printers
Examples of system software includes:

Utility programs that handle specific tasks


such as data backup and disk management
Network operating system(NOS) which
controls the flow of data, provides data security,
and manages network accounts
Language translator translates programs
written in a variety of programming languages
into machine language codes.
Application software
Application software(apps) is a
program that perform specialized
functions or specific jobs.
Consists of programs that support day-
to-day business functions and provide
users with the information they require
Examples of application software includes:

Spreadsheets
Word processors
Presentation
Database management systems
Order processing systems
Payroll systems
Company communications networks
Introduction to Programming

Lesson 2
Computer Program
A computer program is a set of
instructions telling the computer what to
do
Computers dont think, but a computer can
carry out instructions
Without programs, computers are useless.
Programming
Programming means designing or
creating a set of instructions to ask the
computer to carry out certain jobs
which normally are very much faster
than human beings can do.
Programming Language
In order to do programming, we need
to use certain computer language to
communicate with the computer.
It is a set of rules, symbols, and special
words used to construct a computer
program
Programming Language
A programming language is a
simplified form of English (with math
symbols) that stick to the strict set of
grammatical rules.
There are many computer languages
out there, some of the examples are
Java, Visual Basic, Fortran, Cobol, C++,
C#.NET, VB.NET, Turbo Pascal,
Assembly language and etc.
Programmer
A programmer, computer
programmer or coder is someone
who writes computer software or
program.
Algorithms and
Problem Solving

Lesson 3
Lecture Objectives
Learn about problem solving skills
Explore the algorithmic approach for
problem solving
Learn about algorithm development
Become aware of problem solving
process
Problem Solving
Programming is a process of problem solving
Problem solving techniques
Analyze the problem
Outline the problem requirements
Design steps (algorithm) to solve the problem
Algorithm:
Step-by-step problem-solving process
Solution achieved in finite amount of times
Problem Solving Process
Step 1 - Analyze the problem
Outline the problem and its requirements
Design steps (algorithm) to solve the problem
Step 2 - Implement the algorithm
Implement the algorithm in code
Verify that the algorithm works
Step 3 - Maintenance
Use and modify the program if the problem
domain changes
Analyze the Problem
Thoroughly understand the problem
Understand problem requirements
Does program require user interaction?
Does program manipulate data?
What is the output?
If the problem is complex, divide it into
subproblems
Analyze each subproblem as above
What is an algorithm?
The idea behind the computer program
Stays the same independent of
Which kind of hardware it is running on
Which programming language it is written in
Solves a well-specified problem in a
general way
What is an algorithm?
Is specified by
Describing the set of instances (input) it
must work on
Describing the desired properties of the
output
What is an algorithm? (Contd)
Before a computer can perform a task, it must
have an algorithm that tells it what to do.
Informally: An algorithm is a set of steps that
define how a task is performed.
What is an algorithm? (Contd)
Formally: An algorithm is an ordered set of
unambiguous executable steps, defining a
terminating process.
Ordered set of steps: structure!
Executable steps: doable!
Unambiguous steps: follow the directions!
Terminating: must have an end!
What is an algorithm? (Contd)
Important Properties of Algorithms
Correct
always returns the desired output for all legal
instances of the problem.
Unambiguous
Precise
Efficient
Can be measured in terms of
Time
Space
Time tends to be more important
Representation of Algorithms
A single algorithm can be represented in
many ways:
Formulas: F = (9/5)C + 32
Words: Multiply the Celsius by 9/5 and add
32.
Flow Charts.
Pseudo-code.
In each case, the algorithm stays the
same; the implementation differs!
Representation of Algorithms
(Contd)
A program is a representation of an algorithm
designed for computer applications.

Process: Activity of executing a program, or


execute the algorithm represented by the
program

Process: Activity of executing an algorithm.


Expressing Algorithms
English description
More
More easily
expressed precise
Pseudo-code

High-level
programming
language
Pseudocode
Pseudocode is like a programming
language but its rules are less strict.
Written as a combination of English and
programming constructs
Based on selection (if, switch) and iteration
(while, repeat) constructs in high-level
programming languages
Design using these high level primitives
Independent of actual programming language
Pseudocode (Contd)
Example: The sequential search algorithm in
pseudocode
Algorithm Discovery
The Two Steps of Program Development:
1. Discover the algorithm.
2. Represent the algorithm as a program.
Step 2 is the easy step!
Step 1 can be very difficult!
To discover an algorithm is to solve the
problem!

Potrebbero piacerti anche