TTS_Module1-CC102
TTS_Module1-CC102
1
“Introduction to Computer Program”
As you can see from this list, the CPU performs simple operations on pieces of data. The CPU
does nothing on its own, however. It has to be told what to do, and that’s the purpose of a program. A
program is nothing more than a list of instructions that cause the CPU to perform operations. Each
instruction in a program is a command that tells the CPU to perform a specific operation. Here’s an
example of an instruction that might appear in a program: 10110000
To you and me, this is only a series of 0s and 1s. To a CPU, however, this is an instruction to
perform an operation. It is written in 0s and 1s because CPUs only understand instructions that are
written in machine language, and machine language instructions always have an underlying binary
structure. A machine language instruction exists for each operation that a CPU is capable of performing.
For example, there is an instruction for adding numbers, there is an instruction for subtracting one
number from another, and so forth. The entire set of instructions that a CPU can execute is known as
the CPU’s instruction set.
NOTE: There are several microprocessor companies today that manufacture CPUs. Some of the
more well-known microprocessor companies are Intel, AMD, and Motorola. If you look carefully at your
computer, you might find a tag showing a logo for its microprocessor. Each brand of microprocessor has
its own unique instruction set, which is typically understood only by microprocessors of the same brand.
For example, Intel microprocessors understand the same instructions, but they do not understand
instructions for Motorola microprocessors.
Programs are usually stored on a secondary storage device such as a disk drive. When you install a
program on your computer, the program is typically copied to your computer’s disk drive from a CD-
ROM, or perhaps downloaded from a website. Although a program can be stored on a secondary
storage device such as a disk drive, it has to be copied into main memory, or RAM, each time the CPU
executes it. For example, suppose you have a word processing program on your computer’s disk. To
execute the program, you use the mouse to double-click the program’s icon. This causes the program to
be copied from the disk into main memory. Then, the computer’s CPU executes the copy of the program
that is in main memory. This process is illustrated in Figure 1-16.
The example shown is an actual instruction for an Intel microprocessor. It tells the
microprocessor to move a value into the CPU.
When a CPU executes the instructions in a program, it is engaged in a process that is known as
the fetch-decode-execute cycle. This cycle, which consists of three steps, is repeated for each
instruction in the program. The steps are:
1. Fetch A program is a long sequence of machine language instructions. The first step of the cycle
is to fetch, or read, the next instruction from memory into the CPU.
2. Decode A machine language instruction is a binary number that represents a command that
tells the CPU to perform an operation. In this step the CPU decodes the instruction that was just
fetched from memory, to determine which operation it should perform.
3. Execute The last step in the cycle is to execute, or perform, the operation. Figure 1-17 illustrates
these steps.
Throughout history, man has thought of ever more elegant ways of reducing the amount of
labor needed to do things. A computer has immense potential for saving time/energy, as most
(computational) tasks that are repetitive or can be generalized can be done by a computer. For a
computer to perform a desired task, a method for carrying out some sequence of events, resulting in
accomplishing the task, must somehow be described to the computer. The algorithm can be described
on many levels because the algorithm is just the procedure of steps to take and get the result. The
language used to describe an algorithm to other people will be quite different from that which is used by
the computer, however the actual algorithm will in essence be the same. An example of an algorithm
people use would be a recipe to make a cake.
The procedure must break up the problem solution into parts that the recipient party can
understand and execute. In the case of a computer, the problem solution is usually in the form of a
program that encompasses the algorithm and explains to the computer a clearly defined procedure
for achieving the solution. The procedure must consist of smaller steps each of which the computers
understand. There may be no ambiguities in the translation of the procedure into the necessary
action to be taken. A program is then just a specific realization of an algorithm, which may be
executed on a physical device.
A computer is essentially a physical device designed to carry out a collection of primitive actions.
A procedure is a sequence of instructions written in terms of which evoke a proper operation. To
make effective use of an algorithm on a computer one must not only find and understand a solution
to the problem but also convey the algorithm to the computer, giving the correct sequence of
understood commands that represent the same algorithm.
Reference:
Introduction to Computers 1 and Programming(0321537114.pdf)
https://www.webopedia.com/TERM/P/programming_language.html#:~:text=A%20programming
%20language%20is%20a,FORTRAN%2C%20Ada%2C%20and%20Pascal.
https://whatis.techtarget.com/definition/algorithm
SELF CHECK PR-1-1-1
1. Declarative Language
2. Procedure
3. Program
4. Algorithm
5. Machine language
STUDENT NAME: __________________________________ SECTION: __________________
Applications / Software:
MS Word
Internet Browser (ex. Google Chrome, Safari, Opera)
Procedure:
A. Give 5 example of computer programs
B. Type the name and example screenshot of a program(picture).
Ex. MS Paint
PRECAUTIONS:
Undertake final inspections to ensure the program conform to requirements
ASSESSMENT METHOD: PERFORMANCE TASK CRITERIA CHECKLIST
STUDENT NAME: __________________________________ SECTION: __________________
5 - Excellently Performed
4 - Very Satisfactorily Performed
3 - Satisfactorily Performed
2 - Fairly Performed
1 - Poorly Performed
_________________________________
TEACHER
Date: ______________________
STUDENT NAME: __________________________________ SECTION: __________________
PRECAUTIONS:
None
ASSESSMENT METHOD: WRITTEN WORK CRITERIA CHECKLIST
STUDENT NAME: __________________________________ SECTION: __________________
CRITERIA SCORING
Did I . . .
1 2 3 4 5
1. Observe safety precautions?
2. Use proper syntax?
3. Observed correctly the output?
TEACHER’S REMARKS: QUIZ RECITATION PROJECT
GRADE:
5 - Excellently Performed
4 - Very Satisfactorily Performed
3 - Satisfactorily Performed
2 - Fairly Performed
1 - Poorly Performed
_______________________________
TEACHER
Date: ______________________