Professional Documents
Culture Documents
Chapter 1 - Introduction 2
Chapter 1 - Introduction 2
Programming Fundamental
CHAPTER 1:
INTRODUCTORY TO PROGRAMMING
Notes 1.3
1
1.2: Know The Definition of Programming
Definition Of :
Ø Program:
l A set of step-by-step instructions that directs a
computer to perform a specific task and to
produce the required results.
Ø Programming:
l Programming is a process of designing/ creating
a program.
Ø Programmer:
l Programmer is a person who writes the program.
2
1.2: Know The Types of Programming
a. Machine languages
b. Assembly languages
c. High Level languages
3
1.2: Know The Types of Programming
Machine Language
• The lowest level of language.
• Uses 1s and Os / binary digits to represents data and instructions
• Examples: 0 represents “off” and 1 represents “on”.
• The only language that the computer could understand (does not require translator).
4
1.2: Know The Types of Programming
Assembly Language
• Known as symbolic language.
• It uses mnemonic codes - a symbol chosen to help user to remember
• replace “0” and “1”
• For example, A represented ADD and S represented SUM
• Computer does not understand the language so it needs an assembler to translate the program to
machine language.
5
1.2: Know The Types of Programming
6
1.2: Know The Types of Programming
7
1.3: Know The Types of Programming
8
1.2: Know The Types of Programming
Structured Programming
Ø Structured programming takes on the top-to-bottom approach.
Ø Structured programming is based around data structures and subroutines.
Ø It splits the tasks into modular forms. This makes the program simpler and easier to read with less lines
and codes.
Ø This type of program accomplishes certain tasks for that a specific reason.
Ø For example, invoice printers use structured programming. This type has clear, correct, precise
descriptions.
Ø A structured program is decomposed into a hierarchy of processes. A process in this context is a body of
code, typically a function or subroutine, that takes some input and manipulates it to produce an output.
Ø A process may be composed of other, more specialized processes, i.e., it may be a function that calls other
functions.
9
1.2: Know The Types of Programming
Modular Programming
Ø Modular programming is a software design technique that increases the extent to which software is
composed from separate parts, called modules.
Ø Execution of a program begins in the main function.
Ø The main function can call other functions:
A. Functions defined in the same file.
B. Function defined in other files or libraries
Ø Functions are also referred to as modules
Ø A module is a set of statements that performs a task or computes a value
10
1.2: Know The Types of Programming
11
Thank You!!
12