MANUAL
MANUAL
TABLE OF CONTENTS
MODULE 1 - ALGORITHM
1.1 Pseudo code
1.2 Students' assessment
MODULE 2 - FLOWCHART
2.1 Flowchart Symbols
2.2 Students' assessment
MODULE 3 - PROGRAMMING LANGUAGE
3.1 Low Level Language
3.2 Binary Operations
3.3 Students' assessment
MODULE 1
ALGORITHM
An algorithm is defined as sequence of steps to solve a problem (task). The steps must be
finite, well defined and unambiguous. Algorithm can also be defined as a plan to solve a
problem and represents its logic. In other words, an algorithm is a procedure for solving
problems. In order to solve a mathematical or computer problem, this is the first step in the
process. Note that an algorithm is of no use if it does not help us arrive at the desired solution.
Writing a logical step-by-step method to solve the problem requires some thinking.
An algorithm includes calculations, reasoning, and data processing. They can be presented by
natural languages, pseudocode, and flowcharts, etc. With algorithms, we can easily understand
a program.
Characteristics of Algorithm
It should have finite number of steps. No one can be expected to execute infinite number of
steps.
The steps must be in order and simple
Each step should be defined clearly i.e. without un-ambiguity (without doubtfulness)
Must include all required information
Should exhibit at least one output
There are two forms of Algorithm namely, Pseudo code and Flow chart
PSEUDO CODE
Pseudo code (which means fake code, because it's not really programming code specifies the
steps required to accomplish the task. Pseudo code is a type of structured English that is used
to specify an algorithm. Pseudo code cannot be compiled nor executed, and there are no real
formatting or syntax rules.
4. Write pseudo code to determine if a person is eligible to apply for a ariver's license
based on their age.
Examples of Flowcharts
1. Calculate the Average of Two Numbers using flowchart
As you may have already known, to calculate the average of two numbers, you can sum
up those two numbers and divide the result by 2. In other words, the formula for
calculating the average of two numbers is: (number 1 + number 2)/2.
So the basic shapes of the chart should be like this:
START
Print Average
END
Example 2: Print 1 to 20:
Algorithm:
Step 1: Initialize X as 0,
Step 2: Increment X by 1,
Step 3: Print X,
Step 4: If X is less than 20 then go back to step 2.
Flowchart:
Flowchart Algorithm
3. Find the largest among three different numbers entered by the user.
Start
Read a, b and c
False True
Is a > b?
Start
STUDENTS' ASSESSMENT
1. Create a flowchart to determine if a given number is even or odd.
Low Level Language Low level programming languages are the codes that are easy to
understand by the computer and difficult for the user. These languages are also called machine
dependent because the program varies from machine to machine. These languages are used to
create the system program for the computer.
Machine Level Language: This language is directly understood by the computer and does not
require any translator. In this language the codes are written in binary numbers i.e. O or 1. This
language is also known as binary languages. This language is very difficult for the programmers
and code may be different from machine to machine.
This language is very hard for the users to understand because all the codes are written in
binary numbers.
Assembly Language: In assembly language the codes are in the form of instructions and these
codes are called mnemonics. These codes are easier than the binary codes and perform the
specific task. It is easy for the programmer to write the codes. This language uses a translator
called assembler which converts the assembly level language into machine code. For examples
the code for addition is ADD, subtraction is SUB etc
Rules of Binary addition
a. 0+0=0
b. 0+1=1
c. 1 + 0=1
d. 1 + 1 = 10
a. 0-0=0
b. 0 - 1 = 1 (Borrow 1)
c. 1-0=1
d. 1-1 = 0
STUDENTS' ASSESSMENT
1. What is the result of adding 1011 and 1101 in binary?
2. What is the result of subtracting 1101 from 10010 in binary?
3. What is the difference between 101010 and 1001 in binary?
4. What is the result of adding 111111 and 101010 in binary?
5. What is the result of subtracting 10011 from 101001 in binary?
6. What is the result of subtracting 100101 from 1011101 in binary?