KEMBAR78
2 Introduction To Computer Programming | PDF | Assembly Language | Computer Programming
0% found this document useful (0 votes)
7 views14 pages

2 Introduction To Computer Programming

Uploaded by

Carlson Wickham
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views14 pages

2 Introduction To Computer Programming

Uploaded by

Carlson Wickham
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

INTRODUCTION TO

COMPUTER
PROGRAMMING
Outline of Topics
◦ Definition of programming
language

◦ Categories of programming
languages

◦ Commonly used programming


languages
Programming
Language(PL)
◦ A programming language is a set
of instructions written by a
programmer to deliver
instructions to the computer to
perform and accomplish a task.
This set of instructions is usually
viewed as incomprehensible code
structured following a definite
programming language syntax.
Categories of
Programming
Languages
There are two categories of
programming languages. The
categorization is based on their human
level of understanding, these are:
◦ Low-Level Programming
Languages
◦ High-Level Programming
Languages
Low-Level
Language (LLL)
◦ A low-level language, often known as
a computer's native language, is an
example of programming language. It
is very close to writing actual
machine instructions, and it deals
with a computer's hardware
components and constraints. It works
to control a computer's operational
semantics and provides little or no
abstraction of programming ideas.
Examples of Low-Level Language
◦ The following are examples of low-level languages:
◦ Machine Code
• Uses binary code
• Machine-dependent
• Not portable

◦ Assembly Language
◦ Uses mnemonics
◦ Machine-dependent
◦ Not usually portable
Machine Language
◦ The representation of a computer
Operation Address program which is read and
understood by the computer.
0010 0000 0000 0100 ◦ A program in machine code
consists of a sequence of machine
0100 0000 0000 0101 instructions.
0011 0000 0000 0110 ◦ Instructions:
◦ Machine instructions are in binary
code
◦ Instructions specify operations
and memory cells involved in the
operation
Assembly Language
◦ A symbolic representation of the machine language of a specific
processor.
◦ Is converted to machine code by an assembler.
◦ Usually, each line of assembly code produces one machine
instruction (One-to-one correspondence).
◦ Programming in assembly language is slow and error-prone but is
more efficient in terms of hardware performance.
◦ Mnemonic representation of the instructions and data
◦ Example:
Load Price
Add Tax
Store Cost
High-Level
Language (HLL)
◦ High-level languages are programming
languages that are designed to allow
humans to write computer programs and
interact with a computer system without
having to have specific knowledge of the
processor or hardware that the program
will run on.
◦ High-level languages use command words
and Syntax which reflects everyday
language, which makes them easier to
learn and use. High-level languages also
offer the programmer development tools
such as libraries and built-in functions.
High-Level
Language (HLL)
◦ A Continue
programming language which use
statements consisting of English-like
keywords such as "FOR", "PRINT" or “IF“,
... etc.
◦ Each statement corresponds to several
machine language instructions
(one-to-many correspondence).
◦ Much easier to program than in assembly
language.
◦ Data are referenced using descriptive
names
◦ Operations can be described using familiar
symbols
◦ Example:
Cost := Price + Tax
Examples of
High-Level
Language
◦ The following are examples of
low-level languages:
◦ Pascal
◦C
◦ C++
◦ Java
◦ Fortran
◦ PHP
Low-Level VS High-Level Languages
Syntax and Grammars

1 2 3
Syntax descriptions The formal language is Some PLs look more
for a PL are not a PL but it can be like grammar
themselves written in a implemented by a descriptions than like
formal language. compiler to enforce instructions.
• E.g. Backus-Naur Form grammar restrictions.
(BNF)
Reference
◦ https://codeinstitute.net/global/blog/what-is-a-programming-language/

◦ https://www.javatpoint.com/what-is-a-low-level-language

◦ https://isaaccomputerscience.org/concepts/sys_proglang_high_level?examBoard=all&stage=all

You might also like