Computer Fundamental and
Ethics
Farida Siddiqi Prity
Levels of Programming Language
Low Level
High Level
Low Level
❑ are designed to work closely with the
hardware of a computer.
❑ provide a direct interface to the computer's
central processing unit (CPU) and memory.
There are two main types of low-level languages:
Machine Language
Assembly Language
Machine Language
consisting of binary code..
represented as sequences of binary digits (0s
and 1s)
directly understood by the computer's CPU.
Machine language programs are highly
machine-specific.
different CPU architectures require different
machine code instructions.
Example: 10100010 00010010
Advantages of Machine Language
directly understood by the computer
No need of translator
Disadvantages of Machine Language
Machine language is highly dependent on the
specific computer architecture and CPU
Assembly Language
uses mnemonic codes and symbols to represent
machine-level instructions.
Each mnemonic corresponds to a specific
machine operation or instruction
making it more human-readable than raw
machine code.
• The assembly language program consists of
various instructions:
• mov is used to move data between registers
and memory locations.
• add is used to perform addition.
• Remove
• delete
Assembler
An assembler is used in computer programming
to translate assembly language code into
machine code or binary code that a computer's
central processing unit (CPU) can understand
and execute.
Advantages:
The instruction of assembly language is human
readable.
Disadvantages:
Need assembler
High level language
A high-level programming language is a type of
programming language that is designed to be
more user-friendly, human-readable
makes the code more understandable and
maintainable
Code written in a high-level language can be
more easily ported to different platforms or
operating systems with minimal modifications
• Common examples of high-level programming languages
include:
• Python
• Java
• C++
• C#
• JavaScript
• Ruby
• Swift
• PHP
• Go
• Rust
But computer can not directly understand high
level language.
It needs translator to understand this language.
H.W
Differences between high and low level
languages
Language Translator
Assembler
Compiler - high level
Interpreter – high level
Assembler
Assembly language
Assembler
Machine Code
Compiler and Interpreter
Both are used to convert high level language
Compiler
A compiler translates the entire source code
into an executable file before execution
Interpreter
an interpreter translates and executes the
source code line by line
Compiler
Advantages of compiler
Fast
Disadvantages of compiler
Debugging compiled code can be more
challenging.
Memory will be large.
Interpreter
Advantages of compiler
Debugging is easy
Disadvantages of compiler
slow
H.W
Differences between compiler and interpreter.
Between compiler and interpreter, which is fast?
Between compiler and interpreter, in which
debugging is easy?