COMP 02 - Week 2
Programming Concepts
Part 1
Prepared by:
Asst. Prof. Ma. Ymelda C. Batalla, MIT
Faculty
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
SANTA ROSA CAMPUS
Try This Out!
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
SANTA ROSA CAMPUS
Scramble Word #1
TWSRAFEO
SOFTWARE
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
SANTA ROSA CAMPUS
Scramble Word #2
RARMGNOPMGI
PROGRAMMING
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
SANTA ROSA CAMPUS
Scramble Word #3
OURMCPET
COMPUTER
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
SANTA ROSA CAMPUS
Scramble Word #4
OITFROMNAIN
INFORMATION
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
SANTA ROSA CAMPUS
Scramble Word #5
UPOCTREM YSEMTS
COMPUTER SYSTEMS
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
SANTA ROSA CAMPUS
Scramble Word #6
ENGULGAAS
LANGUAGES
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
SANTA ROSA CAMPUS
Scramble Word #7
IGLOC
LOGIC
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
SANTA ROSA CAMPUS
Scramble Word #8
AOGRMRP
PROGRAM
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
SANTA ROSA CAMPUS
Scramble Word #9
SXANTY
SYNTAX
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
SANTA ROSA CAMPUS
Scramble Word #10
OOITMCCNNMUIA
COMMUNICATION
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
SANTA ROSA CAMPUS
At the end of the lesson, the student will
be able to:
▪ Define the theoretical/fundamental concepts in
computer programming;
▪ Describe the basic function of computer system and
key aspects of computer programming; and
▪ Compare and contrast the different components of
computer and categories of programming
languages.
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
SANTA ROSA CAMPUS
Introduction
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
SANTA ROSA CAMPUS
Introduction
What are the benefits or advantages of
computers in your daily life?
People claim that computers "run" our lives. Is it
true? Almost every part of our daily lives makes
significant use of computers.
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
SANTA ROSA CAMPUS
Introduction (continuation)
So, what makes the computer run?
A computer cannot perform any task without a
computer program. Its task is to direct the
computer what to do or perform.
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
SANTA ROSA CAMPUS
What is a Computer?
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
SANTA ROSA CAMPUS
What is Computer?
A computer is an electronic device that accepts
digitalized data (input), process the data according to
sequence of instructions (called program with
mathematical and logical operations), produce some
result (output), and store it for future use of the users.
The term "computer" is derived from the Latin
word "computare“, which means to calculate.
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
SANTA ROSA CAMPUS
What is a DATA?
Data is a collection of unorganized facts and
figures and does not provide any further information
regarding patterns, context, etc. Hence, data means
"unstructured facts and figures". – tutorialspoint.com
Example:
A series of numbers: 7, 3, 9, and 15
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
SANTA ROSA CAMPUS
What is an INFORMATION?
Information is structured data, i.e., organized,
meaningful, and processed data. To process the data
and convert it into information, a computer is used. –
tutorialspoint.com
Example:
Using the series of numbers: 7, 3, 9, and 15 to
calculate the average of the quiz score with a result
of 8.5.
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
SANTA ROSA CAMPUS
Functions of Computer
▪ Input
It refers to receiving data or instructions into
a computer from external resources or input
devices such as a keyboard, mouse, digital pen,
etc.
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
SANTA ROSA CAMPUS
Functions of Computer (continuation)
▪ Processing
It refers to the operations of the inputted data
based on the list of instructions (programs)
provided using the central processing unit (CPU)
and other computer components to manipulate,
calculate, and analyze the data.
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
SANTA ROSA CAMPUS
Functions of Computer (continuation)
▪ Storage
It refers to storing the data, information, and
instructions temporarily using the primary
memory (Random Access Memory (RAM)) or
permanently using the secondary memory,
such as hard drives, SSDs, etc.
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
SANTA ROSA CAMPUS
Functions of Computer (continuation)
▪ Output
It refers to the processed data or produced
information that could be presented in the form
of text, graphics, audio, or video that can be
presented using a monitor, speakers, printers, etc.
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
SANTA ROSA CAMPUS
Functions of Computer (continuation)
▪ Control
It refers to controlling and managing the
hardware and software components of computer
systems to ensure proper operation and task
execution.
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
SANTA ROSA CAMPUS
Functions of Computer (continuation)
▪ Communication
It refers to sending and receiving data or
information over networks (such as the internet),
where users can share information and other
resources with others using computers.
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
SANTA ROSA CAMPUS
Components of Computer
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
SANTA ROSA CAMPUS
Components of Computer
https://www.geeksforgeeks.org/computer-and-its-components/
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
SANTA ROSA CAMPUS
Components of Computer (continuation)
▪ Central Processing Unit (CPU)
The Central Processing Unit (CPU) is the
core of a computer device and is called "the
brain of the computer", where it controls the
operation of all parts of the computer system. It
consists of major components: Arithmetic Logic
Unit (ALU), Control Unit, and Internal
Memory Unit.
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
SANTA ROSA CAMPUS
Components of Computer (continuation)
▪ Arithmetic Logic Unit (ALU)
It refers to performing calculations and
processing all the instructions, such as
comparisons and decision-making.
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
SANTA ROSA CAMPUS
Components of Computer (continuation)
▪ Control Unit
It controls all the computer activities, where it
manages the data flow, transfers data from
the memory to the ALU and vice versa and
fetches the result to output devices.
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
SANTA ROSA CAMPUS
Components of Computer (continuation)
▪ Internal Memory Unit
It refers to register memory, which is a
volatile that stores the data, operations, or
instructions that the CPU is currently processing.
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
SANTA ROSA CAMPUS
Components of Computer (continuation)
▪ Main Memory
It refers to a primary memory called
Random Access Memory (RAM). It is a type of
memory that is fast-access and temporarily
stores data and instructions that the CPU needs
when executing a program.
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
SANTA ROSA CAMPUS
Components of Computer (continuation)
▪ Storage Devices
It refers to non-volatile storage devices used for
storing data, documents, software, etc. Such as the
Hard Disk Drive (HDD), Solid State Drive (SSD),
Optical Drives (CD/DVD), and USB Flash Drives.
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
SANTA ROSA CAMPUS
Components of Computer (continuation)
▪ Motherboard
It refers to the main circuit board of the
computer, which serves as the focal point of the
computer system that integrates and connects
every part of the system.
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
SANTA ROSA CAMPUS
Components of Computer (continuation)
▪ Input Devices
It refers to the devices that are used to input
data and instructions that allow the users to
communicate with the computer.
Classification of input devices:
▪ Keying
▪ Pointing
▪ Scanning
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
SANTA ROSA CAMPUS
Components of Computer (continuation)
▪ Output Devices
It refers to the devices that are used to display
or present the processed data from the computer,
which enable the user to see/hear the output.
Classification of output devices:
▪ Visual
▪ Print Output
▪ Audio
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
SANTA ROSA CAMPUS
What is
Computer System?
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
SANTA ROSA CAMPUS
What is Computer System?
A computer system is a collection of complete
and functional hardware and software setups with
everything needed to implement computing
performance. It is designed to receive, process,
manage, store, and present the information in an
understandable format.
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
SANTA ROSA CAMPUS
Components of Computer System
▪ Computer Software
It refers to a programs or applications
(intangible parts of computer) used to direct the
operation of a computer, as well as
documentation giving instructions on how to use
them.
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
SANTA ROSA CAMPUS
Components of Computer System
(continuation)
Types of Software:
▪ System Software
It is a set of programs that controls the
operations of the computer and its devices.
▪ Application Software
It is a set of programs that performs specific
tasks for users.
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
SANTA ROSA CAMPUS
Components of Computer System
(continuation)
▪ Computer Hardware
It refers to the physical or tangible parts of a
computer, such as the input devices, output
devices, storage devices, CPU, etc.
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
SANTA ROSA CAMPUS
Computer Program vs
Computer Programming
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
SANTA ROSA CAMPUS
What is a Computer Program?
A computer program, also known as computer
software, is a sequence of instructions that is written
in any programming language that instructs the
computer to perform a specific task.
The computer program is composed of two to a
million lines of sequential and logical instructions
(program source code) that guide the computers to
execute specific operations.
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
SANTA ROSA CAMPUS
What is a Computer Program? (continuation)
Who creates a computer program?
Software Developers or Programmers, who use
any programming languages like Python, Java, C++,
and many others.
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
SANTA ROSA CAMPUS
What is a Computer Programming?
Computer programming is an act or process of a
programmer to write, design, and create meaningful
programs or software solutions that address or solve
real-world problems, to automate jobs, and to
complete various tasks.
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
SANTA ROSA CAMPUS
Key Aspects of
Computer Programming
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
SANTA ROSA CAMPUS
Key Aspects of Computer Programming
▪ Problem Solving
▪ Algorithm Design
▪ Data Structures
▪ Coding (Syntax and Logic)
▪ Testing and Debugging
▪ Documentation
▪ Optimization
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
SANTA ROSA CAMPUS
Key Aspects of Computer Programming
▪ Modularity
▪ Best Practices
▪ Collaboration
▪ Version Control
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
SANTA ROSA CAMPUS
Programming Languages
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
SANTA ROSA CAMPUS
What is a Programming Language?
A programming language is a collection of rules
and grammar used to write software applications.
Components:
▪ Syntax
▪ Data Types
▪ Variables
▪ Operators
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
SANTA ROSA CAMPUS
What is a Programming Language?
(continuation)
▪ Control Structures
▪ Libraries
▪ Paradigms
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
SANTA ROSA CAMPUS
Categories of Programming Languages
▪ Machine Languages
It refers to a language that consists of binary
code that the computer can understand.
Example:
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
SANTA ROSA CAMPUS
Categories of Programming Languages
(continuation)
▪ Assembly Languages
A language that is closer to machine languages
but is simpler and more readable. It use
mnemonics to represent instructions. An
assembler is a program that translates a program
written in assembly language into an equivalent
program in machine language.
Example:
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
SANTA ROSA CAMPUS
Categories of Programming Languages
(continuation)
▪ High-Level Languages
These are designed to be closer to human
languages, human-readable, and easy to
understand. It allows them to focus on solving
problems rather than dealing with low-level details
of computer hardware.
Examples:
Python, Java, C++, Ruby, and JavaScript
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
SANTA ROSA CAMPUS
Categories of Programming Languages
(continuation)
The high-level languages used a program called
compiler – a program that translates instructions
written in a high-level language into equivalent
program in machine language or machine code.
Example:
wages = rate * hours;
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
SANTA ROSA CAMPUS
Analog and Digital
Signals
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
SANTA ROSA CAMPUS
Analog Signals
Analog signals are continuously varying
continuous wave forms used to represent information
such as sound.
Example:
Audio tapes, Analog Temperature Readings,
Dimmer Switches, etc.
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
SANTA ROSA CAMPUS
Digital Signals
Digital signals is a discrete signals that represent
information with a sequence of 0s (low voltage/false)
and 1s (high voltage/true) or binary representation or
values.
Example:
Computer Files, Digital Clocks, Digital TV, Smart
Watch, etc.
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
SANTA ROSA CAMPUS
Binary Representation
The smallest unit of digital data is a bit or binary
digit, which can represent either a “0” or a “1”.
A sequence of 8 bits forms a byte, it is the basic unit
for storing and processing data in most computer
systems.
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
SANTA ROSA CAMPUS
Binary Units
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
SANTA ROSA CAMPUS
Computer Character Encoding Scheme
The American Standard Code for Information
Interchange (ASCII) is the most used encoding
scheme used by Intel-based systems where data set
consists of 128 characters from 0 to 127.
Example:
Character “A” is equivalent to decimal value of 65
which is the binary representation is 0100 0001.
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
SANTA ROSA CAMPUS
Computer Character Encoding Scheme
(continuation)
The Extended Binary Coded Decimal
Interchange Code (EBCDIC) is an 8-bit encoding
scheme that is typically used on IBM mainframe
computers.
The Unicode Transformation Format (UTF) is
an 8-bit, 16-bit, and 32-bit encoding scheme that
provides 100,000 characters unique code.
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
SANTA ROSA CAMPUS
References:
▪ Attaway, S. (2019). A Practical Introduction to programming
and Problem Solving.
▪ Malik, D. (2018). C++ Programming: Program Design
Including Data Structures, 8th edition.
▪ https://www.tutorialspoint.com/computer_concepts/compute
r_concepts_introduction_to_computer.htm
▪ https://www.javatpoint.com/computer-fundamentals-
tutorial
▪ https://www.geeksforgeeks.org/computer-and-its-
components/
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
SANTA ROSA CAMPUS
Thank you!
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
SANTA ROSA CAMPUS