Please enable JavaScript.
Coggle requires JavaScript to display documents.
TOPIC 1 : INTRODUCTION TO PROGRAMMING - Coggle Diagram
TOPIC 1 : INTRODUCTION TO PROGRAMMING
1.1 Programming Languages
1.1.1 Low-level Languages
. A language that consists of strings of binary digits or English-like abbreviations to represent basic instructions to a computer
. Example
a) Machine Languages
written in the form of binary code (1, 0).
❖ Advantage
readily understood by computers because it does not need to be translated before being executed.
❖ Disadvantages
language are very difficult
to read and modify by human
single instruction of machine language correspond to only one operation at the machine level.
b) Assembly Languages
a short descriptive word known as a mnemonic, to represent
each of the instructions in the computer
❖ Advantage
easier to learn and understand by human compared to machine langguage.
❖ Disadvantages
not readily understood by computers.
needs to be translated into machine language before being
executed.
1.1.2 High-level Language
. A new generation of programming languages that are similar to
English-like language which is easy to learn and use.
. called "statements"
Example
Java, C++, Python, Visual Basic, C, COBOL,
FORTRAN, BASIC and Pascal.
❖ Advantages
easier for human to learn and
understand compared to low-level languages.
can run on different types
of computers and operating systems.
❖ Disadvantage
not readily understood by computers where it needs to be translated into machine language before being executed.
1.2 Programming Paradigms
. approach to solving problems using some programming
language
Procedural
A paradigm which is based on the concept of modular programming
Function : identifies the major function of a program called "main module" and the main module divided into smaller modules
Ex : C , Pascal, BASIC
Object-oriented
A paradigm which is based on objects and classes.
Function : identifies objects which are items that contain both data and the procedures that read or manipulate that data
Ex : Java , Python , C++
Logic
A paradigm which consists of a set of sentences in logical form, expressing facts and rules about some problem domain.
Function : Focus on facts stored in memory called tha knowledge base.
Ex : ProLog, LISP , Mercury
1.3 Programming Languages Translators
program that translates a programming source code
into a machine code for execution.
function : to translate a source code in high level language and assembly language into machine code.
Assembler
Function : Translates assembly-language instructions into
machine code.
Ex : Assembly Language
Interpreter
Function : Translates high-level source code into machine
code, one line at a time.
Ex : Python , HTML , Ruby
Compiler
Function : Translates the entire high-level source code into
a machine code.
Ex : Java , Pascal , C