You are on page 1of 58

Computer Programming 1

COMPROG 1 | ICT Strand 1 & 2


Lesson #1

Basic Computer Parts and


Concepts
LEARNING OUTCOMES
At the end of this module you will understand the following:
1. identify basic computer parts;
2. understand the function of basic computer parts and
components;
3. understand algorithm and pseudocode; and
4. familiarize with the algorithm, pseudocode and flowchart
in solving a problem.
PRE-TEST
Direction:
Select the letter that corresponds to the correct answer.
Which of the
A. Computer
following is an
electronic, B. Machine
programmable device C. CPU
that can store, D. System Unit
retrieve and process
data?
Which of the A. Input
following unit is B. Processing
used for keeping C. Output
the data and D. Storage
instructions?
Which of the
A. Algorithm
following is a
graphical B. Diagram
representation of the C. Flowchart
logical sequence of D. Pseudocode
steps to be process of
a program?
A.

Which of the B.
following symbols
shows an action in C.
the process?
D.
A.

Which of the
following symbols B.

identifies key
inputs or outputs C.

of a process?
D.
Basic Computer Parts
and Concepts
Lesson 1.1
Basic Computer Parts and Concepts
Computer is an electronic programmable device that can store,
retrieve and process data. Computer includes peopleware, hardware
and software. Peopleware refers to the user that manipulates the
computer.

Computer hardware refers to all the devices in the computer or


anything that can be touched by the peopleware. Computer
software is anything that cannot be touched by the peopleware; it
refers to all the programs and application in the computer. There
are two types of computer software, the System Software and the
Application Software. https://images.app.goo.gl/7uy4ZS37A8sBjrLV9
Basic Computer Parts and Concepts

System Software is the most important software because


without this software all applications will not run. Under System
Software is Operating System. It is the main program of your
computer even your cellphones; examples are Windows OS, Linux
and Mac OS.

Application Software it is the common type of software, it


accomplishes a specific task. Examples of Application Software are
Photoshop and Microsoft office.
https://images.app.goo.gl/YpyzgmiSsRRQqGLo9
Basic Computer Parts and Concepts

5 Basic parts
of Computer

https://images.app.goo.gl/SJ4Dp97SUPZQk2ET7
Basic Computer Parts and Concepts

Monitor
• it is an output device that displays
information.

https://giphy.com/embed/xUS4Fp5i6iIn2Y1EYT
Basic Computer Parts and Concepts

Keyboard
• it is an input device used to enter function using keys or button. It is
primarily a device which is used to input special characters, numbers and
letters.

https://upload.wikimedia.org/wikipedia/commons/9/94/QWERTY_keyboard_alt_code_161_demonstration.gif
Basic Computer Parts and Concepts

Mouse
• it enables the user to control or move the cursor. It is
used for selecting, dragging, hovering and clicking.

https://www.google.com/url?sa=i&url=https%3A%2F%2Flordicon.com%2Ficons%2Fwired%2Fflat%2F1315-
computer-
mouse&psig=AOvVaw1oZIPAaxNl4Hy3gYMTwa92&ust=1693190721444000&source=images&cd=vfe&opi=899
78449&ved=0CBAQjRxqFwoTCKjw0rXp-4ADFQAAAAAdAAAAABAm
Basic Computer Parts and Concepts

System unit
• it is known as computer chassis. It includes
Motherboard, Central Processing Unit (CPU),
RAM, ROM, Power Supply and other main
parts of computer.

https://villman.com/product_photos/h500pmesh_ljff6.gif
Basic Computer Parts and Concepts

Automatic Voltage Regulator (AVR)


• it is used to maintain the voltage of a
computer or electronic device/s.

https://ttnelectric.en.made-in-china.com/product/JdOawSiXfrGI/China-Ttn-2kVA-90-Effiency-
AC-Voltage-Regulator-High-Frequency-Stabilizer.html
Basic Computer Parts and Concepts

What is the function of a computer?


A computer performs four major operations. First, it accepts instructions or
data as input, second, the data will process as per instructions, third, it gives
result in the form of output and it stores and data.
Basic Computer Parts and Concepts
In input operation user will enter data and computer will accept it, next is the
processing operation this is the time when the computer will process data entered
by the user, while processing the data is hold by the Random Access Memory
(RAM) and after processing it will hold by Read Only Memory (ROM).
RAM is holding data while computer is On, it is also call as volatile, then non-
volatile is the ROM that can hold data even the computer is On or Off. Next, is
Output operation, showing the result of the data and last storage operation, this
time user can save data in any storage devices.
Basic Computer Parts and Concepts

https://images.app.goo.gl/vbpk9mNvPA2k6BHC7
ACTIVITY:
Give a product that gone through :
INPUT, PROCESS / STORAGE, OUTPUT

Example:

https://images.app.goo.gl/1xXwTHkKtJYaZguv7
Basic Computer Parts and Concepts
Basic Computer Parts and Concepts

INPUT
 It is used for entering data into the computer.
 It allows the user to interact.
 It accepts data.
Examples:
Keyboard, Mouse, Scanner, Camera
Basic Computer Parts and Concepts

Processing
• The task of performing operations given by the user.
• It is called the brains of the computer.
• It carries out instructions.
Examples:
Central Processing Unit (CPU)
Basic Computer Parts and Concepts

Output
• It is used for showing the result as output after processing.
• It allows the user to interact.
• It delivers data.
Examples:
Monitor, Printer, Speaker
Basic Computer Parts and Concepts

Storage and Memory


• It is used for storing and handling data and instructions.
Examples:
Flash drive, Hard drive, CD,(Compact Disk) DVD (digital video disc), RAM (Random
Access Memory), ROM (Read Only Memory)
Introduction to
Computer Programming
Lesson 1.2
Introduction to Computer Programming
There are three words that we need to understand, these are Program, Programmer
and Programming.

• Program - Set of instruction that tells the computer what to do.


• Programmer - Person who develops of a program or write a code.
• Programming - Process that came from an original formulation of a computing
problem to executable programs or simply a process of creating application.
Introduction to Computer Programming
There are two ways of programming. Procedural and OOP (Object-Oriented
Programming).
Procedural is a system contains of a series of computations steps to be
carried out while OOP is based in the concept of an object that will output
interactive design to the application and computer programs.
Differences between Procedural and
Object Oriented Programming
Parameter Object Oriented Programming Procedural Programming

Object-oriented Programming is a programming language that uses Procedural Programming is a programming language that follows a
classes and objects to create models based on the real world step-by-step approach to break down a task into a collection of
environment. variables and routines (or subroutines) through a sequence of
Definition instructions.
In OOPs, it makes it easy to maintain and modify existing code as
new objects are created inheriting characteristics from existing Each step is carried out in order in a systematic manner so that a
ones. computer can understand what to do.

In OOPs concept of objects and classes is introduced and hence the In procedural programming, the main program is divided into small
Approach program is divided into small chunks called objects which are parts based on the functions and is treated as separate program for
instances of classes. individual smaller program.

https://www.tutorialspoint.com/differences-between-procedural-and-object-oriented-programming
Differences between Procedural and
Object Oriented Programming
Parameter Object Oriented Programming Procedural Programming

In OOPs access modifiers are introduced namely as Private, Public,


Access modifiers No such modifiers are introduced in procedural programming.
and Protected.

Due to abstraction in OOPs data hiding is possible and hence it is


Approach Procedural programming is less secure as compare to OOPs.
more secure than POP..

OOPs due to modularity in its programs is less complex and hence


There is no simple process to add data in procedural programming, at
Complexity new data objects can be created easily from existing objects
least not without revising the whole program.
making object-oriented programs easy to modify

https://www.tutorialspoint.com/differences-between-procedural-and-object-oriented-programming
Differences between Procedural and
Object Oriented Programming
Parameter Object Oriented Programming Procedural Programming

OOP divides a program into small parts and these parts are referred Procedural programming divides a program into small programs and
Program division
to as objects. each small program is referred to as a function.

Procedural programming does not give importance to data. In POP,


Importance OOP gives importance to data rather than functions or procedures.
functions along with sequence of actions are followed.

OOP provides inheritance in three modes i.e. protected, private,


Inheritance Procedural programming does not provide any inheritance.
and public

Examples C++, C#, Java, Python, etc. are the examples of OOP languages. C, BASIC, COBOL, Pascal, etc. are the examples POP languages.

https://www.tutorialspoint.com/differences-between-procedural-and-object-oriented-programming
Introduction to Computer Programming

Process/Steps in programming
1. Analyze the problem or the program
• First you must know exactly what you will do. You must formulate a clear statement of what is
to be done.
2. Develop an algorithm.
• It is a sequence of effective statements that when applied to the problem, will solve it.
3. Coding
• It is a process of translating the algorithm into high-level language or simply coding means
writing a code. In writing code make sure that the program performed the way it is intended.
Introduction to Computer Programming

Process/Steps in programming
- Run the program and test the result, make sure that it is in a form you
intended if not produce a solution to your program.
5. Documentation
- The programmer must know how the program works, including descriptions
of it, the hardware and the software requirements.
6. Maintenance
- Programmer needs to keep the program running smoothly, provides updates
and solution or improvement in the program considering changes in the field
it is used.
Algorithm, Pseudocode,
Flowchart
Lesson 1.2.1
Algorithm, Pseudocode, Flowchart

Algorithm
• It is a step-by-step procedure or a set of rules in resolving
problem or creating programs.
• It also helps the programmer in identifying decision
points. Using algorithm can also determine easily the
error in a particular process.
https://images.app.goo.gl/AfV59PJaf29hbWze7
Algorithm, Pseudocode, Flowchart
Example Problem: Computing the area of rectangle
Algorithm:
Start
Identify the length and width
Input length and width
Computing the Area
Print area of rectangle
https://images.app.goo.gl/AfV59PJaf29hbWze7
End
Algorithm, Pseudocode, Flowchart
Pseudocode
It is a shorter description of an algorithm. It is a
combination of English and code method to illustrate the
algorithm.

Example Problem: Computing the area of rectangle


L= Length of the Rectangle
W= Width of the Rectangle
https://images.app.goo.gl/AfV59PJaf29hbWze7 A= Area of the Rectangle
Algorithm, Pseudocode, Flowchart
Pseudocode:

Begin
A=0 L=0 w=0
Enter L and W
L*W
Print A
Stop
https://images.app.goo.gl/AfV59PJaf29hbWze7
Algorithm, Pseudocode, Flowchart
Flowchart
It is also a description of an algorithm like pseudo code. The difference is that the
flowchart is a graphical representation of it. It also helps to identify easily the potential
improvement of a program.
Flowchart consists of eight standard symbols namely; Terminator, Preparation,
Process, Decision, Input/Output, Arrow or Direction Flow, On-page Connector and off-
page Connector.
Algorithm, Pseudocode, Flowchart

Terminator – signifies the beginning and


the end of the process.

Preparation – signifies the


automated processing of
information.
Algorithm, Pseudocode, Flowchart

Decision –
shows when
Process – shows how a process is
the decision
being done.
needs to be
made.
Algorithm, Pseudocode, Flowchart

Input/Output –
Arrow or Direction flow –
identifies what to
indicates the direction and order of
input and signifies the
the process.
output.
Algorithm, Pseudocode, Flowchart

On-page Off-page Connector


Connector – – used to connect the
used to connect flow to another page.
the flow on the
same page.
Algorithm, Pseudocode, Flowchart

Example Problem1:
Computing the area of rectangle.
L= Length of the
Rectangle
W= Width of the
Rectangle
A= Area of the
Rectangle
Algorithm, Pseudocode, Flowchart
Example Problem2:
Finding the average of any three numbers. If the
average is greater than or equal to 90 print “very
good”, else print “good”.
T = Sum of three number
X = Number 1
Y = Number 2
Z = Number 3
A = Average of three number
Algorithm, Pseudocode, Flowchart
Example Problem2:
Finding the average of any three numbers. If the
average is greater than or equal to 90 print “very
good”, else print “good”.
T = Sum of three number
X = Number 1
Y = Number 2
Z = Number 3
A = Average of three number
Create the following:
1. Simple Algorithm
2. Simple Pseudocode
3. Simple Data Flow Chart
WHAT DID YOU LEARNED?
Which of the following is a shorter description of an algorithm – and a
combination of English and code method?

A. Flowchart B. Algorithm
C. Pseudocode D. Diagram
Which of the following has a function to maintain the voltage of a
computer or an electronic device?

A. CPU B. AVR
B. C. RAM D. ROM
The following are capabilities under the output, except…

A. It delivers data.
B. It shows results.
C. It carries out instructions.
D. It allows the users to interact.
Computer Programming is bound to three categories, these are Program,
Programmer, and Programming.

Which best describe for Program?

A. Develop codes or program.


B. Set of instructions to the computer.
C. Accept raw data to process and execute.
D. Process the formulation to create an application.
Programming has to ways; Procedural and OOP.

Which best describe for procedural?

A. Concept of interactive designs.


B. Series of computations or steps.
C. Series of process to create a program.
D. Concept of an object to produce an output.
Basic Computer Parts and Concepts

5. Programming has to ways; Procedural and OOP.


Which best describe for procedural?

A. Concept of interactive designs.


B. Series of computations or steps.
C. Series of process to create a program.
D. Concept of an object to produce an output.
6 – 10. Identify the following objects use for Flow Chart and its meaning:

8
6

7 9

10
SUMMARY:
We have discussed the five basic parts and concepts of computer, introduction to
programming, flowchart, algorithm and pseudocode.
As learners, can you discuss the following items based on how you understand the
topic, use your own words to describe the following:
1. Computer’s five basic parts.
2. Computer four major operations.
3. Process/Steps in programming.

Credits: Prof. Ariel Domingo | Higher School ng UMak

You might also like