0% found this document useful (0 votes)
2 views

CSS 11_Quarter1_Module1

Uploaded by

merryfil.adolfo
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

CSS 11_Quarter1_Module1

Uploaded by

merryfil.adolfo
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 96

Types and Parts

of Computers,
Operating
Systems, and
Peripheral
Devices
2

1. Identify the different types, parts and peripheral

Learning devices of a computer.

Outcome 2. Define Computer Operating systems

3. Enumerate the types, parts, peripheral devices and


s operating systems of a computer.

4. Recognize the basic computer operating systems.

5. State the function of types, parts and peripheral


devices of a computer.  Appreciate the importance of
types, parts, peripheral ang operating system of a
computer.
3

○ also known as computer peripheral, input-


Peripheral
output device, or input/output device, any of
Devices various devices used to enter information and
instructions into a computer for storage or
processing and to deliver the processed data.
4

Input/ ○ An input device sends information

Output to a computer system for

Devices processing, and an output device


reproduces or displays the results
of that processing.
5

Operatin ○ a set of programs that manage

g computer hardware resources and

Systems provide common services for


application software.
6

○ The computer operating system for

MAC Apple Computer's MacIntosh


line of personal computers and
workstations
7

○ The computer operating system for

MAC Apple Computer's MacIntosh


line of personal computers and
workstations
8

○ A Unix-like, open source and community-

Linux developed operating system for computers,


servers, mainframes
9

○ A series of operating systems developed


Windows by Microsoft
10

○ GUI Stands for "Graphical User


GUI Interface" and is pronounced "gooey."
○ It is a user interface that includes
graphical elements, such as windows,
icons and buttons.
11

Solid ○ Solid State Drive (SSD) A solid-state drive


State (SSD) is a new generation of storage
Drive device used in computers. SSDs replace
traditional mechanical hard disks by
using flash-based memory, which is
significantly faster
12

○ The storage device usually enables a


Storage
user to store large amounts of data in a
Device
relatively small physical space, and
makes sharing that information with
others easy.
13

○ In computers, volatile is used to describe


Volatile memory content that is lost when the
power is interrupted or switched off.

14

Computers and software go hand in


hand. Computers are powerful
because they can do many things
and programs are the way that we
get computers to do these many
things.
15

○ the process of problem solving.

Programming
16

1 + 4 to get 5 2 + (2 x 5) = 12
Solution:
2 + 5 + 5 to reach 3 + (3 x 6) = 21
12
8 + (8 x 11) = 96
3 + 6 to 12 gives
21

8 + 11 + 21 = 40
17

○ Different people use different


techniques to solve problems.
Programming
○ Some techniques are clearly outlined
and easy to follow; they solve the
problem and give insight techniques
can be easily modified if the domain of
the problem changes.
18

Programming
solving 1. 2.

process Analyze the problem and Design an algorithm in a


outline the problem and
involves the programming language.
its solution requirements.
following
steps:
19

1. How many 2.
apples? 1. Count the of
Solution: apples of Juan
Count the number 2. Count the apples
of apples, (add) of Mary
3. Add the apple of
Juan and Mary
20

Programming
solving
3. 4. 5.
process
Implement the Verify that the Maintain the
involves the
algorithm in a algorithm works. program by
following
programming improving it, and
steps:
language, such as modifying it if the
Java. problem domain
changes.
21

Generation of
Programming
Languages
22

First
Generation These are low-
level languages
like machine
language.
23

These are low-level assembly


Second
languages used in kernels and
Generation
hardware drives.
24

Third These are high-level languages like C,

Generation C++, Java, Visual Basic and JavaScript.

Languages
25

○ These are languages that consist of statements


that are similar to statements in the human
Fourth
language. These are used mainly in database
Generation
programming and scripting.
Languages ○ Fourth-generation languages tend to be
specialized toward very specific programming
domains. 4GLs may include support
for database management, report
generation, mathematical optimization, GUI
development, or web development
○ Example of these languages includes Perl,
Python, Ruby, SQL, MatLab (MatrixLaboratory).
26

Fifth ○ These are the programming languages

Generation that have visual tools to develop a

Languages program. Examples of fifth generation


language include Mercury, OPS5, and
Prolog.
○ Fifth-generation languages are used
mainly in artificial intelligence research.
27

Category of ○ The first two generations are called low

Programming level languages. The next three

Languages generations are called high level


languages.
28

○ The low-level language is a programming


Low-Level language that provides no abstraction from the
Languages hardware, and it is represented in 0 or 1 forms,
which are the machine instructions.

○ The languages that come under this category are


the Machine level language and Assembly
language.
29
○ Machine code is the only language a computer can
process directly. It is written in binary digits, i.e., 0 and
1.
Low-Level
○ Assembly languages is written in simple English
Languages
language, so it is easily understandable by the users.
Thus are specific to a given microprocessor or CPU
(central Processing Unit) of the computer. After writing
an assembly language program, the programmer
must use the assembler specific to the processor to
translate the assembly language into a corresponding
machine code that a computer understands.
30
○ Programs developed using low level languages are fast

○ Programmers can utilize processor and memory in better


Advantages of
way using a low level language.
Low-Level
○ There is no need of any compiler or interpreters to
Languages translate the source to machine code. Thus, cuts the
compilation and interpretation time.

○ Low level languages provide direct manipulation of


computer registers and storage.

○ It can directly communicate with hardware devices.


31

○ It is not easy to understand.


Disadvantages
of Low-Level ○ It is difficult to modify.
Languages
○ Program written in low level
language can run only on specific
microprocessor or CPU.
32

○ High level programming language enables


the programmer to write programs that are
High Level more or less independent of a particular
Languages type of computer.

○ Such languages are considered high level


because they are closer to human language
than the machine languages the computer
truly understands.
33
○ The main advantage of a high-level language
over, low-level language is that they are easier
to understand, modify and debug.
High Level
Languages ○ They allow the programmers to focus on
solving the problem rather than knowing how
to program a computer.

○ Ultimately, programs written in a high-level


language must be translated into machine
language the language that computers
understand.
34

○ It is close to human being.


Advantages of
High Level ○ It is easy to understand.
Languages
○ It consists of English language like
structure.

○ It does not depend upon the machine.

○ It is easy to modify.

○ The programs written in high level


language are called source code.
35

○ It needs language translator to translate program

Disadvantages into machine language.


of High Level ○ It is very slow in terms of program execution
Languages
compared to machine or assembly language.

○ It needs big amount of system resources such as


memory, disk space and CPU speed to run the
program properly.

○ It does not execute directly on the computer.


36

○ Regardless of what type of language you are


Interpreter using, eventually you will convert your program
s into a machine language so that the computer
and can understand and execute your program.
Compilers
○ When we write our programs in high-level
language the computer does not understand the
language because it is only operated with bit or
one’s and zero’s. There is a need of translation
process that will convert the programs written in
high-level language into machine language
37

○ A program that translates a program


Interpreter
written in a high-level language
s
(source code) and translates into a
and machine language (object code).
Compilers
Interpreters and 38

Compilers
39

○ Software Development Life Cycle (SDLC)


Software
Development is a framework that defines the steps
Life Cycle
involved in the development of software
at each phase. It covers the detailed
plan for building, deploying and
maintaining the software.
40

1. Planning: Defining the problem, Identifying the


input and expected output

2. Analysis: Identifying solution and formulate


SDLC Stages
algorithm

3. Design: Design the solution based on the


requirements defined in analysis

4. Implementation: This phase typically involves


extensive training and technical user support to
supplement sales and marketing efforts

5. Maintenance: Keep the program running


41

Algorithms
and
Flowchart
1. discuss the importance of algorithm in
problem solving;
Learning
2. compare the use of flowchart and
Outcomes pseudocode;

3. explain the benefits of flowcharting in


program development;

4. design an algorithm to solve computing


problems;

5. construct a flowchart to illustrate an


algorithm;
43

Lesson
Map Pseudocode Flowchart

Algorithm

This map presents various approaches of making algorithm in building computer


applications.
Algorithm
(noun)
Al-go-ri-thm

An algorithm is step by step
instruction to be carried out in
order to solve a specific problem or
class of problems. An algorithm is a
recipe for solving a problem.
46

Example of
Algorithm
47

○ Design algorithm, implement algorithm using progr.

○ Most computer programmers spend a large


Algorithms percentage of their time creating algorithms. The
rest of their time is spent debugging the algorithms
that don’t work properly.

○ The goal is to create efficient algorithms that do not


waste more computer resources such as RAM and
CPU time.
48
○ This can be difficult, because an algorithm that
performs well on one set of data may perform
poorly on other data. As you might guess, poorly
written algorithms can cause programs to run
slowly and even crash.

○ Therefore, software updates are often introduced,


touting “improved stability and performance”.

○ It also means that the algorithms in the previous


versions of the software were not written as well as
they could have been.
49

○ Input: An algorithm require an input

○ Output: Each algorithm is expected to


Characteristics produce at least one result
of Algorithm ○ Definiteness: Each instruction must be
clear and unambiguous.

○ Finiteness: If the instructions of an


algorithm are executed, the algorithm
should terminate after finite number of
step
50

○ Move the wolf, sheep and cabbage


Wolf, Sheep to the opposite shore using the
and Cabbage boat. Each time the boat can only
Riddle take one item and so multiple
crosses is necessary. Be careful,
when the man is not around, the
wolf will eat the sheep, and the
sheep will eat the cabbage.
51

○ Move the sheep to the left.


○ Move the wolf to the left.
Solution
○ Move the sheep back to the right.
○ Move the cabbage to the left.
○ Finally, move the sheep to the left
52

Three types of ○ Sequence


Algorithm
Structures ○ Branching
(Selection)/Conditional
○ Loop (Repetition)
53

○ In the sequence structure, statements


Sequential are placed one after the other and the
execution takes place starting from up
to down.
54

○ In branch control, there is a


condition and according to a
Selection condition, a decision of either TRUE
or FALSE is achieved.
55

○ The Loop or Repetition allows a


statement(s) to be executed
Loop repeatedly based on certain loop
condition
56

1. Define your algorithms input: Many


algorithms take in data to be processed, e.g. to

How to write calculate the area of rectangle input may be the


algorithm? rectangle height and rectangle width.

2. Define the variables: Algorithm's variables


allow you to use it for more than one place. We
can define two variables for rectangle height
and rectangle width as HEIGHT and WIDTH (or
H & W). We should use meaningful variable
name e.g. instead of using H & W use HEIGHT
and WIDTH as variable name.
57
3. Outline the algorithm's operations: Use input
variable for computation purpose, e.g. to find area of
rectangle multiply the HEIGHT and WIDTH variable and
How to write
algorithm? store the value in new variable (say) AREA. An
algorithm's operations can take the form of multiple
steps and even branch, depending on the value of the
input variables.

4. Output the results of your algorithm's


operations: In case of area of rectangle output will be
the value stored in variable AREA. if the input variables
described a rectangle with a HEIGHT of 2 and a WIDTH
of 3, the algorithm would output the value of 6.
Start 58
○ Area = Length x
Width
1. Input: Length ,
L, W,
Calculate Width
A
the area of 2. Define Variable: L,
W, A
rectangle 3. Algorithm:
Get L, W
1. Get the value
of L and W.
2. Multiply L and A=LxW
W.
3. Assign the
result to A. Display A
4. Display A.

Stop
59
○ Pseudocode

◦ The steps of the algorithm are written in English


Algorithms can
in a shorthand form which represents the flow of
be represented
control through the algorithm.
by: ○ Flowcharts

◦ A flowchart is a graphical representation of the


problem-solving process. With algorithms, we can
easily understand a program. The main purpose
of a flowchart is to analyze different processes.
Several standard graphics are applied in a
flowchart.
Go to IT Dept

1. Go to IT Dept
Fill up form
Pseudocode 2. Fill up Form.
3. Proceed to EDP
and Flowchart
4. Submit Proceed to
Requirements. EDP

5. Proceed to cash.
6. Go back to EDP. Submit
Requirements

A
61

Proceed to
Cash

Go back to
EDP
62

Flowchart
Flowchart
Symbols:
Flowchart
Symbols:
Start
65

L,W,
Sequential: ◦ Input: Length, Width A
Calculate the ◦ Variables: L, W
area of ◦ 1. Get the value of L and W. Get L, W
rectangle.
◦ 2. Multiply L and W
A=LxW
◦ 3. Assign the result to variable
A=LxW
A.
◦ 4. Display A.
Display A

Stop
66
○ Compute the area of rectangle.

○ Draw a flowchart that will display the area and

Sequential perimeter of a rectangle. P = 2L + 2W, A = L x W


Examples ○ Create a flowchart that will display your age five
years from now.

○ Create a flowchart that will compute employee’s


withholding tax and net pay. Given tax is 10% of
the salary.

○ Draw a flowchart that will compute you GPA. GPA


is computed as GPA = (prelim + midterm + prefi +
final)/4
Start
67

Draw a flowchart ○ Input: L, W


L,W
that will display ○ Process: A,P

the area and ◦ A = Lx w


Get L, W
perimeter of a ◦ P = 2L + 2W
rectangle. ○ Output: A=LxW
P = 2L + 2W,
◦ A (area)
A=LxW P = 2L + 2W
◦ P (perimeter)

A, P

Stop
68
Start
Create a
○ Input: age
flowchart that
will display ○ Process:
age
your age five ◦ age = age +
years from 5
now. ○ Output: age Get age

age = age + 5

A
69

age

Stop
70
start A

X, Y
INPUT PRINT X, Y
PROCESS
GET X, Y
OUPUT
stop

X=X+Y

Y=X-Y

X=X-Y

A
Start
A 71

○ Input: salary sal,


Create a flowchart
that will compute ○ Process: tax,n tax,net
et
employee’s ◦ tax = salary * 0.10
withholding tax Stop
◦ netpay = salary - Get
and net pay. Given sal
tax is 10% of the tax
salary.
○ Output: tax, netpay
tax = sal * .10

net= sal- tax;

A
Start
72

○ Input: p,m,pf,
Draw a flowchart
f,gpa
that will compute ◦ p,m,pf,f
you GPA. GPA is
○ Process:
computed as GPA = Get
(prelim + midterm ◦ GPA = c p,m,pf,f
+ prefi + final)/4
○ Output:
gpa=GPA = (prelim +
◦ GPA midterm + prefi + final)/4

Display
gpa

Stop
73

○ The decision structure or mostly commonly


known as a selection structure, is case where in
Selection/
the algorithm, one has to make a choice of two
Conditional
alternatives by making decision depending on a
Structure given condition.

○ Selection structures are also called case


selection structures when there are two or more
alternatives to choose from.
74

○ This structure can be illustrated in a flowchart as


follows:
Selection/
Conditional
Structure
75
○ From the above structure, we have the following

If condition is true then


Selection/ Do Task-A

Conditional else Do

Structure Task-B

○ In this case, if condition is false, nothing happens.


Otherwise Task-A is executed. The selection requires the
following

○ Choose alternative actions as a result of testing a logical


condition

○ Produce code to test a sequence of logical tests


76

Types of
○ if Structure: Executes the
Selection/
statement when the condition is
Conditional
true
Structure True Is today False
sunny
day?

Go out with
friends
77
○ if else Structure: Executes two different
Types of codes depending upon whether the test
Selection/ expression is true or false.
Conditional
Structure True Is today False
a sunny
day?

Go out with Stay at home


friends
○ if else if Structure: Allows you to create 78
a
chain of if statements. The if statements are
Types of
evaluated in order until one of the if
Selection/
expressions is true or the end of the if/else if
Conditional
chain is reached.
True Is today False
Structure a sunny
day?

Go out with
friends True Is today False
Monday
?

GO to school Stay at home


79

○ When using decision, conditional


Relational statement make use of relational and
Operator and logical operators:

Logical ○ Relational Operators

Operators ◦ < (less than)

◦ > (greater than)

◦ <= (less than or equal)

◦ >= (greater than or equal)


80

Relational ◦ == (is equal to) ◦ = (Assign


Operator and value)
◦ ! = (not equal)
Logical ◦ == (compare)
○ Logical Operators
Operators
◦ && (and) X = 10

◦ || (or) Y=5

◦ ! (not) X != Y

10 !=5
81

○ Charles Babbage is the Father of computer


AND High-Level language is the only
And Operator
language that can be understood by the
FAND (&&)
computer .
○ X = 10, y = 5
○ True AND False = False
○ X > = 5 && y != x
○ True && True= True
82

○ || (or) if one is True, result is True


OR Operator ◦ False
TOR ○ Charles Babbage is the Father of
computer OR High-Level language is
the only language that can be
understood by the computer
○ !(True OR False)
○ !(False)
○ True
83

○ !False = True
○ !True = False
NOT
84

○ Create a flowchart that will print “Can vote


” if age is greater than or equal to 18.

Examples: ○ Create a flowchart that will increment the


age by 10 if the age is equal to 20
otherwise do nothing.

○ Draw a flowchart that will print “Cannot


vote” if age is less than 18 otherwise print
“Can Vote”

○ A program that determines if the input


number is “Positive” or “Negative”.
START 85

○ Input: age
Create a
flowchart that
○ Output: age

will print “Can ◦ “Can


vote ” if age is Vote” Enter age
greater than or
equal to 18. ○ Condition:
○ age>=18 TRUE age FALSE
>=18

Display “Can
Vote”

STOP
START 86

○ Input: age
○ Condition: age
Create a flowchart
that will increment ○ age == 20
the age by 10 if the ○ Process: Enter age
age is equal to 20
otherwise do ◦ age = age + 10
nothing. ○ Output: age False age True
==20

age = age + 10

age

STOP
Start
87

○ Input: age = 17
○ Condition: age < 18 age
Draw a flowchart that
will print “Cannot ◦ True: “Cannot
vote” if age is less Vote”
Get age
than 18 otherwise
◦ False: “Can Vote”
print “Can Vote”

True False
age
<18

“Cannot “Can Vote”


Vote”

Stop
Start Start
88

A flowchart that num num


determines if
the input
number is Get num Get num

“Positive” or
“Negative”.
True num False True num False
>0 <0
○ Input:
number “Positive” “Negative” “Negative” “Positive”
○ Condition:
○ number>0
○ number<0 Stop Stop
89

○ Create a flowchart that will compute for


commission. If sale is greater than or equal to
20000, commission is 20% of the sale.
Examples:
Otherwise, commission is 10%.

○ Draw a flowchart that will compute for student’s


GWA and display if GWA is “Pass” or Failed.
GWA is computed as GWA =
(prelim+midterm+prefi+final)/4
START
90

○ Input:
Create a age
◦ age = 20
flowchart that ○ Output:
will print “Can
◦ “Can vote “
vote ” if age is Get age
○ Process:
greater than or Condition:
equal to 18. ◦ age >= 18 False age>= True
18

“Can Vote”

STOP
START
91

○ Input: age
Create a flowchart
◦ age
that will increment
○ Condition: Get age
the age by 10 if the
◦ age == 20
age is equal to 20
○ Process: False
otherwise do nothing. True
age ==
◦ age = age + 20

10
○ Output: age = age + 10

◦ age
Print age

STOP
START
92

○ Input:
age
Draw a flowchart that ◦ age = 3
○ Condition:
will print “Cannot
vote” if age is less ◦ age<18 Get age

than 18 otherwise ◦ T: Cannot


Vote
print “Can Vote” False
◦ F: Can Vote True
age<18

“Can Vote” “Cannot Vote”

STOP
START
START
93

○ Input:
num
A program that ◦ num num

○ Condition:
determines if the
◦ num<0 Get num
Get num
input number is
◦ num>0
“Positive” or ○ Output:
False True False
“Negative”. ◦ Positive num < 0 num >
0
◦ Negative

“Positive” “Negative”
“Negative”

STOP
STOP
Start A 94

Draw a flowchart that


will compute for p,m,pf,
student’s GPA and f, gpa True False
gpa
display if GPA is >=75
“Pass” or “Failed”.
GPA is computed as Get
GPA = p,m,pf,f
(prelim+midterm+
“Pass” “Failed”
prefi+final)/4
○ Input: p, m, pf, f
○ Process: GPA = gpa=(p+m+pf+f)/4
(prelim+midterm+prefi
+final)/4
○ Output: GPA Stop
gpa
◦ “Pass”, “Failed”
○ Condition:
◦ gpa > = 75 A
◦ gpa < 75
Start

95
sale,
Create a flowchart com
that will compute for
commission. If sale is
greater than or equal Get sale
to 20000,
commission is 20% of
the sale. Otherwise, True Sale >= False
commission is 10%. 20000
○ Input: sale
○ Output: commission com=sale*0.20 com=sale*0.10
○ Condition:
◦ sale>=20000 com com
◦ True: commission
= sale * 0.20
◦ False: commission
Stop
= sale * 0.10
○ A flowchart that displays the high school level of a student, based
96
on its year entry.
Year Entry Number High School Level
1 “Freshmen”
If else if
2 “Sophomore”
Structure 3 “Junior”
4 “Senior”
Example ○ Write a flowchart that will compute customer’s payment.
Customers’ payment can have discounts or interest based on the
mode of payments. The following are the mode of payments:
Mode of Payment Discount/Interest
1 10% discount (Cash)
2 5% discount (Two Installment)
3 5% Interest (Three-Installment)
None of the above Invalid Input

You might also like